aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorAlwin Esch <alwin.esch@web.de>2017-05-15 14:32:58 +0200
committerAlwin Esch <alwin.esch@web.de>2017-05-15 14:32:58 +0200
commit3b05b50329074390d7a9f197dccf509af9c1db37 (patch)
treec6a438be3c8fa7e973dd30647fccb20bc967ccd9 /CMakeLists.txt
parent4551978380dfcc9bd31c3c150a97fda95d440c30 (diff)
[cmake][addons] automate addon.xml version set
This automate the set of versions on addon.xml in kodi and also allow set of them on addon itself. On a Version change need only the number inside the Header "version.h" replaced, everything else becomes then set from cmake.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt15
1 files changed, 8 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6d38cbab82..8dc19c2083 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -249,10 +249,14 @@ elseif(CORE_SYSTEM_NAME STREQUAL rbpi)
core_require_dep(MMAL)
endif()
+# find all folders containing addon.xml.in
+# used to define ADDON_XML_OUTPUTS, ADDON_XML_DEPENDS and ADDON_INSTALL_DATA
+# Function defined in ./cmake/scripts/common/Macros.cmake
+find_addon_xml_in_files()
+
# Compile Info
add_custom_command(OUTPUT ${CORE_BUILD_DIR}/xbmc/CompileInfo.cpp
- ${CMAKE_BINARY_DIR}/addons/xbmc.addon/addon.xml
- ${CMAKE_BINARY_DIR}/addons/kodi.guilib/addon.xml
+ ${ADDON_XML_OUTPUTS}
COMMAND ${CMAKE_COMMAND} -DCORE_SOURCE_DIR=${CMAKE_SOURCE_DIR}
-DCORE_SYSTEM_NAME=${CORE_SYSTEM_NAME}
-DCORE_BUILD_DIR=${CORE_BUILD_DIR}
@@ -262,12 +266,9 @@ add_custom_command(OUTPUT ${CORE_BUILD_DIR}/xbmc/CompileInfo.cpp
-Dprefix=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}
-P ${CMAKE_SOURCE_DIR}/cmake/scripts/common/GenerateVersionedFiles.cmake
DEPENDS ${CMAKE_SOURCE_DIR}/version.txt
- ${CMAKE_SOURCE_DIR}/addons/xbmc.addon/addon.xml.in
- ${CMAKE_SOURCE_DIR}/addons/kodi.guilib/addon.xml.in
+ ${ADDON_XML_DEPENDS}
${CMAKE_SOURCE_DIR}/xbmc/CompileInfo.cpp.in)
-list(APPEND install_data addons/xbmc.addon/addon.xml)
-list(APPEND install_data addons/xbmc.json/addon.xml)
-list(APPEND install_data addons/kodi.guilib/addon.xml)
+list(APPEND install_data ${ADDON_INSTALL_DATA})
add_library(compileinfo OBJECT ${CORE_BUILD_DIR}/xbmc/CompileInfo.cpp)
set_target_properties(compileinfo PROPERTIES FOLDER "Build Utilities")
target_compile_options(compileinfo PRIVATE "${SYSTEM_DEFINES}")