aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmake/external/nanopb.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/external/nanopb.cmake')
-rw-r--r--cmake/external/nanopb.cmake9
1 files changed, 8 insertions, 1 deletions
diff --git a/cmake/external/nanopb.cmake b/cmake/external/nanopb.cmake
index c78613f..5df0cf5 100644
--- a/cmake/external/nanopb.cmake
+++ b/cmake/external/nanopb.cmake
@@ -19,6 +19,11 @@ ExternalProject_GitSource(
GIT_TAG "0.3.8"
)
+set(
+ NANOPB_PROTOC_BIN
+ ${FIREBASE_INSTALL_DIR}/external/protobuf/src/protobuf-build/src/protoc
+)
+
ExternalProject_Add(
nanopb
DEPENDS
@@ -50,7 +55,9 @@ ExternalProject_Add(
# nanopb relies on $PATH for the location of protoc. cmake makes it difficult
# to adjust the path, so we'll just patch the build files with the exact
# location of protoc.
- PATCH_COMMAND perl -i -pe s,protoc,${FIREBASE_INSTALL_DIR}/external/protobuf/src/protobuf-build/src/protoc,g ./CMakeLists.txt ./generator/proto/Makefile
+ PATCH_COMMAND
+ perl -i -pe s,protoc,${NANOPB_PROTOC_BIN},g
+ ./CMakeLists.txt ./generator/proto/Makefile
UPDATE_COMMAND ""
INSTALL_COMMAND ""