diff options
author | Gil <mcg@google.com> | 2018-06-26 11:58:10 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-26 11:58:10 -0700 |
commit | 2810a09c582b09104c04f16e5a3086cbe3e79d23 (patch) | |
tree | 0f9d6fac5ae1c22dfe33d575ef186bd6df5db764 /Firestore | |
parent | 6e3dc15ce702b2446e33e03ebe5e6d372c6a00a6 (diff) |
Prepare for installed sub-projects (#1459)
* Ignore vim backup files
* Prepare for installed subprojects
This adds FIREBASE_BINARY_DIR to point to the out-of-source build
directory (which previously was passed around as FIREBASE_INSTALL_DIR).
This repurposes FIREBASE_INSTALL_DIR to point to
${FIREBASE_BINARY_DIR}/opt, and installation root for subprojects that
have an install step.
* Allow download directory to be specified
Diffstat (limited to 'Firestore')
-rw-r--r-- | Firestore/CMakeLists.txt | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/Firestore/CMakeLists.txt b/Firestore/CMakeLists.txt index 652b895..8b6f9d5 100644 --- a/Firestore/CMakeLists.txt +++ b/Firestore/CMakeLists.txt @@ -65,13 +65,20 @@ set(FIREBASE_SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/..) # # If you want to use this project directly in e.g. CLion, make sure you # configure this. +# +# The superbuild passes CMAKE_INSTALL_PREFIX with a value of +# ${FIREBASE_INSTALL_DIR} which is ${PROJECT_BINARY_DIR}/opt. set(FIREBASE_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}) +# Expect that the source and binary directory structures will parallel each +# other. +set(FIREBASE_BINARY_DIR ${PROJECT_BINARY_DIR}/..) + list(INSERT CMAKE_MODULE_PATH 0 ${FIREBASE_SOURCE_DIR}/cmake) include(utils) # Include GoogleTest directly in the build. -set(gtest_dir ${FIREBASE_INSTALL_DIR}/external/googletest) +set(gtest_dir ${FIREBASE_BINARY_DIR}/external/googletest) add_subdirectory( ${gtest_dir}/src/googletest ${gtest_dir}/src/googletest-build @@ -101,8 +108,11 @@ add_subdirectory(third_party/abseil-cpp) include(CompilerSetup) +# Superbuild installed results +include_directories(${FIREBASE_INSTALL_DIR}/include) + # Generated sources will be relative to the binary directory. -include_directories(${FIREBASE_INSTALL_DIR}) +include_directories(${FIREBASE_BINARY_DIR}) # Fully qualified imports, project wide include_directories(${FIREBASE_SOURCE_DIR}) |