diff options
author | fuzzard <fuzzard@kodi.tv> | 2022-08-13 18:28:22 +1000 |
---|---|---|
committer | fuzzard <fuzzard@kodi.tv> | 2022-08-13 18:28:22 +1000 |
commit | 28a7fb1e1899e0ffb0f7e1c0f55d6081a1564f1a (patch) | |
tree | 7ce217d392e28c65071f00c3d61a6b0032a44bd2 /cmake/addons | |
parent | 61f7ea86a6e559209135995530a4b105eeed744b (diff) |
[cmake][addons] allow passing extra args to built addon dependencies
Allows a user to pass through cmake arguments to all addon dependencies that are built
Be aware, this is a global addition, and will be passed through to all addons built.
Usage:
-DADDON_EXTRA_ARGS="-Ddefine1=1 -Ddefine2=2"
The arguments will be passed through as a list (ie -Ddefine1=1;-Ddefine2=2) to all
addon dependencies built, and will be accessible via their CMakelists.txt files
an example is with visualization.projectm. If a user wishes to set -DAPP_RENDER_SYSTEM=gles
for the projectm dependency to build projectm as gles compatible.
Currently this can be done with a toolchain file, but a user cant set -DAPP_RENDER_SYSTEM=gles
as art of their cmake stanza to build the addon, as dependencies are passed through filtered
lists, of which APP_RENDER_SYSTEM isnt specifically passed through.
https://github.com/xbmc/visualization.projectm/issues/87
This solution provides a more generic way to pass through arguments to cmake dependencies
without us explicitly handling each option in HandleDepends.cmake
Diffstat (limited to 'cmake/addons')
-rw-r--r-- | cmake/addons/depends/README | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cmake/addons/depends/README b/cmake/addons/depends/README index 6e62a20fb0..76df28454e 100644 --- a/cmake/addons/depends/README +++ b/cmake/addons/depends/README @@ -31,3 +31,5 @@ into it when executing cmake with the -D<variable-name>=<value> option) to e.g. access specific paths: * DEPENDS_TO_BUILD is a quoted, space delimited list of <dependency>s that you want to build (default is "all"). + * ADDON_EXTRA_ARGS is a quoted, space delimited list of arguments passed to + all <dependency>s built (eg -DADDON_EXTRA_ARGS="-Darg1=1 -Darg2=2"). |