New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support WatchOS build #321

Closed
wants to merge 1 commit into
base: master
from
Jump to file or symbol
Failed to load files and symbols.
+15 −2
Diff settings

Always

Just for now

View
@@ -28,8 +28,15 @@ function(custom_protobuf_find)
set(Protobuf_FOUND TRUE PARENT_SCOPE)
endfunction()
if (ANDROID OR IOS OR WIN32)
if (WIN32)
custom_protobuf_find()
elseif (ANDROID OR IOS)
custom_protobuf_find()
# For Androd or iOS, we won't need to build the libprotoc and protoc binaries
# because we will use the host protoc to build the proto files.
set_target_properties(
libprotoc protoc PROPERTIES
EXCLUDE_FROM_ALL 1 EXCLUDE_FROM_DEFAULT_BUILD 1)
else()
find_package( Protobuf )
if ( NOT (Protobuf_FOUND OR PROTOBUF_FOUND) )
View
@@ -22,11 +22,17 @@ $CAFFE2_ROOT/scripts/build_host_protoc.sh || exit 1
echo "Building caffe2"
cd $BUILD_ROOT
if [ -z ${IOS_PLATFORM+x} ]; then
# IOS_PLATFORM is not set, in which case we will default to OS, which
# builds iOS.
IOS_PLATFORM=OS
fi
cmake .. \
-DCMAKE_TOOLCHAIN_FILE=$CAFFE2_ROOT/third_party/ios-cmake/toolchain/iOS.cmake\
-DCMAKE_INSTALL_PREFIX=../install \
-DCMAKE_BUILD_TYPE=Release \
-DIOS_PLATFORM=OS \
-DIOS_PLATFORM=${IOS_PLATFORM} \
-DUSE_CUDA=OFF \
-DBUILD_TEST=OFF \
-DBUILD_BINARY=OFF \
ProTip! Use n and p to navigate between commits in a pull request.