Skip to content

Commit a2d38c5

Browse files
authored
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
1 parent 8903212 commit a2d38c5

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

Firestore/CMakeLists.txt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,26 @@ podspec_framework(
144144
${FIREBASE_SOURCE_DIR}/FirebaseCore.podspec
145145
)
146146

147+
podspec_framework(
148+
${FIREBASE_SOURCE_DIR}/FirebaseAuthInterop.podspec
149+
)
150+
151+
# FirebaseAuthInterop has no source files but CMake can't build frameworks that don't
152+
# have sources. Generate an inconsequential source file so that the library can
153+
# be linked.
154+
file(
155+
WRITE ${CMAKE_CURRENT_BINARY_DIR}/FirebaseAuthInteropDummy.c
156+
"// generated file for header-only CMake support.
157+
__attribute__((unused))
158+
static void FirebaseAuthInteropFakeSymbol() {}
159+
"
160+
)
161+
target_sources(
162+
FirebaseAuthInterop
163+
PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/FirebaseAuthInteropDummy.c
164+
)
165+
166+
147167
# Superbuild installed results
148168
include_directories(${FIREBASE_INSTALL_DIR}/include)
149169

scripts/if_changed.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ else
5454
;;
5555

5656
Firestore-cmake)
57-
check_changes '^Firestore/(core|third_party)'
57+
check_changes '^(Firestore/(core|third_party)|cmake)'
5858
;;
5959

6060
*)

0 commit comments

Comments
 (0)