@@ -44,15 +44,20 @@ option(FIREBASE_CPP_BUILD_TESTS
44
44
"Enable the Firebase C++ Build Tests." OFF )
45
45
option (FIREBASE_FORCE_FAKE_SECURE_STORAGE
46
46
"Disable use of platform secret store and use fake impl." OFF )
47
+ option (FIREBASE_CPP_BUILD_PACKAGE
48
+ "Bundle the Firebase C++ libraries into a zip file." OFF )
47
49
48
- if (WIN32 )
49
- # Turn on the use of the __cplusplus compiler define that is used to detect if
50
- # move operators are supported
51
- add_definitions ("/Zc:__cplusplus" )
52
- endif ()
50
+ # Define this directory to be the root of the C++ SDK, which the libraries can
51
+ # then refer to.
52
+ set (FIREBASE_CPP_SDK_ROOT_DIR ${CMAKE_CURRENT_LIST_DIR} )
53
+
54
+ project (firebase NONE)
55
+ enable_language (C)
56
+ enable_language (CXX)
53
57
54
58
list (INSERT CMAKE_MODULE_PATH 0 ${CMAKE_CURRENT_LIST_DIR} /cmake)
55
59
include (external_rules)
60
+ include (cpp_pack)
56
61
57
62
if (FIREBASE_CPP_BUILD_TESTS)
58
63
enable_testing ()
@@ -74,10 +79,6 @@ set(FIREBASE_GEN_FILE_DIR ${CMAKE_BINARY_DIR}/generated)
74
79
# Directory for any shared scripts.
75
80
set (FIREBASE_SCRIPT_DIR ${CMAKE_CURRENT_LIST_DIR} )
76
81
77
- project (firebase NONE)
78
- enable_language (C)
79
- enable_language (CXX)
80
-
81
82
if (FIREBASE_CPP_BUILD_TESTS AND MSVC )
82
83
# Googletest requires MSVC to compile with the static version of the runtime
83
84
# library, so define the appropriate runtime flag, before adding libraries.
@@ -94,7 +95,9 @@ set(FIREBASE_INSTALL_DIR ${PROJECT_BINARY_DIR}/opt)
94
95
set (FIREBASE_DOWNLOAD_DIR ${PROJECT_BINARY_DIR} /downloads)
95
96
96
97
# Run the CMake build logic that will download all the external dependencies.
98
+ message (STATUS "Downloading external project dependencies..." )
97
99
download_external_sources()
100
+ message (STATUS "Download complete." )
98
101
99
102
# Disable the Flatbuffer build tests, install and flathash
100
103
set (FLATBUFFERS_BUILD_TESTS OFF CACHE BOOL "" )
@@ -264,10 +267,6 @@ else()
264
267
set (FIREBASE_FLATBUFFERS_DEPENDENCIES "" )
265
268
endif ()
266
269
267
- # Define this directory to be the root of the C++ SDK, which the libraries can
268
- # then refer to.
269
- set (FIREBASE_CPP_SDK_ROOT_DIR ${CMAKE_CURRENT_LIST_DIR} )
270
-
271
270
include (binary_to_array)
272
271
include (firebase_cpp_gradle)
273
272
@@ -311,3 +310,10 @@ endif()
311
310
if (FIREBASE_INCLUDE_STORAGE)
312
311
add_subdirectory (storage)
313
312
endif ()
313
+
314
+ # Place the CMake and gradle build files provided to easily link against the
315
+ # prebuilt libraries at the root of the package.
316
+ cpp_pack_dir(
317
+ "${CMAKE_CURRENT_LIST_DIR} /release_build_files/"
318
+ .
319
+ )
0 commit comments