From a335d78a62c213b1ae6465bad28aaedfafd828bc Mon Sep 17 00:00:00 2001 From: rsgowman Date: Tue, 27 Mar 2018 13:43:17 -0400 Subject: Only add nanopb proto headers to the -I path when depending on the nanopb protos. (#982) This is motivated by wanting to use libprotobuf in the project too, but it's also sensible by itself. --- Firestore/CMakeLists.txt | 3 --- Firestore/Protos/CMakeLists.txt | 7 +++++++ 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'Firestore') diff --git a/Firestore/CMakeLists.txt b/Firestore/CMakeLists.txt index 28ac08f..d605411 100644 --- a/Firestore/CMakeLists.txt +++ b/Firestore/CMakeLists.txt @@ -64,8 +64,5 @@ include_directories(${FIREBASE_INSTALL_DIR}) # Fully qualified imports, project wide include_directories(${FIREBASE_SOURCE_DIR}) -# Include nanopb generated sources -include_directories(${FIREBASE_SOURCE_DIR}/Firestore/Protos/nanopb) - add_subdirectory(core) add_subdirectory(Protos) diff --git a/Firestore/Protos/CMakeLists.txt b/Firestore/Protos/CMakeLists.txt index f20f702..de33491 100644 --- a/Firestore/Protos/CMakeLists.txt +++ b/Firestore/Protos/CMakeLists.txt @@ -43,3 +43,10 @@ target_compile_definitions( firebase_firestore_protos_nanopb PUBLIC -DPB_FIELD_16BIT ) + +# TODO(rsgowman): this may be worth moving into cc_library, possibly via an +# INCLUDE_DIRS or similar. +target_include_directories( + firebase_firestore_protos_nanopb PUBLIC + ${FIREBASE_SOURCE_DIR}/Firestore/Protos/nanopb +) -- cgit v1.2.3