Skip to content

Commit 8ff01e2

Browse files
committed
[PR 2 & PR 3] Universally enforce native framework output properties
1 parent e3f4550 commit 8ff01e2

12 files changed

Lines changed: 60 additions & 121 deletions

File tree

‎analytics/CMakeLists.txt‎

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -121,12 +121,6 @@ target_compile_definitions(firebase_analytics
121121
PRIVATE
122122
-DINTERNAL_EXPERIMENTAL=1
123123
)
124-
# Automatically include headers that might not be declared.
125-
if(MSVC)
126-
add_definitions(/FI"assert.h" /FI"string.h" /FI"stdint.h")
127-
else()
128-
add_definitions(-include assert.h -include string.h)
129-
endif()
130124

131125
if(ANDROID)
132126
firebase_cpp_proguard_file(analytics)
@@ -144,11 +138,11 @@ elseif(IOS)
144138
FirebaseAnalytics
145139
)
146140

147-
if (FIREBASE_XCODE_TARGET_FORMAT STREQUAL "frameworks")
148-
set_target_properties(firebase_analytics PROPERTIES
149-
FRAMEWORK TRUE
150-
)
151-
endif()
141+
# Enforce standard framework bundling and Apple casing natively
142+
set_target_properties(firebase_analytics PROPERTIES
143+
FRAMEWORK TRUE
144+
OUTPUT_NAME "FirebaseAnalytics"
145+
)
152146
endif()
153147

154148
if(FIREBASE_CPP_BUILD_TESTS)

‎app/CMakeLists.txt‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,8 @@ add_library(firebase_app STATIC
321321
${app_flatbuffers_srcs})
322322

323323
set_property(TARGET firebase_app PROPERTY FOLDER "Firebase Cpp")
324+
set_target_properties(firebase_app PROPERTIES OUTPUT_NAME "firebase")
325+
324326

325327
# Disable exceptions in std
326328
if (MSVC)
@@ -410,12 +412,10 @@ if (NOT ANDROID AND NOT IOS)
410412
endif()
411413

412414
if (IOS)
413-
# IOS build framework
414-
if (FIREBASE_XCODE_TARGET_FORMAT STREQUAL "frameworks")
415-
set_target_properties(firebase_app PROPERTIES
416-
FRAMEWORK TRUE
417-
)
418-
endif()
415+
# Enforce native framework bundling properties unconditionally
416+
set_target_properties(firebase_app PROPERTIES
417+
FRAMEWORK TRUE
418+
)
419419

420420
# Generate the analytics header file
421421
# Copy from analytics/CMakeList.txt

‎app_check/CMakeLists.txt‎

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -161,12 +161,7 @@ target_compile_definitions(firebase_app_check
161161
PRIVATE
162162
-DINTERNAL_EXPERIMENTAL=1
163163
)
164-
# Automatically include headers that might not be declared.
165-
if(MSVC)
166-
add_definitions(/FI"assert.h" /FI"string.h" /FI"stdint.h")
167-
else()
168-
add_definitions(-include assert.h -include string.h)
169-
endif()
164+
170165

171166
if(ANDROID)
172167
firebase_cpp_proguard_file(app_check)
@@ -186,11 +181,10 @@ elseif(IOS)
186181
INCLUDE_PRIVATE_HEADERS
187182
)
188183

189-
if (FIREBASE_XCODE_TARGET_FORMAT STREQUAL "frameworks")
190-
set_target_properties(firebase_app_check PROPERTIES
191-
FRAMEWORK TRUE
192-
)
193-
endif()
184+
set_target_properties(firebase_app_check PROPERTIES
185+
OUTPUT_NAME "FirebaseAppCheck"
186+
FRAMEWORK TRUE
187+
)
194188
endif()
195189

196190
cpp_pack_library(firebase_app_check "")

