[Python build] Add --preset arg to generated cmake CLI #966
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Add
--preset
arg to cmake CLI.The
scripts/build_scripts/build_zips.py
verify if at least one of files:CMakePresets.json
orCMakeUserPresets.json
exists, and lookup the first preset name that starts with firebase-sdk-unity. That configuration file is used by cmake build (e.g define cache and/or environment variables).Optionally, you can pass a custom preset name to the build script with:
--preset
arg:Add
--generator
flag that adds -G arg to cmake CLIIf you're using Visual Studio 2022, now you can override the default Visual Studio 2019 generator with
--generator
flag:python ./scripts/build_scripts/build_zips.py --generator='Visual Studio 17 2022' --platform=windows
This PR is related with #646, that mention the usage of
cmakesettings.json
, which one is deprecated!Testing
CMakePresets.json
orCMakeUserPresets.json
to the repo root path, like the example below:build_zips.py
scriptpython ./scripts/build_scripts/build_zips.py --platform=windows --targets=analytics # The generated cmake CLI should be: cmake_setup_args is: cmake [REPO_ROOT_PATH] --preset firebase-unity-sdk-[something] ...
--generator
flag in order to customize your VS versionpython ./scripts/build_scripts/build_zips.py --generator='Visual Studio 17 2022' --platform=windows
Type of Change
Place an
x
the applicable box: