File tree Expand file tree Collapse file tree 3 files changed +58
-1
lines changed Expand file tree Collapse file tree 3 files changed +58
-1
lines changed Original file line number Diff line number Diff line change 1
- # Copyright 2018 Google
1
+ # Copyright 2018 Google LLC
2
2
#
3
3
# Licensed under the Apache License, Version 2.0 (the "License");
4
4
# you may not use this file except in compliance with the License.
@@ -23,6 +23,7 @@ project(Firebase-cpp-download C CXX)
23
23
list (APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR} )
24
24
25
25
include (flatbuffers )
26
+ include (firestore )
26
27
27
28
28
29
# Some of the external dependencies are not needed for mobile.
Original file line number Diff line number Diff line change
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ include (ExternalProject )
16
+
17
+ if (TARGET firestore )
18
+ return ()
19
+ endif ()
20
+
21
+ # Pin to the first revision that including
22
+ # https://github.com/firebase/firebase-ios-sdk/pull/4984, that contains all the
23
+ # fixes required to operate as an external build from within this repo.
24
+ set (version d4e86ba091b0aeccfcdcf9d344338564f45c21c1 )
25
+
26
+ ExternalProject_Add (
27
+ firestore
28
+
29
+ DOWNLOAD_DIR ${FIREBASE_DOWNLOAD_DIR}
30
+ DOWNLOAD_NAME firestore-${version}.tar.gz
31
+ URL https://github.com/firebase/firebase-ios-sdk/archive/${version}.tar.gz
32
+
33
+ PREFIX ${PROJECT_BINARY_DIR}
34
+
35
+ CONFIGURE_COMMAND ""
36
+ BUILD_COMMAND ""
37
+ INSTALL_COMMAND ""
38
+ TEST_COMMAND ""
39
+ )
Original file line number Diff line number Diff line change @@ -37,6 +37,23 @@ function(download_external_sources)
37
37
set (external_platform DESKTOP )
38
38
endif ()
39
39
40
+ # Prepare the Firestore CMake build as well.
41
+ if (FIREBASE_INCLUDE_FIRESTORE )
42
+ set (FIRESTORE_BINARY_DIR ${PROJECT_BINARY_DIR} /external/src/firestore-build )
43
+
44
+ execute_process (
45
+ COMMAND
46
+ ${ENV_COMMAND} cmake
47
+ -DFIREBASE_DOWNLOAD_DIR=${FIREBASE_DOWNLOAD_DIR}
48
+ -DCMAKE_INSTALL_PREFIX=${FIREBASE_INSTALL_DIR}
49
+ ${PROJECT_BINARY_DIR} /external/src/firestore
50
+
51
+ WORKING_DIRECTORY ${FIRESTORE_BINARY_DIR}
52
+ )
53
+
54
+ set (NANOPB_SRC_DIR ${FIRESTORE_BINARY_DIR} /external/src/nanopb )
55
+ endif ()
56
+
40
57
# Set variables to indicate if local versions of third party libraries should
41
58
# be used instead of downloading them.
42
59
function (check_use_local_directory NAME )
You can’t perform that action at this time.
0 commit comments