From 13646feed414424bcb04e355dcfbbe8f7a4f10bc Mon Sep 17 00:00:00 2001 From: Cynthia Jiang Date: Tue, 18 May 2021 10:24:49 -0700 Subject: [PATCH 1/2] Build cpp lib first for android --- build_android.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build_android.sh b/build_android.sh index 3cc0928f3..f04a7dfbf 100755 --- a/build_android.sh +++ b/build_android.sh @@ -32,6 +32,9 @@ CMAKE_OPTIONS= if [ -d "../firebase-cpp-sdk" ]; then CMAKE_OPTIONS="-DFIREBASE_CPP_SDK_DIR=`realpath ../firebase-cpp-sdk` " + cd ../firebase-cpp-sdk + ./gradlew + cd ../firebase-unity-sdk fi shopt -s nullglob From 0884b3a3d13d059794e3758a5f0411074380621d Mon Sep 17 00:00:00 2001 From: Cynthia Jiang Date: Tue, 18 May 2021 16:32:04 -0700 Subject: [PATCH 2/2] Only check ios dll on apple platform --- cmake/FindUnityMono.cmake | 2 +- external/CMakeLists.txt | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/cmake/FindUnityMono.cmake b/cmake/FindUnityMono.cmake index c94627ce1..62a80fa43 100644 --- a/cmake/FindUnityMono.cmake +++ b/cmake/FindUnityMono.cmake @@ -113,7 +113,7 @@ if(FIREBASE_INCLUDE_UNITY) See the readme.md for more information.") endif() - if(NOT EXISTS ${UNITY_EDITOR_IOS_XCODE_DLL}) + if(APPLE AND NOT EXISTS ${UNITY_EDITOR_IOS_XCODE_DLL}) message(FATAL_ERROR "Fail to find UnityEditor.iOS.Extensions.Xcode.dll. \ Please install iOS build support from Unity.") endif() diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt index b36e90698..e8ed38137 100644 --- a/external/CMakeLists.txt +++ b/external/CMakeLists.txt @@ -17,7 +17,10 @@ mono_add_external_dll(unity_editor_cs "${UNITY_EDITOR_DLL}") mono_add_external_dll(unity_engine_cs "${UNITY_ENGINE_DLL}") -mono_add_external_dll(unity_ios_extensions_xcode_cs "${UNITY_EDITOR_IOS_XCODE_DLL}") + +if(APPLE) + mono_add_external_dll(unity_ios_extensions_xcode_cs "${UNITY_EDITOR_IOS_XCODE_DLL}") +endif() # Dont pack libraries shipped with unity unity_pack_skip(unity_editor_cs)