Skip to content

Enable bitcode for iOS build. #276

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions admob/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
12 changes: 6 additions & 6 deletions analytics/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
10 changes: 5 additions & 5 deletions app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
10 changes: 5 additions & 5 deletions auth/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions database/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions dynamic_links/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
10 changes: 5 additions & 5 deletions firestore/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions functions/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions installations/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions instance_id/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions messaging/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions remote_config/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions storage/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down