From 189313e8b15bb6f5e4e05fae3a413bfb65df6661 Mon Sep 17 00:00:00 2001 From: Rich Gowman Date: Tue, 6 Feb 2018 10:00:55 -0500 Subject: Minor refactoring --- cmake/external/nanopb.cmake | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'cmake') 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 "" -- cgit v1.2.3