diff options
author | Gil <mcg@google.com> | 2018-06-26 15:05:28 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-26 15:05:28 -0700 |
commit | 3722deff12ec2e79c479ceae3a829752f92bb710 (patch) | |
tree | b9d779ffe5ead20ffebf988c7f115b35fde428eb /cmake/external/nanopb.cmake | |
parent | d03050653ff84e624def93aa512ef35907f5792a (diff) |
Install protobuf during CMake build (#1460)
* Install protobuf
* Use the built-in FindProtobuf.cmake
* Add additional build configuration flags
* Preserve generator configuration in the protobuf sub-build
Without this, the build fails on Win64 because the default
configuration builds a Win32 libprotobuf and the Win64 build rejects
it.
* Wire the installed protobuf into the gRPC build.
* Install nanopb
Diffstat (limited to 'cmake/external/nanopb.cmake')
-rw-r--r-- | cmake/external/nanopb.cmake | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/cmake/external/nanopb.cmake b/cmake/external/nanopb.cmake index 368ecf0..39eb833 100644 --- a/cmake/external/nanopb.cmake +++ b/cmake/external/nanopb.cmake @@ -14,10 +14,7 @@ include(ExternalProject) -set( - NANOPB_PROTOC_BIN - ${FIREBASE_BINARY_DIR}/external/protobuf/src/protobuf-build/${CMAKE_CFG_INTDIR}/protoc -) +set(NANOPB_PROTOC_BIN ${FIREBASE_INSTALL_DIR}/bin/protoc) ExternalProject_Add( nanopb @@ -32,11 +29,11 @@ ExternalProject_Add( CMAKE_ARGS -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} + -DCMAKE_INSTALL_PREFIX:STRING=${FIREBASE_INSTALL_DIR} -DBUILD_SHARED_LIBS:BOOL=OFF -Dnanopb_BUILD_GENERATOR:BOOL=ON -Dnanopb_PROTOC_PATH:STRING=${NANOPB_PROTOC_BIN} UPDATE_COMMAND "" TEST_COMMAND "" - INSTALL_COMMAND "" ) |