aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormontellese <montellese@kodi.tv>2015-07-26 00:30:55 +0200
committermontellese <montellese@kodi.tv>2015-09-04 19:40:14 +0200
commit224f0eda15f3c006b5634643ad684ef08ad8b623 (patch)
tree3a42777944706e860877b66e55dc9a5da3a88ade
parent4eb14371beb9ecbe64b0bbe3358c4ebb8ec2dbb3 (diff)
[binary addons] add ADDONS_DEFINITION_DIR to be able to specify the directory containing the definitions for the addons to be built
-rw-r--r--project/cmake/addons/CMakeLists.txt9
-rw-r--r--project/cmake/addons/README2
2 files changed, 10 insertions, 1 deletions
diff --git a/project/cmake/addons/CMakeLists.txt b/project/cmake/addons/CMakeLists.txt
index 96e01e7b7a..a48be9a2f5 100644
--- a/project/cmake/addons/CMakeLists.txt
+++ b/project/cmake/addons/CMakeLists.txt
@@ -124,6 +124,13 @@ else()
separate_arguments(ADDONS_TO_BUILD)
endif()
+if(NOT ADDONS_DEFINITION_DIR)
+ set(ADDONS_DEFINITION_DIR ${PROJECT_SOURCE_DIR}/addons)
+else()
+ file(TO_CMAKE_PATH "${ADDONS_DEFINITION_DIR}" ADDONS_DEFINITION_DIR)
+endif()
+get_filename_component(ADDONS_DEFINITION_DIR "${ADDONS_DEFINITION_DIR}" ABSOLUTE)
+
if(ADDON_SRC_PREFIX)
message(STATUS "Overriding addon source directory prefix: ${ADDON_SRC_PREFIX}")
endif()
@@ -177,7 +184,7 @@ add_custom_target(package-addons)
### get and build all the binary addons
# look for all the addons to be built
-file(GLOB_RECURSE addons ${PROJECT_SOURCE_DIR}/addons/*.txt)
+file(GLOB_RECURSE addons ${ADDONS_DEFINITION_DIR}/*.txt)
foreach(addon ${addons})
if(NOT (addon MATCHES platforms.txt))
file(STRINGS ${addon} def)
diff --git a/project/cmake/addons/README b/project/cmake/addons/README
index c1dc31c19f..33a46ed581 100644
--- a/project/cmake/addons/README
+++ b/project/cmake/addons/README
@@ -32,6 +32,8 @@ specific paths:
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
+ * ADDONS_DEFINITION_DIR points to the directory containing the definitions
+ for the addons to be built.
* 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