‎auth/CMakeLists.txt‎

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -181,12 +181,7 @@ target_compile_definitions(firebase_auth
181181
PRIVATE
182182
-DINTERNAL_EXPERIMENTAL=1
183183
)
184-
# Automatically include headers that might not be declared.
185-
if(MSVC)
186-
add_definitions(/FI"assert.h" /FI"string.h" /FI"stdint.h")
187-
else()
188-
add_definitions(-include assert.h -include string.h)
189-
endif()
184+
190185

191186
if(ANDROID)
192187
firebase_cpp_proguard_file(auth)
@@ -204,11 +199,10 @@ elseif(IOS)
204199
FirebaseAuth
205200
FirebaseAuthInterop/FirebaseAuth/Interop
206201
)
207-
if (FIREBASE_XCODE_TARGET_FORMAT STREQUAL "frameworks")
208-
set_target_properties(firebase_auth PROPERTIES
209-
FRAMEWORK TRUE
210-
)
211-
endif()
202+
set_target_properties(firebase_auth PROPERTIES
203+
OUTPUT_NAME "FirebaseAuth"
204+
FRAMEWORK TRUE
205+
)
212206
endif()
213207

214208
if(FIREBASE_CPP_BUILD_TESTS)

‎database/CMakeLists.txt‎

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -216,12 +216,7 @@ target_compile_definitions(firebase_database
216216
-DINTERNAL_EXPERIMENTAL=1
217217
${additional_DEFINES}
218218
)
219-
# Automatically include headers that might not be declared.
220-
if(MSVC)
221-
add_definitions(/FI"assert.h" /FI"string.h" /FI"stdint.h")
222-
else()
223-
add_definitions(-include assert.h -include string.h)
224-
endif()
219+
225220

226221
if(ANDROID)
227222
firebase_cpp_proguard_file(database)
@@ -238,11 +233,10 @@ elseif(IOS)
238233
FirebaseCore
239234
FirebaseDatabase
240235
)
241-
if (FIREBASE_XCODE_TARGET_FORMAT STREQUAL "frameworks")
242-
set_target_properties(firebase_database PROPERTIES
243-
FRAMEWORK TRUE
244-
)
245-
endif()
236+
set_target_properties(firebase_database PROPERTIES
237+
OUTPUT_NAME "FirebaseDatabase"
238+
FRAMEWORK TRUE
239+
)
246240
endif()
247241

248242
if(FIREBASE_CPP_BUILD_TESTS)

‎firestore/CMakeLists.txt‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -440,11 +440,10 @@ elseif(IOS)
440440
FirebaseCoreExtension/FirebaseCore/Extension
441441
)
442442

443-
if (FIREBASE_XCODE_TARGET_FORMAT STREQUAL "frameworks")
444-
set_target_properties(firebase_firestore PROPERTIES
445-
FRAMEWORK TRUE
446-
)
447-
endif()
443+
set_target_properties(firebase_firestore PROPERTIES
444+
OUTPUT_NAME "FirebaseFirestore"
445+
FRAMEWORK TRUE
446+
)
448447
endif()
449448

450449
cpp_pack_library(firebase_firestore "")

‎functions/CMakeLists.txt‎

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,7 @@ target_compile_definitions(firebase_functions
8181
PRIVATE
8282
-DINTERNAL_EXPERIMENTAL=1
8383
)
84-
# Automatically include headers that might not be declared.
85-
if(MSVC)
86-
add_definitions(/FI"assert.h" /FI"string.h" /FI"stdint.h")
87-
else()
88-
add_definitions(-include assert.h -include string.h)
89-
endif()
84+
9085

9186
if(ANDROID)
9287
firebase_cpp_proguard_file(functions)
@@ -104,11 +99,10 @@ elseif(IOS)
10499
FirebaseFunctions
105100
)
106101

