aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmake
diff options
context:
space:
mode:
authorGravatar Rich Gowman <rgowman@google.com>2018-02-06 10:00:55 -0500
committerGravatar Rich Gowman <rgowman@google.com>2018-02-06 10:02:30 -0500
commit189313e8b15bb6f5e4e05fae3a413bfb65df6661 (patch)
treec66fe22704ffec382e4b21a5e326b213ba53e444 /cmake
parentfd0b332f4609bb3a2e3918f24ca470b1a3c2a301 (diff)
Minor refactoring
Diffstat (limited to '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 ""