aboutsummaryrefslogtreecommitdiff
path: root/project
diff options
context:
space:
mode:
authorjenkins4kodi <jenkins4kodi@users.noreply.github.com>2015-09-01 13:56:51 +0200
committerjenkins4kodi <jenkins4kodi@users.noreply.github.com>2015-09-01 13:56:51 +0200
commitd0a3cdf0c3ca09836f454a29c7dde774970a4516 (patch)
tree0a20e99a9b205346049186d835cf5e548b3021d7 /project
parentc651e56598b235d7876c4a52fc98d7bd8a8e4e71 (diff)
parent276e77f101301de926a567fc0972d80a3eff3606 (diff)
Merge pull request #7880 from wsnipex/cmake_addon_regex
Diffstat (limited to 'project')
-rw-r--r--project/cmake/addons/CMakeLists.txt10
-rw-r--r--project/cmake/addons/README7
2 files changed, 15 insertions, 2 deletions
diff --git a/project/cmake/addons/CMakeLists.txt b/project/cmake/addons/CMakeLists.txt
index f017a498c8..d1ae271700 100644
--- a/project/cmake/addons/CMakeLists.txt
+++ b/project/cmake/addons/CMakeLists.txt
@@ -183,8 +183,18 @@ foreach(addon ${addons})
separate_arguments(def)
list(GET def 0 id)
+ set(ADDON_FOUND FALSE)
+ # try to find a perfect match
list(FIND ADDONS_TO_BUILD ${id} idx)
if(idx GREATER -1 OR ADDONS_TO_BUILD STREQUAL "all")
+ set(ADDON_FOUND TRUE)
+ # Maybe we have a regex
+ elseif(id MATCHES "${ADDONS_TO_BUILD}")
+ message(STATUS "Pattern ${ADDONS_TO_BUILD} matches ${id}, building addon")
+ set(ADDON_FOUND TRUE)
+ endif()
+
+ if(ADDON_FOUND)
get_filename_component(dir ${addon} PATH)
# check if the addon has a platforms.txt
diff --git a/project/cmake/addons/README b/project/cmake/addons/README
index b4d3fe7ac6..c1dc31c19f 100644
--- a/project/cmake/addons/README
+++ b/project/cmake/addons/README
@@ -27,8 +27,11 @@ are:
The buildsystem uses the following variables (which can be passed into it when
executing cmake with the -D<variable-name>=<value> option) to e.g. access
specific paths:
- * ADDONS_TO_BUILD is a quoted, space delimited list of <addon-id>s that
- you want to build (default is "all").
+ * ADDONS_TO_BUILD has two variations, which are tested in order:
+ - a quoted, space delimited list of <addon-id>s that
+ you want to build (default is "all").
+ - a regular expression that every <addon-id> is matched against
+ e.g.: ADDONS_TO_BUILD=pvr.* to build all pvr addons
* ADDON_SRC_PREFIX can be used to override the addon repository location.
It must point to the locally available parent directory of the addon(s) to build
<addon-id> will be appended to this path automatically