aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmake
diff options
context:
space:
mode:
authorGravatar Gil <mcg@google.com>2018-06-26 11:58:10 -0700
committerGravatar GitHub <noreply@github.com>2018-06-26 11:58:10 -0700
commit2810a09c582b09104c04f16e5a3086cbe3e79d23 (patch)
tree0f9d6fac5ae1c22dfe33d575ef186bd6df5db764 /cmake
parent6e3dc15ce702b2446e33e03ebe5e6d372c6a00a6 (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 'cmake')
-rw-r--r--cmake/FindFirebaseCore.cmake2
-rw-r--r--cmake/FindGRPC.cmake2
-rw-r--r--cmake/FindLevelDB.cmake2
-rw-r--r--cmake/FindNanopb.cmake2
-rw-r--r--cmake/FindProtobuf.cmake2
-rw-r--r--cmake/external/googletest.cmake2
-rw-r--r--cmake/external/leveldb.cmake4
-rw-r--r--cmake/external/nanopb.cmake4
-rw-r--r--cmake/external/protobuf.cmake2
9 files changed, 11 insertions, 11 deletions
diff --git a/cmake/FindFirebaseCore.cmake b/cmake/FindFirebaseCore.cmake
index eec29dd..6e68dfb 100644
--- a/cmake/FindFirebaseCore.cmake
+++ b/cmake/FindFirebaseCore.cmake
@@ -15,7 +15,7 @@
find_library(
FIREBASECORE_LIBRARY
FirebaseCore
- PATHS ${FIREBASE_INSTALL_DIR}/Frameworks
+ PATHS ${FIREBASE_BINARY_DIR}/Frameworks
)
include(FindPackageHandleStandardArgs)
diff --git a/cmake/FindGRPC.cmake b/cmake/FindGRPC.cmake
index f594b9e..22c9655 100644
--- a/cmake/FindGRPC.cmake
+++ b/cmake/FindGRPC.cmake
@@ -15,7 +15,7 @@
include(FindPackageHandleStandardArgs)
include(FindZLIB)
-set(BINARY_DIR ${FIREBASE_INSTALL_DIR}/external/grpc)
+set(BINARY_DIR ${FIREBASE_BINARY_DIR}/external/grpc)
## ZLIB
diff --git a/cmake/FindLevelDB.cmake b/cmake/FindLevelDB.cmake
index b664fa8..56f10e1 100644
--- a/cmake/FindLevelDB.cmake
+++ b/cmake/FindLevelDB.cmake
@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-set(binary_dir ${FIREBASE_INSTALL_DIR}/external/leveldb/src/leveldb)
+set(binary_dir ${FIREBASE_BINARY_DIR}/external/leveldb/src/leveldb)
find_path(
LEVELDB_INCLUDE_DIR leveldb/db.h
diff --git a/cmake/FindNanopb.cmake b/cmake/FindNanopb.cmake
index b5d844d..eb7dfad 100644
--- a/cmake/FindNanopb.cmake
+++ b/cmake/FindNanopb.cmake
@@ -14,7 +14,7 @@
include(FindPackageHandleStandardArgs)
-set(BINARY_DIR ${FIREBASE_INSTALL_DIR}/external/nanopb)
+set(BINARY_DIR ${FIREBASE_BINARY_DIR}/external/nanopb)
find_path(
NANOPB_INCLUDE_DIR pb.h
diff --git a/cmake/FindProtobuf.cmake b/cmake/FindProtobuf.cmake
index 60a2e34..ae438bb 100644
--- a/cmake/FindProtobuf.cmake
+++ b/cmake/FindProtobuf.cmake
@@ -14,7 +14,7 @@
include(FindPackageHandleStandardArgs)
-set(BINARY_DIR ${FIREBASE_INSTALL_DIR}/external/protobuf)
+set(BINARY_DIR ${FIREBASE_BINARY_DIR}/external/protobuf)
find_path(
PROTOBUF_INCLUDE_DIR google/protobuf/stubs/common.h
diff --git a/cmake/external/googletest.cmake b/cmake/external/googletest.cmake
index 24da386..f48c357 100644
--- a/cmake/external/googletest.cmake
+++ b/cmake/external/googletest.cmake
@@ -17,7 +17,7 @@ include(ExternalProject)
ExternalProject_Add(
googletest
- DOWNLOAD_DIR ${PROJECT_BINARY_DIR}/downloads
+ DOWNLOAD_DIR ${FIREBASE_DOWNLOAD_DIR}
DOWNLOAD_NAME googletest-1.8.0.tar.gz
URL https://github.com/google/googletest/archive/release-1.8.0.tar.gz
URL_HASH SHA256=58a6f4277ca2bc8565222b3bbd58a177609e9c488e8a72649359ba51450db7d8
diff --git a/cmake/external/leveldb.cmake b/cmake/external/leveldb.cmake
index dcbef6c..db8aa4c 100644
--- a/cmake/external/leveldb.cmake
+++ b/cmake/external/leveldb.cmake
@@ -44,12 +44,12 @@ else()
ExternalProject_Add(
leveldb
- DOWNLOAD_DIR ${PROJECT_BINARY_DIR}/downloads
+ DOWNLOAD_DIR ${FIREBASE_DOWNLOAD_DIR}
DOWNLOAD_NAME leveldb-v1.20.tar.gz
URL https://github.com/google/leveldb/archive/v1.20.tar.gz
URL_HASH SHA256=f5abe8b5b209c2f36560b75f32ce61412f39a2922f7045ae764a2c23335b6664
- PREFIX ${PROJECT_BINARY_DIR}/external/leveldb
+ PREFIX ${FIREBASE_BINARY_DIR}/external/leveldb
# LevelDB's configuration is done in the Makefile
CONFIGURE_COMMAND ""
diff --git a/cmake/external/nanopb.cmake b/cmake/external/nanopb.cmake
index 6ca47c0..368ecf0 100644
--- a/cmake/external/nanopb.cmake
+++ b/cmake/external/nanopb.cmake
@@ -16,7 +16,7 @@ include(ExternalProject)
set(
NANOPB_PROTOC_BIN
- ${FIREBASE_INSTALL_DIR}/external/protobuf/src/protobuf-build/${CMAKE_CFG_INTDIR}/protoc
+ ${FIREBASE_BINARY_DIR}/external/protobuf/src/protobuf-build/${CMAKE_CFG_INTDIR}/protoc
)
ExternalProject_Add(
@@ -24,7 +24,7 @@ ExternalProject_Add(
DEPENDS
protobuf
- DOWNLOAD_DIR ${PROJECT_BINARY_DIR}/downloads
+ DOWNLOAD_DIR ${FIREBASE_DOWNLOAD_DIR}
URL https://github.com/nanopb/nanopb/archive/nanopb-0.3.9.1.tar.gz
URL_HASH SHA256=67460d0c0ad331ef4d5369ad337056d0cd2f900c94887628d287eb56c69324bc
diff --git a/cmake/external/protobuf.cmake b/cmake/external/protobuf.cmake
index acc5a96..21cfac3 100644
--- a/cmake/external/protobuf.cmake
+++ b/cmake/external/protobuf.cmake
@@ -17,7 +17,7 @@ include(ExternalProject)
ExternalProject_Add(
protobuf
- DOWNLOAD_DIR ${PROJECT_BINARY_DIR}/downloads
+ DOWNLOAD_DIR ${FIREBASE_DOWNLOAD_DIR}
DOWNLOAD_NAME protobuf-v3.5.11.tar.gz
URL https://github.com/google/protobuf/archive/v3.5.1.1.tar.gz
URL_HASH SHA256=56b5d9e1ab2bf4f5736c4cfba9f4981fbc6976246721e7ded5602fbaee6d6869