diff --git a/admob/CMakeLists.txt b/admob/CMakeLists.txt index 8559caa154..aa4574e275 100644 --- a/admob/CMakeLists.txt +++ b/admob/CMakeLists.txt @@ -80,7 +80,7 @@ set_property(TARGET firebase_admob PROPERTY FOLDER "Firebase Cpp") # Set up the dependency on Firebase App. target_link_libraries(firebase_admob - firebase_app) + PUBLIC firebase_app) # Public headers all refer to each other relative to the src/include directory, # while private headers are relative to the entire C++ SDK directory. target_include_directories(firebase_admob @@ -104,11 +104,11 @@ if(ANDROID) firebase_cpp_proguard_file(admob) elseif(IOS) # AdMob for iOS uses weak references, which requires enabling Automatic - # Reference Counting (ARC). - set_property( - TARGET firebase_admob - APPEND_STRING PROPERTY - COMPILE_FLAGS "-fobjc-arc") + # Reference Counting (ARC). Also enable BitCode. + target_compile_options(firebase_admob + PUBLIC "-fobjc-arc" "-fembed-bitcode") + target_link_libraries(firebase_admob + PUBLIC "-fembed-bitcode") setup_pod_headers( firebase_admob diff --git a/analytics/CMakeLists.txt b/analytics/CMakeLists.txt index f98e76d24a..c1f0bb2d48 100644 --- a/analytics/CMakeLists.txt +++ b/analytics/CMakeLists.txt @@ -90,7 +90,7 @@ set_property(TARGET firebase_analytics PROPERTY FOLDER "Firebase Cpp") # Set up the dependency on Firebase App. target_link_libraries(firebase_analytics - firebase_app) + PUBLIC firebase_app) # Public headers all refer to each other relative to the src/include directory, # while private headers are relative to the entire C++ SDK directory. target_include_directories(firebase_analytics @@ -115,11 +115,11 @@ endif() if(ANDROID) firebase_cpp_proguard_file(analytics) elseif(IOS) - # Enable Automatic Reference Counting (ARC). - set_property( - TARGET firebase_analytics - APPEND_STRING PROPERTY - COMPILE_FLAGS "-fobjc-arc") + # Enable Automatic Reference Counting (ARC) and Bitcode. + target_compile_options(firebase_analytics + PUBLIC "-fobjc-arc" "-fembed-bitcode") + target_link_libraries(firebase_analytics + PUBLIC "-fembed-bitcode") setup_pod_headers( firebase_analytics diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index 4bf07ae5a8..29df483359 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -366,11 +366,11 @@ endif() if(ANDROID) firebase_cpp_proguard_file(app) elseif(IOS) - # Enable Automatic Reference Counting (ARC). - set_property( - TARGET firebase_app - APPEND_STRING PROPERTY - COMPILE_FLAGS "-fobjc-arc") + # Enable Automatic Reference Counting (ARC) and Bitcode. + target_compile_options(firebase_app + PUBLIC "-fobjc-arc" "-fembed-bitcode") + target_link_libraries(firebase_app + PUBLIC "-fembed-bitcode") # Add empty include path to get root include folder '.' setup_pod_headers( diff --git a/auth/CMakeLists.txt b/auth/CMakeLists.txt index 942f6f91bd..f1bd8fdce8 100644 --- a/auth/CMakeLists.txt +++ b/auth/CMakeLists.txt @@ -188,11 +188,11 @@ endif() if(ANDROID) firebase_cpp_proguard_file(auth) elseif(IOS) - # Enable Automatic Reference Counting (ARC). - set_property( - TARGET firebase_auth - APPEND_STRING PROPERTY - COMPILE_FLAGS "-fobjc-arc") + # Enable Automatic Reference Counting (ARC) and Bitcode. + target_compile_options(firebase_auth + PUBLIC "-fobjc-arc" "-fembed-bitcode") + target_link_libraries(firebase_auth + PUBLIC "-fembed-bitcode") setup_pod_headers( firebase_auth diff --git a/database/CMakeLists.txt b/database/CMakeLists.txt index 09c3236d47..9ffd4766ea 100644 --- a/database/CMakeLists.txt +++ b/database/CMakeLists.txt @@ -227,11 +227,11 @@ endif() if(ANDROID) firebase_cpp_proguard_file(database) elseif(IOS) - # Enable Automatic Reference Counting (ARC) - set_property( - TARGET firebase_database - APPEND_STRING PROPERTY - COMPILE_FLAGS "-fobjc-arc") + # Enable Automatic Reference Counting (ARC) and Bitcode. + target_compile_options(firebase_database + PUBLIC "-fobjc-arc" "-fembed-bitcode") + target_link_libraries(firebase_database + PUBLIC "-fembed-bitcode") setup_pod_headers( firebase_database diff --git a/dynamic_links/CMakeLists.txt b/dynamic_links/CMakeLists.txt index 012ebe8f35..01283f3f38 100644 --- a/dynamic_links/CMakeLists.txt +++ b/dynamic_links/CMakeLists.txt @@ -51,7 +51,7 @@ set_property(TARGET firebase_dynamic_links PROPERTY FOLDER "Firebase Cpp") # Set up the dependency on Firebase App. target_link_libraries(firebase_dynamic_links - firebase_app) + PUBLIC firebase_app) # Public headers all refer to each other relative to the src/include directory, # while private headers are relative to the entire C++ SDK directory. target_include_directories(firebase_dynamic_links @@ -74,11 +74,11 @@ endif() if(ANDROID) firebase_cpp_proguard_file(dynamic_links) elseif(IOS) - # Enable Automatic Reference Counting (ARC). - set_property( - TARGET firebase_dynamic_links - APPEND_STRING PROPERTY - COMPILE_FLAGS "-fobjc-arc") + # Enable Automatic Reference Counting (ARC) and Bitcode. + target_compile_options(firebase_dynamic_links + PUBLIC "-fobjc-arc" "-fembed-bitcode") + target_link_libraries(firebase_dynamic_links + PUBLIC "-fembed-bitcode") setup_pod_headers( firebase_dynamic_links diff --git a/firestore/CMakeLists.txt b/firestore/CMakeLists.txt index e114bd25b6..5ba76681a9 100644 --- a/firestore/CMakeLists.txt +++ b/firestore/CMakeLists.txt @@ -332,11 +332,11 @@ if(ANDROID) firebase_cpp_proguard_file(firestore) elseif(IOS) - # Enable Automatic Reference Counting (ARC). - set_property( - TARGET firebase_firestore - APPEND_STRING PROPERTY - COMPILE_FLAGS "-fobjc-arc") + # Enable Automatic Reference Counting (ARC) and Bitcode. + target_compile_options(firebase_firestore + PUBLIC "-fobjc-arc" "-fembed-bitcode") + target_link_libraries(firebase_firestore + PUBLIC "-fembed-bitcode") setup_pod_headers( firebase_firestore diff --git a/functions/CMakeLists.txt b/functions/CMakeLists.txt index 0f86ac3f4e..f5230a1b71 100644 --- a/functions/CMakeLists.txt +++ b/functions/CMakeLists.txt @@ -90,11 +90,11 @@ endif() if(ANDROID) firebase_cpp_proguard_file(functions) elseif(IOS) - # Enable Automatic Reference Counting (ARC). - set_property( - TARGET firebase_functions - APPEND_STRING PROPERTY - COMPILE_FLAGS "-fobjc-arc") + # Enable Automatic Reference Counting (ARC) and Bitcode. + target_compile_options(firebase_functions + PUBLIC "-fobjc-arc" "-fembed-bitcode") + target_link_libraries(firebase_functions + PUBLIC "-fembed-bitcode") setup_pod_headers( firebase_functions diff --git a/installations/CMakeLists.txt b/installations/CMakeLists.txt index 75bda4fc6f..cda7cca437 100644 --- a/installations/CMakeLists.txt +++ b/installations/CMakeLists.txt @@ -74,11 +74,11 @@ endif() if(ANDROID) firebase_cpp_proguard_file(installations) elseif(IOS) - # Enable Automatic Reference Counting (ARC). - set_property( - TARGET firebase_installations - APPEND_STRING PROPERTY - COMPILE_FLAGS "-fobjc-arc") + # Enable Automatic Reference Counting (ARC) and Bitcode. + target_compile_options(firebase_installations + PUBLIC "-fobjc-arc" "-fembed-bitcode") + target_link_libraries(firebase_installations + PUBLIC "-fembed-bitcode") setup_pod_headers( firebase_installations diff --git a/instance_id/CMakeLists.txt b/instance_id/CMakeLists.txt index 34d8d3a2db..c2ec0ade0c 100644 --- a/instance_id/CMakeLists.txt +++ b/instance_id/CMakeLists.txt @@ -87,11 +87,11 @@ endif() if(ANDROID) firebase_cpp_proguard_file(instance_id) elseif(IOS) - # Enable Automatic Reference Counting (ARC). - set_property( - TARGET firebase_instance_id - APPEND_STRING PROPERTY - COMPILE_FLAGS "-fobjc-arc") + # Enable Automatic Reference Counting (ARC) and Bitcode. + target_compile_options(firebase_instance_id + PUBLIC "-fobjc-arc" "-fembed-bitcode") + target_link_libraries(firebase_instance_id + PUBLIC "-fembed-bitcode") setup_pod_headers( firebase_instance_id diff --git a/messaging/CMakeLists.txt b/messaging/CMakeLists.txt index 1b97c4e44d..af993d499e 100644 --- a/messaging/CMakeLists.txt +++ b/messaging/CMakeLists.txt @@ -110,11 +110,11 @@ endif() if(ANDROID) firebase_cpp_proguard_file(messaging) elseif(IOS) - # Enable Automatic Reference Counting (ARC). - set_property( - TARGET firebase_messaging - APPEND_STRING PROPERTY - COMPILE_FLAGS "-fobjc-arc") + # Enable Automatic Reference Counting (ARC) and Bitcode. + target_compile_options(firebase_messaging + PUBLIC "-fobjc-arc" "-fembed-bitcode") + target_link_libraries(firebase_messaging + PUBLIC "-fembed-bitcode") setup_pod_headers( firebase_messaging diff --git a/remote_config/CMakeLists.txt b/remote_config/CMakeLists.txt index f0d3d684de..eefb79d02e 100644 --- a/remote_config/CMakeLists.txt +++ b/remote_config/CMakeLists.txt @@ -155,11 +155,11 @@ endif() if(ANDROID) firebase_cpp_proguard_file(remote_config) elseif(IOS) - # Enable Automatic Reference Counting (ARC). - set_property( - TARGET firebase_remote_config - APPEND_STRING PROPERTY - COMPILE_FLAGS "-fobjc-arc") + # Enable Automatic Reference Counting (ARC) and Bitcode. + target_compile_options(firebase_remote_config + PUBLIC "-fobjc-arc" "-fembed-bitcode") + target_link_libraries(firebase_remote_config + PUBLIC "-fembed-bitcode") setup_pod_headers( firebase_remote_config diff --git a/storage/CMakeLists.txt b/storage/CMakeLists.txt index 7f5b210648..65638e462c 100644 --- a/storage/CMakeLists.txt +++ b/storage/CMakeLists.txt @@ -118,11 +118,11 @@ endif() if(ANDROID) firebase_cpp_proguard_file(storage) elseif(IOS) - # Enable Automatic Reference Counting (ARC) - set_property( - TARGET firebase_storage - APPEND_STRING PROPERTY - COMPILE_FLAGS "-fobjc-arc") + # Enable Automatic Reference Counting (ARC) and Bitcode. + target_compile_options(firebase_storage + PUBLIC "-fobjc-arc" "-fembed-bitcode") + target_link_libraries(firebase_storage + PUBLIC "-fembed-bitcode") # Empty entry to point to the GTMSessionFetcher folder '.' setup_pod_headers(