Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Merge pull request #8806 from delroth/cmake-vendoring
cmake: add an option to control dependencies vendoring
- Loading branch information
Showing
2 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| # When packaging Dolphin for an OS distribution, distro vendors usually prefer | ||
| # to limit vendored ("Externals") dependencies as much as possible, in favor of | ||
| # using system provided libraries. This modules provides an option to allow | ||
| # only specific vendored dependencies and error-out at configuration time for | ||
| # non-approved ones. | ||
| # | ||
| # Usage: | ||
| # $ cmake -D APPROVED_VENDORED_DEPENDENCIES="a;b;c;..." | ||
| # | ||
| # Unless the option is explicitly used, vendored dependencies control is | ||
| # disabled. | ||
| # | ||
| # If you want to disallow all vendored dependencies, put "none" in the approved | ||
| # dependencies list. | ||
|
|
||
| set(APPROVED_VENDORED_DEPENDENCIES "" CACHE STRING "\ | ||
| Semicolon separated list of approved vendored dependencies. See docstring in \ | ||
| CMake/CheckVendoringApproved.cmake.") | ||
|
|
||
| function(check_vendoring_approved dep) | ||
| if(APPROVED_VENDORED_DEPENDENCIES) | ||
| if(NOT dep IN_LIST APPROVED_VENDORED_DEPENDENCIES) | ||
| message(SEND_ERROR "\ | ||
| Library ${dep} was not found systemwide and was not approved for vendoring. \ | ||
| Vendored dependencies control is enabled. Add \"${dep}\" to the \ | ||
| APPROVED_VENDORED_DEPENDENCIES list to bypass this error.") | ||
| endif() | ||
| endif() | ||
| endfunction() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters