Skip to content

Add more CMake options, and make the workflow handle passing options #40

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 2 commits into from
Jul 29, 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
9 changes: 7 additions & 2 deletions .github/workflows/sdk_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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')
Expand Down
37 changes: 25 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion build_bash.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion build_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ set -e
set -x

export PLATFORM=linux
./build_bash.sh
./build_bash.sh "$@"
2 changes: 1 addition & 1 deletion build_macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ set -e
set -x

export PLATFORM=macos
./build_bash.sh
./build_bash.sh "$@"