@@ -44,15 +44,20 @@ option(FIREBASE_CPP_BUILD_TESTS
4444 "Enable the Firebase C++ Build Tests." OFF )
4545option (FIREBASE_FORCE_FAKE_SECURE_STORAGE
4646 "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 )
4749
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)
5357
5458list (INSERT CMAKE_MODULE_PATH 0 ${CMAKE_CURRENT_LIST_DIR} /cmake)
5559include (external_rules)
60+ include (cpp_pack)
5661
5762if (FIREBASE_CPP_BUILD_TESTS)
5863 enable_testing ()
@@ -74,10 +79,6 @@ set(FIREBASE_GEN_FILE_DIR ${CMAKE_BINARY_DIR}/generated)
7479# Directory for any shared scripts.
7580set (FIREBASE_SCRIPT_DIR ${CMAKE_CURRENT_LIST_DIR} )
7681
77- project (firebase NONE)
78- enable_language (C)
79- enable_language (CXX)
80-
8182if (FIREBASE_CPP_BUILD_TESTS AND MSVC )
8283 # Googletest requires MSVC to compile with the static version of the runtime
8384 # library, so define the appropriate runtime flag, before adding libraries.
@@ -94,7 +95,9 @@ set(FIREBASE_INSTALL_DIR ${PROJECT_BINARY_DIR}/opt)
9495set (FIREBASE_DOWNLOAD_DIR ${PROJECT_BINARY_DIR} /downloads)
9596
9697# Run the CMake build logic that will download all the external dependencies.
98+ message (STATUS "Downloading external project dependencies..." )
9799download_external_sources()
100+ message (STATUS "Download complete." )
98101
99102# Disable the Flatbuffer build tests, install and flathash
100103set (FLATBUFFERS_BUILD_TESTS OFF CACHE BOOL "" )
@@ -264,10 +267,6 @@ else()
264267 set (FIREBASE_FLATBUFFERS_DEPENDENCIES "" )
265268endif ()
266269
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-
271270include (binary_to_array)
272271include (firebase_cpp_gradle)
273272
@@ -311,3 +310,10 @@ endif()
311310if (FIREBASE_INCLUDE_STORAGE)
312311 add_subdirectory (storage)
313312endif ()
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