Skip to content

Commit 21bafe8

Browse files
committed
Fix open source Firestore Android for building the testapp with
Couple of issues came up when building the testapp: the Firestore source directory variable wasn't being set in that case, and it was unnecessarily trying to build the Core Firestore for Android. PiperOrigin-RevId: 300421911
1 parent ecebfc5 commit 21bafe8

File tree

2 files changed

+3
-13
lines changed

2 files changed

+3
-13
lines changed

CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,12 @@ else()
127127
message(STATUS "Downloading external project dependencies...")
128128
download_external_sources()
129129
message(STATUS "Download complete.")
130+
131+
set(FIRESTORE_SOURCE_DIR ${FIREBASE_BINARY_DIR}/external/src/firestore)
130132
endif()
131133

132134
# Include Firestore's external build early to resolve conflicts on packages.
133135
if(NOT ANDROID AND FIREBASE_INCLUDE_FIRESTORE)
134-
set(FIRESTORE_SOURCE_DIR ${FIREBASE_BINARY_DIR}/external/src/firestore)
135136
set(FIRESTORE_BINARY_DIR ${FIRESTORE_SOURCE_DIR}-build)
136137

137138
set(

cmake/external_rules.cmake

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,20 +37,9 @@ function(download_external_sources)
3737
set(external_platform DESKTOP)
3838
endif()
3939

40-
# Prepare the Firestore CMake build as well.
40+
# When building with Firestore, use the NanoPB source from that instead.
4141
if(FIREBASE_INCLUDE_FIRESTORE)
4242
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-
5443
set(NANOPB_SOURCE_DIR ${FIRESTORE_BINARY_DIR}/external/src/nanopb)
5544
endif()
5645

0 commit comments

Comments
 (0)