diff --git a/.github/workflows/sdk_build.yml b/.github/workflows/sdk_build.yml index 8018ae3ac..4f7a57ae8 100644 --- a/.github/workflows/sdk_build.yml +++ b/.github/workflows/sdk_build.yml @@ -14,6 +14,11 @@ on: description: 'Linux Unity version' default: '2017.4.10f1' required: true + # Additional CMake flags to use + additional_cmake_flags: + description: 'Additional flags to pass into CMake' + default: '' + required: false jobs: build_desktop: @@ -103,13 +108,13 @@ jobs: if: startsWith(matrix.os, 'ubuntu') shell: bash run: | - ./build_linux.sh + ./build_linux.sh ${{ github.event.inputs.additional_cmake_flags }} - name: Build SDK (MacOS) if: startsWith(matrix.os, 'macos') shell: bash run: | - ./build_macos.sh + ./build_macos.sh ${{ github.event.inputs.additional_cmake_flags }} - name: Build SDK (Windows) if: startsWith(matrix.os, 'windows') diff --git a/CMakeLists.txt b/CMakeLists.txt index 393ee33f0..90c789ce8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,31 +30,44 @@ option(FIREBASE_UNI_LIBRARY "Link all firebase libraries into one shared object" # Different options to enable/disable each library being included during # configuration. +option(FIREBASE_INCLUDE_LIBRARY_DEFAULT + "Should each library be included by default." ON) option(FIREBASE_INCLUDE_ANALYTICS - "Include the Google Analytics for Firebase library." ON) + "Include the Google Analytics for Firebase library." + ${FIREBASE_INCLUDE_LIBRARY_DEFAULT}) option(FIREBASE_INCLUDE_AUTH - "Include the Firebase Authentication library." ON) + "Include the Firebase Authentication library." + ${FIREBASE_INCLUDE_LIBRARY_DEFAULT}) option(FIREBASE_INCLUDE_CRASHLYTICS - "Include the Firebase Crashlytics library." ON) + "Include the Firebase Crashlytics library." + ${FIREBASE_INCLUDE_LIBRARY_DEFAULT}) option(FIREBASE_INCLUDE_DATABASE - "Include the Firebase Realtime Database library." ON) + "Include the Firebase Realtime Database library." + ${FIREBASE_INCLUDE_LIBRARY_DEFAULT}) option(FIREBASE_INCLUDE_DYNAMIC_LINKS - "Include the Firebase Dynamic Links library." ON) + "Include the Firebase Dynamic Links library." + ${FIREBASE_INCLUDE_LIBRARY_DEFAULT}) option(FIREBASE_INCLUDE_INSTALLATIONS - "Include the Firebase Installations library." ON) + "Include the Firebase Installations library." + ${FIREBASE_INCLUDE_LIBRARY_DEFAULT}) option(FIREBASE_INCLUDE_FIRESTORE - "Include the Firebase Firestore library." ON) + "Include the Firebase Firestore library." + ${FIREBASE_INCLUDE_LIBRARY_DEFAULT}) option(FIREBASE_INCLUDE_FUNCTIONS - "Include the Cloud Functions for Firebase library." ON) + "Include the Cloud Functions for Firebase library." + ${FIREBASE_INCLUDE_LIBRARY_DEFAULT}) option(FIREBASE_INCLUDE_MESSAGING - "Include the Firebase Cloud Messaging library." ON) + "Include the Firebase Cloud Messaging library." + ${FIREBASE_INCLUDE_LIBRARY_DEFAULT}) option(FIREBASE_INCLUDE_REMOTE_CONFIG - "Include the Firebase Remote Config library." ON) + "Include the Firebase Remote Config library." + ${FIREBASE_INCLUDE_LIBRARY_DEFAULT}) option(FIREBASE_INCLUDE_STORAGE - "Include the Cloud Storage for Firebase library." ON) + "Include the Cloud Storage for Firebase library." + ${FIREBASE_INCLUDE_LIBRARY_DEFAULT}) option(FIREBASE_INCLUDE_EDITOR_TOOL - "Include Unity editor tools for Firebase library." ON) + "Include Unity editor tools for Firebase library." OFF) option(FIREBASE_UNITY_BUILD_TESTS "Enable the Firebase Unity Build Tests." OFF) diff --git a/build_bash.sh b/build_bash.sh index 8f16fc1fd..8d0092d7f 100755 --- a/build_bash.sh +++ b/build_bash.sh @@ -67,7 +67,7 @@ for option in "${build_options[@]}" ; do pushd "$DIR" # Configure cmake with option value - cmake .. ${CMAKE_OPTIONS} ${EXTRA_OPTIONS} + cmake .. ${CMAKE_OPTIONS} ${EXTRA_OPTIONS} "$@" check_exit_code $? # Build the SDK diff --git a/build_linux.sh b/build_linux.sh index 138c154d9..84129a480 100755 --- a/build_linux.sh +++ b/build_linux.sh @@ -22,4 +22,4 @@ set -e set -x export PLATFORM=linux -./build_bash.sh +./build_bash.sh "$@" diff --git a/build_macos.sh b/build_macos.sh index 20b0ebf8c..223071a56 100755 --- a/build_macos.sh +++ b/build_macos.sh @@ -25,4 +25,4 @@ set -e set -x export PLATFORM=macos -./build_bash.sh +./build_bash.sh "$@"