CMake: Allow ignoring system packages #11955
Merged
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.
Sometimes, you want to ignore system packages
-DUSE_SYSTEM_LIBMGBA=OFFto your cmake args" as a cleaner and simpler solution.This adds two sets of cmake args:
-DUSE_SYSTEM_LIBS=(ON|OFF|AUTO): Global control for all system libs at once-DUSE_SYSTEM_<library>=(ON|OFF|AUTO)Control for individual libraries (overrides global if set)AUTOacts like the current default (and remains the default), using the system library if foundONacts like our currentAPPROVED_VENDORED_DEPENDENCIESmode, failing configure if the system package is not foundOFFdisables searching for the system package completely, picking our bundled version insteadOther Changes
APPROVED_VENDORED_DEPENDENCIES, I've deprecated that option, though it does still work for now (with a deprecation message).Do not merge until I've verified that none of these are installed on our CI (or if they are installed, that we add the appropriateIt looks like the CI is all good, there's a homebrew libLZMA that we should be disabling, but it's also getting picked up by the current build system, so this shouldn't be making things worse.-DUSE_SYSTEM_XXX=OFFin the CI scripts). (This will remain a draft until then)