aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGil <mcg@google.com>2018-07-17 11:36:56 -0700
committerGitHub <noreply@github.com>2018-07-17 11:36:56 -0700
commita2d38c56790231c393daebdb810ba55836aae405 (patch)
tree65c11b7ddfccab784f48818cec0a820893123bdf
parent890321214cc8340c9eb02712f63799085f3ea112 (diff)
Implement a CMake build for FirebaseAuthInterop (#1532)
* Add a CMake build for FirebaseAuthInterop * Avoid cluttering the symbol table * Trigger Firestore-cmake checks on cmake script changes
-rw-r--r--Firestore/CMakeLists.txt20
-rwxr-xr-xscripts/if_changed.sh2
2 files changed, 21 insertions, 1 deletions
diff --git a/Firestore/CMakeLists.txt b/Firestore/CMakeLists.txt
index 21bff1f..fe7d8f4 100644
--- a/Firestore/CMakeLists.txt
+++ b/Firestore/CMakeLists.txt
@@ -144,6 +144,26 @@ podspec_framework(
${FIREBASE_SOURCE_DIR}/FirebaseCore.podspec
)
+podspec_framework(
+ ${FIREBASE_SOURCE_DIR}/FirebaseAuthInterop.podspec
+)
+
+# FirebaseAuthInterop has no source files but CMake can't build frameworks that don't
+# have sources. Generate an inconsequential source file so that the library can
+# be linked.
+file(
+ WRITE ${CMAKE_CURRENT_BINARY_DIR}/FirebaseAuthInteropDummy.c
+ "// generated file for header-only CMake support.
+ __attribute__((unused))
+ static void FirebaseAuthInteropFakeSymbol() {}
+ "
+)
+target_sources(
+ FirebaseAuthInterop
+ PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/FirebaseAuthInteropDummy.c
+)
+
+
# Superbuild installed results
include_directories(${FIREBASE_INSTALL_DIR}/include)
diff --git a/scripts/if_changed.sh b/scripts/if_changed.sh
index e0e2a18..9ba7b51 100755
--- a/scripts/if_changed.sh
+++ b/scripts/if_changed.sh
@@ -54,7 +54,7 @@ else
;;
Firestore-cmake)
- check_changes '^Firestore/(core|third_party)'
+ check_changes '^(Firestore/(core|third_party)|cmake)'
;;
*)