Skip to content

Commit fbd275b

Browse files
authored
Merge pull request #82 from firebase/feature/monoupdate
Multiple Build fix
2 parents 8df9c42 + 26cf989 commit fbd275b

File tree

7 files changed

+55
-13
lines changed

7 files changed

+55
-13
lines changed

.github/workflows/sdk_build.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ on:
77
# Which version of Unity to use
88
unity_version:
99
description: 'Unity version'
10-
default: '2017.4.40f1'
10+
default: '2019.4.30f1'
1111
required: true
1212
# Linux uses a different number for its versions
1313
linux_unity_version:
1414
description: 'Linux Unity version'
15-
default: '2017.4.10f1'
15+
default: '2019.4.32f1'
1616
required: true
1717
# Additional CMake flags to use
1818
additional_cmake_flags:
@@ -27,20 +27,23 @@ jobs:
2727
strategy:
2828
fail-fast: false
2929
matrix:
30-
os: [windows-latest, macos-latest, ubuntu-latest]
30+
os: [macos-latest, windows-latest, ubuntu-latest]
3131
include:
32-
- os: windows-latest
33-
unity_version: ${{ github.event.inputs.unity_version }}
34-
unity_install_dir: TBD
35-
build_dir: windows_unity
3632
- os: macos-latest
3733
unity_version: ${{ github.event.inputs.unity_version }}
3834
unity_install_dir: /Applications/Unity_${{ github.event.inputs.unity_version }}
3935
build_dir: macos_unity
36+
unity_platform_name: macOS,iOS
37+
- os: windows-latest
38+
unity_version: ${{ github.event.inputs.unity_version }}
39+
unity_install_dir: TBD
40+
build_dir: windows_unity
41+
unity_platform_name: Windows
4042
- os: ubuntu-latest
4143
unity_version: ${{ github.event.inputs.linux_unity_version }}
4244
unity_install_dir: /opt/unity-editor-${{ github.event.inputs.linux_unity_version }}
4345
build_dir: linux_unity
46+
unity_platform_name: Linux
4447
env:
4548
# LC_ALL, LANG and U3D_PASSWORD are needed for U3D.
4649
LC_ALL: en_US.UTF-8
@@ -84,7 +87,7 @@ jobs:
8487
- name: Install Unity
8588
shell: bash
8689
run: |
87-
python scripts/gha/unity_installer.py --install --platforms "Desktop" --version ${{ matrix.unity_version }}
90+
python scripts/gha/unity_installer.py --install --platforms ${{ matrix.unity_platform_name }} --version ${{ matrix.unity_version }}
8891
- name: Setup Unity path
8992
shell: bash
9093
run: |

cmake/build_shared.cmake

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,34 @@ function(build_firebase_shared LIBRARY_NAME ARTIFACT_NAME OUTPUT_NAME)
3232
target_link_libraries(${shared_target}
3333
"firebase_${LIBRARY_NAME}_swig"
3434
)
35-
set_target_properties(${shared_target}
35+
36+
set_target_properties(${shared_target}
3637
PROPERTIES
3738
OUTPUT_NAME "${OUTPUT_NAME}"
38-
PREFIX "lib"
3939
)
40+
if(APPLE AND NOT FIREBASE_IOS_BUILD)
41+
# Other approach like set target link or set BUNDLE property fail due to
42+
# trying to treat the bundle as a directory instead of a file.
43+
# Only override suffix produces a single file bundle.
44+
set_target_properties(${shared_target}
45+
PROPERTIES
46+
PREFIX ""
47+
SUFFIX ".bundle"
48+
)
49+
elseif(FIREBASE_IOS_BUILD)
50+
set_target_properties(${shared_target}
51+
PROPERTIES
52+
PREFIX "lib"
53+
SUFFIX ".a"
54+
)
55+
else()
56+
set_target_properties(${shared_target}
57+
PROPERTIES
58+
PREFIX "lib"
59+
)
60+
endif()
61+
62+
unity_pack_native(${shared_target})
4063

4164
if(ANDROID)
4265
# Build the srcaar, and package it with CPack.

cmake/firebase_unity_version.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
# This file defines the version numbers used by the Firebase Unity SDK.
1616

17-
set(FIREBASE_UNITY_SDK_VERSION "8.1.0"
17+
set(FIREBASE_UNITY_SDK_VERSION "8.5.0"
1818
CACHE STRING "The version of the Unity SDK, used in the names of files.")
1919

2020
set(FIREBASE_IOS_POD_VERSION "8.3.0"

cmake/unity_pack.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ if(FIREBASE_IOS_BUILD)
3737
set(UNITY_PACK_NATIVE_DIR "Plugins/iOS/Firebase")
3838
elseif("${CMAKE_GENERATOR_PLATFORM}" STREQUAL "x64" OR
3939
"${CMAKE_GENERATOR_PLATFORM}" STREQUAL "")
40-
set(UNITY_PACK_NATIVE_DIR "Plugins/x86_64")
40+
set(UNITY_PACK_NATIVE_DIR "Firebase/Plugins/x86_64")
4141
else()
42-
set(UNITY_PACK_NATIVE_DIR "Plugins/x86_32")
42+
set(UNITY_PACK_NATIVE_DIR "Firebase/Plugins/x86_32")
4343
endif()
4444

4545
if(FIREBASE_IOS_BUILD)

firestore/src/swig/CMakeLists.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,3 +96,17 @@ add_custom_target(
9696

9797
add_dependencies(firebase_firestore_swig_cpp FIREBASE_FIRESTORE_SWIG_CPP_HEADERS)
9898

99+
if(IOS)
100+
# Enable Automatic Reference Counting (ARC).
101+
set_property(
102+
TARGET firebase_firestore
103+
APPEND_STRING PROPERTY
104+
COMPILE_FLAGS "-fobjc-arc")
105+
106+
setup_pod_headers(
107+
firebase_firestore
108+
POD_NAMES
109+
FirebaseFirestore
110+
)
111+
endif()
112+

remote_config/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ set(firebase_remote_config_swig
2525
set(firebase_remote_config_src
2626
src/ConfigSettings.cs
2727
src/ConfigValue.cs
28+
src/FirebaseRemoteConfig.cs
2829
)
2930

3031
firebase_swig_add_library(firebase_remote_config_swig

scripts/gha/print_matrix_configuration.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@
8181
UNITY_PACKAGES = {
8282
"2020.3.19f1": {"Default": ["Unity"], "Android": ["Android"], "iOS": ["Ios"], "Windows": ["Windows-mono"], "macOS": None, "Linux": ["Linux-mono"]},
8383
"2019.4.30f1": {"Default": ["Unity"], "Android": ["Android"], "iOS": ["Ios"], "Windows": ["Windows-mono"], "macOS": None, "Linux": ["Linux-mono"]},
84+
"2019.4.32f1": {"Default": ["Unity"], "Android": ["Android"], "iOS": ["Ios"], "Windows": ["Windows-mono"], "macOS": None, "Linux": ["linux-il2cpp"]},
8485
"2018.4.36f1": {"Default": ["Unity"], "Android": ["Android"], "iOS": ["Ios"], "Windows": ["Windows-mono"], "macOS": None, "Linux": ["Linux"]},
8586
"2017.4.40f1": {"Default": ["Unity"], "Android": ["Android"], "iOS": ["Ios"], "Windows": ["Windows"], "macOS": None, "Linux": ["Linux"]}
8687
}

0 commit comments

Comments
 (0)