107-
if (FIREBASE_XCODE_TARGET_FORMAT STREQUAL "frameworks")
108-
set_target_properties(firebase_functions PROPERTIES
109-
FRAMEWORK TRUE
110-
)
111-
endif()
102+
set_target_properties(firebase_functions PROPERTIES
103+
OUTPUT_NAME "FirebaseFunctions"
104+
FRAMEWORK TRUE
105+
)
112106
endif()
113107

114108
cpp_pack_library(firebase_functions "")

‎installations/CMakeLists.txt‎

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,7 @@ target_compile_definitions(firebase_installations
6464
PRIVATE
6565
-DINTERNAL_EXPERIMENTAL=1
6666
)
67-
# Automatically include headers that might not be declared.
68-
if(MSVC)
69-
add_definitions(/FI"assert.h" /FI"string.h" /FI"stdint.h")
70-
else()
71-
add_definitions(-include assert.h -include string.h)
72-
endif()
67+
7368

7469
if(ANDROID)
7570
firebase_cpp_proguard_file(installations)
@@ -87,11 +82,10 @@ elseif(IOS)
8782
FirebaseInstallations
8883
)
8984

90-
if (FIREBASE_XCODE_TARGET_FORMAT STREQUAL "frameworks")
91-
set_target_properties(firebase_installations PROPERTIES
92-
FRAMEWORK TRUE
93-
)
94-
endif()
85+
set_target_properties(firebase_installations PROPERTIES
86+
OUTPUT_NAME "FirebaseInstallations"
87+
FRAMEWORK TRUE
88+
)
9589
endif()
9690

9791
if(FIREBASE_CPP_BUILD_TESTS)

‎messaging/CMakeLists.txt‎

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,7 @@ target_compile_definitions(firebase_messaging
100100
PRIVATE
101101
-DINTERNAL_EXPERIMENTAL=1
102102
)
103-
# Automatically include headers that might not be declared.
104-
if(MSVC)
105-
add_definitions(/FI"assert.h" /FI"string.h" /FI"stdint.h")
106-
else()
107-
add_definitions(-include assert.h -include string.h)
108-
endif()
103+
109104

110105
if(ANDROID)
111106
firebase_cpp_proguard_file(messaging)
@@ -136,11 +131,10 @@ elseif(IOS)
136131
FirebaseMessaging
137132
)
138133

139-
if (FIREBASE_XCODE_TARGET_FORMAT STREQUAL "frameworks")
140-
set_target_properties(firebase_messaging PROPERTIES
141-
FRAMEWORK TRUE
142-
)
143-
endif()
134+
set_target_properties(firebase_messaging PROPERTIES
135+
OUTPUT_NAME "FirebaseMessaging"
136+
FRAMEWORK TRUE
137+
)
144138
endif()
145139

146140
if(FIREBASE_CPP_BUILD_TESTS)

‎remote_config/CMakeLists.txt‎

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -139,12 +139,7 @@ target_compile_definitions(firebase_remote_config
139139
PRIVATE
140140
-DINTERNAL_EXPERIMENTAL=1
141141
)
142-
# Automatically include headers that might not be declared.
143-
if(MSVC)
144-
add_definitions(/FI"assert.h" /FI"string.h" /FI"stdint.h")
145-
else()
146-
add_definitions(-include assert.h -include string.h)
147-
endif()
142+
148143

149144
if(ANDROID)
150145
firebase_cpp_proguard_file(remote_config)
@@ -162,11 +157,10 @@ elseif(IOS)
162157
FirebaseRemoteConfig
163158
)
164159

165-
if (FIREBASE_XCODE_TARGET_FORMAT STREQUAL "frameworks")
166-
set_target_properties(firebase_remote_config PROPERTIES
167-
FRAMEWORK TRUE
168-
)
169-
endif()
160+
set_target_properties(firebase_remote_config PROPERTIES
161+
OUTPUT_NAME "FirebaseRemoteConfig"
162+
FRAMEWORK TRUE
163+
)
170164
endif()
171165

172166
if(FIREBASE_CPP_BUILD_TESTS)

0 commit comments

Comments
 (0)