summaryrefslogtreecommitdiffstats
path: root/project/cmake/addons
diff options
context:
space:
mode:
Diffstat (limited to 'project/cmake/addons')
-rw-r--r--project/cmake/addons/CMakeLists.txt156
-rw-r--r--project/cmake/addons/README28
-rw-r--r--project/cmake/addons/addons/audioencoder.flac/audioencoder.flac.txt1
-rw-r--r--project/cmake/addons/addons/audioencoder.flac/platforms.txt1
-rw-r--r--project/cmake/addons/addons/audioencoder.lame/audioencoder.lame.txt1
-rw-r--r--project/cmake/addons/addons/audioencoder.lame/platforms.txt1
-rw-r--r--project/cmake/addons/addons/audioencoder.vorbis/audioencoder.vorbis.txt1
-rw-r--r--project/cmake/addons/addons/audioencoder.vorbis/platforms.txt1
-rw-r--r--project/cmake/addons/addons/audioencoder.wav/audioencoder.wav.txt1
-rw-r--r--project/cmake/addons/addons/audioencoder.wav/platforms.txt1
-rw-r--r--project/cmake/addons/addons/pvr.argustv/platforms.txt1
-rw-r--r--project/cmake/addons/addons/pvr.argustv/pvr.argustv.txt1
-rw-r--r--project/cmake/addons/addons/pvr.demo/platforms.txt1
-rw-r--r--project/cmake/addons/addons/pvr.demo/pvr.demo.txt1
-rw-r--r--project/cmake/addons/addons/pvr.dvblink/platforms.txt1
-rw-r--r--project/cmake/addons/addons/pvr.dvblink/pvr.dvblink.txt1
-rw-r--r--project/cmake/addons/addons/pvr.dvbviewer/platforms.txt1
-rw-r--r--project/cmake/addons/addons/pvr.dvbviewer/pvr.dvbviewer.txt1
-rw-r--r--project/cmake/addons/addons/pvr.filmon/platforms.txt1
-rw-r--r--project/cmake/addons/addons/pvr.filmon/pvr.filmon.txt1
-rw-r--r--project/cmake/addons/addons/pvr.hts/platforms.txt1
-rw-r--r--project/cmake/addons/addons/pvr.hts/pvr.hts.txt1
-rw-r--r--project/cmake/addons/addons/pvr.iptvsimple/platforms.txt1
-rw-r--r--project/cmake/addons/addons/pvr.iptvsimple/pvr.iptvsimple.txt1
-rw-r--r--project/cmake/addons/addons/pvr.mediaportal.tvserver/platforms.txt1
-rw-r--r--project/cmake/addons/addons/pvr.mediaportal.tvserver/pvr.mediaportal.tvserver.txt1
-rw-r--r--project/cmake/addons/addons/pvr.mythtv/platforms.txt1
-rw-r--r--project/cmake/addons/addons/pvr.mythtv/pvr.mythtv.txt1
-rw-r--r--project/cmake/addons/addons/pvr.nextpvr/platforms.txt1
-rw-r--r--project/cmake/addons/addons/pvr.nextpvr/pvr.nextpvr.txt1
-rw-r--r--project/cmake/addons/addons/pvr.njoy/platforms.txt1
-rw-r--r--project/cmake/addons/addons/pvr.njoy/pvr.njoy.txt1
-rw-r--r--project/cmake/addons/addons/pvr.pctv/platforms.txt1
-rw-r--r--project/cmake/addons/addons/pvr.pctv/pvr.pctv.txt1
-rw-r--r--project/cmake/addons/addons/pvr.vdr.vnsi/platforms.txt1
-rw-r--r--project/cmake/addons/addons/pvr.vdr.vnsi/pvr.vdr.vnsi.txt1
-rw-r--r--project/cmake/addons/addons/pvr.vuplus/platforms.txt1
-rw-r--r--project/cmake/addons/addons/pvr.vuplus/pvr.vuplus.txt1
-rw-r--r--project/cmake/addons/addons/pvr.wmc/platforms.txt1
-rw-r--r--project/cmake/addons/addons/pvr.wmc/pvr.wmc.txt1
-rw-r--r--project/cmake/addons/bootstrap/CMakeLists.txt95
-rw-r--r--project/cmake/addons/bootstrap/README.md48
-rw-r--r--project/cmake/addons/bootstrap/bootstrap.cmake38
-rw-r--r--project/cmake/addons/bootstrap/repositories/binary-addons.txt1
-rw-r--r--project/cmake/addons/depends/common/kodi-platform/deps.txt4
-rw-r--r--project/cmake/addons/depends/common/kodi-platform/kodi-platform.txt2
-rw-r--r--project/cmake/addons/depends/common/p8-platform/p8-platform.txt1
-rw-r--r--project/cmake/addons/depends/common/tinyxml/tinyxml.txt2
48 files changed, 345 insertions, 68 deletions
diff --git a/project/cmake/addons/CMakeLists.txt b/project/cmake/addons/CMakeLists.txt
index 0773713..8fc1a23 100644
--- a/project/cmake/addons/CMakeLists.txt
+++ b/project/cmake/addons/CMakeLists.txt
@@ -1,15 +1,31 @@
1project(kodi-addons) 1project(kodi-addons)
2 2
3cmake_minimum_required(VERSION 2.8) 3if(WIN32)
4 # there seems to be a bug in the CMake generator implementation in CMake 2.8.x releases for WIN32
5 cmake_minimum_required(VERSION 3.0)
6else()
7 cmake_minimum_required(VERSION 2.8)
8endif()
4 9
5list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}) 10list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR})
6 11
12option(ADDON_TARBALL_CACHING "Cache downloaded addon source tarballs?" ON)
13if(ADDON_TARBALL_CACHING)
14 message(STATUS "Addon source tarball caching is enabled")
15else()
16 message(STATUS "Addon source tarball caching is disabled")
17endif()
18
7if(NOT CMAKE_BUILD_TYPE) 19if(NOT CMAKE_BUILD_TYPE)
8 set(CMAKE_BUILD_TYPE Release) 20 set(CMAKE_BUILD_TYPE Release)
9endif() 21endif()
10 22
11if(NOT CORE_SYSTEM_NAME) 23if(NOT CORE_SYSTEM_NAME)
12 string(TOLOWER ${CMAKE_SYSTEM_NAME} CORE_SYSTEM_NAME) 24 if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
25 set(CORE_SYSTEM_NAME "osx")
26 else()
27 string(TOLOWER ${CMAKE_SYSTEM_NAME} CORE_SYSTEM_NAME)
28 endif()
13endif() 29endif()
14 30
15include(ExternalProject) 31include(ExternalProject)
@@ -65,6 +81,7 @@ list(APPEND CMAKE_PREFIX_PATH ${CMAKE_INSTALL_PREFIX})
65set(BUILD_ARGS -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} 81set(BUILD_ARGS -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}
66 -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> 82 -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
67 -DPACKAGE_CONFIG_PATH=${DEPENDS_PATH}/lib/pkgconfig 83 -DPACKAGE_CONFIG_PATH=${DEPENDS_PATH}/lib/pkgconfig
84 -DDEPENDS_PATH=${DEPENDS_PATH}
68 -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} 85 -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
69 -DCMAKE_USER_MAKE_RULES_OVERRIDE=${CMAKE_USER_MAKE_RULES_OVERRIDE} 86 -DCMAKE_USER_MAKE_RULES_OVERRIDE=${CMAKE_USER_MAKE_RULES_OVERRIDE}
70 -DCMAKE_USER_MAKE_RULES_OVERRIDE_CXX=${CMAKE_USER_MAKE_RULES_OVERRIDE_CXX} 87 -DCMAKE_USER_MAKE_RULES_OVERRIDE_CXX=${CMAKE_USER_MAKE_RULES_OVERRIDE_CXX}
@@ -78,16 +95,26 @@ if(MSVC)
78 set_property(GLOBAL PROPERTY USE_FOLDERS ON) 95 set_property(GLOBAL PROPERTY USE_FOLDERS ON)
79endif() 96endif()
80 97
98option(PACKAGE_ZIP "Prepare built addons for packaging" OFF)
81if(PACKAGE_ZIP) 99if(PACKAGE_ZIP)
82 # needed for project installing 100 # needed for project installing
83 list(APPEND BUILD_ARGS -DPACKAGE_ZIP=1) 101 list(APPEND BUILD_ARGS -DPACKAGE_ZIP=ON)
84 MESSAGE("package zip specified") 102
103 # figure out where to store the packaged ZIP archives
104 if(NOT PACKAGE_DIR)
105 set(PACKAGE_DIR "${BUILD_DIR}/zips")
106 else()
107 file(TO_CMAKE_PATH "${PACKAGE_DIR}" PACKAGE_DIR)
108 endif()
109 list(APPEND BUILD_ARGS -DPACKAGE_DIR=${PACKAGE_DIR})
110
111 MESSAGE(STATUS "ZIP packaging enabled (destination: ${PACKAGE_DIR})")
85endif() 112endif()
86 113
87if(CMAKE_TOOLCHAIN_FILE) 114if(CMAKE_TOOLCHAIN_FILE)
88 list(APPEND BUILD_ARGS -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}) 115 list(APPEND BUILD_ARGS -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE})
89 MESSAGE("toolchain specified") 116 MESSAGE(STATUS "Toolchain specified")
90 MESSAGE(${BUILD_ARGS}) 117 MESSAGE(STATUS ${BUILD_ARGS})
91endif() 118endif()
92 119
93if(NOT ADDONS_TO_BUILD) 120if(NOT ADDONS_TO_BUILD)
@@ -97,16 +124,25 @@ else()
97 separate_arguments(ADDONS_TO_BUILD) 124 separate_arguments(ADDONS_TO_BUILD)
98endif() 125endif()
99 126
127if(NOT ADDONS_DEFINITION_DIR)
128 set(ADDONS_DEFINITION_DIR ${PROJECT_SOURCE_DIR}/addons)
129else()
130 file(TO_CMAKE_PATH "${ADDONS_DEFINITION_DIR}" ADDONS_DEFINITION_DIR)
131endif()
132get_filename_component(ADDONS_DEFINITION_DIR "${ADDONS_DEFINITION_DIR}" ABSOLUTE)
133
100if(ADDON_SRC_PREFIX) 134if(ADDON_SRC_PREFIX)
101 message(STATUS "Overriding addon source directory prefix: ${ADDON_SRC_PREFIX}") 135 message(STATUS "Overriding addon source directory prefix: ${ADDON_SRC_PREFIX}")
102endif() 136endif()
103 137
104if(NOT KODI_LIB_DIR) 138if(NOT APP_LIB_DIR)
105 set(KODI_LIB_DIR "${DEPENDS_PATH}/lib/kodi") 139 set(APP_LIB_DIR "${DEPENDS_PATH}/lib/kodi")
106else() 140else()
107 file(TO_CMAKE_PATH "${KODI_LIB_DIR}" KODI_LIB_DIR) 141 file(TO_CMAKE_PATH "${APP_LIB_DIR}" APP_LIB_DIR)
108endif() 142endif()
109 143
144set(APP_PREFIX "${CMAKE_INSTALL_PREFIX}")
145
110# check for platform specific stuff 146# check for platform specific stuff
111if(EXISTS ${PLATFORM_DIR}/defines.txt) 147if(EXISTS ${PLATFORM_DIR}/defines.txt)
112 file(STRINGS ${PLATFORM_DIR}/defines.txt platformdefines) 148 file(STRINGS ${PLATFORM_DIR}/defines.txt platformdefines)
@@ -119,21 +155,23 @@ endif()
119# include check_target_platform() function 155# include check_target_platform() function
120include(${APP_ROOT}/project/cmake/scripts/common/check_target_platform.cmake) 156include(${APP_ROOT}/project/cmake/scripts/common/check_target_platform.cmake)
121 157
122# check install permissions
123set(ADDON_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}) 158set(ADDON_INSTALL_DIR ${CMAKE_INSTALL_PREFIX})
124check_install_permissions(${CMAKE_INSTALL_PREFIX} can_write) 159if(NOT WIN32)
125if(NOT ${can_write} AND NOT WIN32) 160 # check install permissions
126 set(NEED_SUDO TRUE) 161 check_install_permissions(${CMAKE_INSTALL_PREFIX} can_write)
127 set(ADDON_INSTALL_DIR ${CMAKE_BINARY_DIR}/.install) 162 if(NOT ${can_write} AND CMAKE_SYSTEM_NAME STREQUAL "Linux")
128 message(STATUS "NEED_SUDO: ${NEED_SUDO}") 163 set(NEED_SUDO TRUE)
164 set(ADDON_INSTALL_DIR ${CMAKE_BINARY_DIR}/.install)
165 message(STATUS "NEED_SUDO: ${NEED_SUDO}")
166 endif()
129endif() 167endif()
130 168
131### prepare the build environment for the binary addons 169### prepare the build environment for the binary addons
132# copy the prepare-env.cmake script to the depends path so that we can include it 170# copy the prepare-env.cmake script to the depends path so that we can include it
133file(COPY ${APP_ROOT}/project/cmake/scripts/common/prepare-env.cmake DESTINATION ${KODI_LIB_DIR}) 171file(COPY ${APP_ROOT}/project/cmake/scripts/common/prepare-env.cmake DESTINATION ${APP_LIB_DIR})
134 172
135# add the location of prepare-env.cmake to CMAKE_MODULE_PATH so that it is found 173# add the location of prepare-env.cmake to CMAKE_MODULE_PATH so that it is found
136list(APPEND CMAKE_MODULE_PATH ${KODI_LIB_DIR}) 174list(APPEND CMAKE_MODULE_PATH ${APP_LIB_DIR})
137 175
138# include prepare-env.cmake which contains the logic to install the addon header bindings etc 176# include prepare-env.cmake which contains the logic to install the addon header bindings etc
139include(prepare-env) 177include(prepare-env)
@@ -141,17 +179,61 @@ include(prepare-env)
141### add the depends subdirectory for any general dependencies 179### add the depends subdirectory for any general dependencies
142add_subdirectory(depends) 180add_subdirectory(depends)
143 181
182# add a custom target "package-addons" which will package and install all addons
183add_custom_target(package-addons)
184
144### get and build all the binary addons 185### get and build all the binary addons
145# look for all the addons to be built 186# look for all the addons to be built
146file(GLOB_RECURSE addons ${PROJECT_SOURCE_DIR}/addons/*.txt) 187file(GLOB_RECURSE addons ${ADDONS_DEFINITION_DIR}/*.txt)
188
189#if there are no addons assume that bootstrapping hasn't happened yet
190if(NOT addons)
191 message(STATUS "Bootstrapping all default repositories as no addons were found...")
192 set(BOOTSTRAP_BUILD_DIR "${BUILD_DIR}/bootstrap")
193
194 # make sure that the bootstraps build addon exists
195 if(NOT EXISTS ${BOOTSTRAP_BUILD_DIR})
196 file(MAKE_DIRECTORY ${BOOTSTRAP_BUILD_DIR})
197 endif()
198
199 # generate the bootstrap buildsystem
200 execute_process(COMMAND ${CMAKE_COMMAND} ${PROJECT_SOURCE_DIR}/bootstrap
201 -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
202 -DCMAKE_INSTALL_PREFIX:PATH=${ADDONS_DEFINITION_DIR}
203 -DBUILD_DIR:PATH=${BOOTSTRAP_BUILD_DIR}
204 -DADDONS_TO_BUILD=${ADDONS_TO_BUILD}
205 WORKING_DIRECTORY ${BOOTSTRAP_BUILD_DIR})
206
207 # execute the generated bootstrap buildsystem
208 execute_process(COMMAND ${CMAKE_COMMAND} --build ${BOOTSTRAP_BUILD_DIR}
209 WORKING_DIRECTORY ${BOOTSTRAP_BUILD_DIR})
210
211 # now look for all the addons to be built again
212 file(GLOB_RECURSE addons ${ADDONS_DEFINITION_DIR}/*.txt)
213
214 if(NOT addons)
215 message(FATAL_ERROR "No addons available to be built")
216 endif()
217endif()
218
147foreach(addon ${addons}) 219foreach(addon ${addons})
148 if(NOT (addon MATCHES platforms.txt)) 220 if(NOT (addon MATCHES platforms.txt))
149 file(STRINGS ${addon} def) 221 file(STRINGS ${addon} def)
150 separate_arguments(def) 222 separate_arguments(def)
151 list(GET def 0 id) 223 list(GET def 0 id)
152 224
225 set(ADDON_FOUND FALSE)
226 # try to find a perfect match
153 list(FIND ADDONS_TO_BUILD ${id} idx) 227 list(FIND ADDONS_TO_BUILD ${id} idx)
154 if(idx GREATER -1 OR ADDONS_TO_BUILD STREQUAL "all") 228 if(idx GREATER -1 OR "${ADDONS_TO_BUILD}" STREQUAL "all")
229 set(ADDON_FOUND TRUE)
230 # Maybe we have a regex
231 elseif(id MATCHES "${ADDONS_TO_BUILD}")
232 message(STATUS "Pattern ${ADDONS_TO_BUILD} matches ${id}, building addon")
233 set(ADDON_FOUND TRUE)
234 endif()
235
236 if(ADDON_FOUND)
155 get_filename_component(dir ${addon} PATH) 237 get_filename_component(dir ${addon} PATH)
156 238
157 # check if the addon has a platforms.txt 239 # check if the addon has a platforms.txt
@@ -180,6 +262,19 @@ foreach(addon ${addons})
180 if(deflength GREATER 2 AND "${SOURCE_DIR}" STREQUAL "") 262 if(deflength GREATER 2 AND "${SOURCE_DIR}" STREQUAL "")
181 list(GET def 2 revision) 263 list(GET def 2 revision)
182 264
265 # we need access to a git executable
266 find_package(Git REQUIRED)
267
268 # resolve revision to git hash
269 execute_process(COMMAND ${GIT_EXECUTABLE} ls-remote ${url} ${revision} OUTPUT_VARIABLE revision_hash)
270 # git ls-remote only works on branches and tag names but not on revisions
271 if(NOT "${revision_hash}" STREQUAL "")
272 string(REPLACE "\t" ";" revision_list ${revision_hash})
273 list(GET revision_list 0 revision_hash)
274 message(STATUS "${id}: git branch/tag ${revision} resolved to hash: ${revision_hash}")
275 set(revision ${revision_hash})
276 endif()
277
183 # Note: downloading specific revisions via http in the format below is probably github specific 278 # Note: downloading specific revisions via http in the format below is probably github specific
184 # if we ever use other repositories, this might need adapting 279 # if we ever use other repositories, this might need adapting
185 set(url ${url}/archive/${revision}.tar.gz) 280 set(url ${url}/archive/${revision}.tar.gz)
@@ -210,7 +305,7 @@ foreach(addon ${addons})
210 # download the addon if necessary 305 # download the addon if necessary
211 if(NOT "${archive_name}" STREQUAL "") 306 if(NOT "${archive_name}" STREQUAL "")
212 # download and extract the addon 307 # download and extract the addon
213 if(NOT EXISTS ${BUILD_DIR}/download/${archive_name}.tar.gz) 308 if(NOT ADDON_TARBALL_CACHING OR NOT EXISTS ${BUILD_DIR}/download/${archive_name}.tar.gz)
214 # cleanup any of the previously downloaded archives of this addon 309 # cleanup any of the previously downloaded archives of this addon
215 file(GLOB archives "${BUILD_DIR}/download/${id}*.tar.gz") 310 file(GLOB archives "${BUILD_DIR}/download/${id}*.tar.gz")
216 if(archives) 311 if(archives)
@@ -275,6 +370,25 @@ foreach(addon ${addons})
275 add_dependencies(${id} ${${id}_DEPS}) 370 add_dependencies(${id} ${${id}_DEPS})
276 endif() 371 endif()
277 endif() 372 endif()
373
374 if(CROSS_AUTOCONF AND AUTOCONF_FILES)
375 if(EXISTS ${SOURCE_DIR}/bootstrap/autoreconf.txt)
376 file(STRINGS ${SOURCE_DIR}/bootstrap/autoreconf.txt conf_dirs)
377 foreach(conf_dir ${conf_dirs})
378 foreach(afile ${AUTOCONF_FILES})
379 message(STATUS "copying ${afile} to ${SOURCE_DIR}/${conf_dir}")
380 file(COPY ${afile} DESTINATION ${SOURCE_DIR}/${conf_dir})
381 endforeach()
382 endforeach()
383 endif()
384 endif()
385
386 # create a forwarding target to the addon-package target
387 add_custom_target(package-${id}
388 COMMAND ${CMAKE_COMMAND} --build ${id}-prefix/src/${id}-build --target addon-package
389 DEPENDS ${id})
390 add_dependencies(package-addons package-${id})
391
278 else() 392 else()
279 message(FATAL_ERROR "${id}: invalid or missing addon source directory at ${SOURCE_DIR}") 393 message(FATAL_ERROR "${id}: invalid or missing addon source directory at ${SOURCE_DIR}")
280 endif() 394 endif()
@@ -297,4 +411,4 @@ endif()
297 411
298# add custom target "supported_addons" that returns all addons that are supported on this platform 412# add custom target "supported_addons" that returns all addons that are supported on this platform
299string(REPLACE ";" " " ALL_ADDONS_BUILDING "${ALL_ADDONS_BUILDING}") 413string(REPLACE ";" " " ALL_ADDONS_BUILDING "${ALL_ADDONS_BUILDING}")
300add_custom_target(supported_addons COMMAND ${CMAKE_COMMAND} -E echo "ALL_ADDONS_BUILDING: ${ALL_ADDONS_BUILDING}" VERBATIM) 414add_custom_target(supported_addons COMMAND ${CMAKE_COMMAND} -E echo "ALL_ADDONS_BUILDING: ${ALL_ADDONS_BUILDING}" VERBATIM) \ No newline at end of file
diff --git a/project/cmake/addons/README b/project/cmake/addons/README
index b901bb7..a0f2c32 100644
--- a/project/cmake/addons/README
+++ b/project/cmake/addons/README
@@ -1,7 +1,8 @@
1KODI ADDONS 1KODI ADDONS
2=========== 2===========
3This directory contains the cmake-based buildsystem for addons. It looks into 3This directory contains the cmake-based buildsystem for addons. It looks into
4the "addons" sub-directory and parses all *.txt files recursively. Each addon 4the directory pointed to by the ADDONS_DEFINITION_DIR option (which defaults to
5the "addons" sub-directory) and parses all *.txt files recursively. Each addon
5must have its own <addon-id>.txt file in a separate sub-directory which must 6must have its own <addon-id>.txt file in a separate sub-directory which must
6follow one of the defined format: 7follow one of the defined format:
7 <addon-id> <git-url> <git-revision> 8 <addon-id> <git-url> <git-revision>
@@ -22,13 +23,26 @@ are:
22 * platforms.txt: List of platforms to build an addon for (or "all"). It is 23 * platforms.txt: List of platforms to build an addon for (or "all"). It is
23 also supported to specify negated platforms with a leading exclamation mark 24 also supported to specify negated platforms with a leading exclamation mark
24 (i), e.g. "!windows". 25 (i), e.g. "!windows".
25 Available platforms are: linux, windows, darwin, ios, android, rbpi 26 Available platforms are: linux, windows, osx, ios, android, rbpi, freebsd
27
28ATTENTION: If no addon definitions could be found the buildsystem assumes that
29 the bootstrapping of the addon definition repositories hasn't been
30 performed yet and automatically executes the addon bootstrapping
31 buildsystem located in the "bootstrap" sub-directory with the default
32 settings (i.e. all addons from all pre-defined addon definition
33 repositories are bootstrapped into the directory pointed to by the
34 ADDONS_DEFINITION_DIR option).
26 35
27The buildsystem uses the following variables (which can be passed into it when 36The buildsystem uses the following variables (which can be passed into it when
28executing cmake with the -D<variable-name>=<value> option) to e.g. access 37executing cmake with the -D<variable-name>=<value> option) to e.g. access
29specific paths: 38specific paths:
30 * ADDONS_TO_BUILD is a quoted, space delimited list of <addon-id>s that 39 * ADDONS_TO_BUILD has two variations, which are tested in order:
31 you want to build (default is "all"). 40 - a quoted, space delimited list of <addon-id>s that
41 you want to build (default is "all").
42 - a regular expression that every <addon-id> is matched against
43 e.g.: ADDONS_TO_BUILD=pvr.* to build all pvr addons
44 * ADDONS_DEFINITION_DIR points to the directory containing the definitions
45 for the addons to be built.
32 * ADDON_SRC_PREFIX can be used to override the addon repository location. 46 * ADDON_SRC_PREFIX can be used to override the addon repository location.
33 It must point to the locally available parent directory of the addon(s) to build 47 It must point to the locally available parent directory of the addon(s) to build
34 <addon-id> will be appended to this path automatically 48 <addon-id> will be appended to this path automatically
@@ -45,11 +59,15 @@ specific paths:
45 absolute representation of ../../.. starting from this directory). 59 absolute representation of ../../.. starting from this directory).
46 * BUILD_DIR points to the directory where the addons and their dependencies 60 * BUILD_DIR points to the directory where the addons and their dependencies
47 will be downloaded and built. 61 will be downloaded and built.
48 * PACKAGE_ZIP=1 will mean the add-ons will be 'packaged' into a common folder, 62 * PACKAGE_ZIP=ON means that the add-ons will be 'packaged' into a common folder,
49 rather than being placed in <CMAKE_INSTALL_PREFIX>/lib/kodi/addons and 63 rather than being placed in <CMAKE_INSTALL_PREFIX>/lib/kodi/addons and
50 <CMAKE_INSTALL_PREFIX>/share/kodi/addons. 64 <CMAKE_INSTALL_PREFIX>/share/kodi/addons.
65 * PACKAGE_DIR points to the directory where the ZIP archived addons will be
66 stored after they have been packaged (defaults to <BUILD_DIR>/zips)
51 * ARCH_DEFINES specifies the platform-specific C/C++ preprocessor defines 67 * ARCH_DEFINES specifies the platform-specific C/C++ preprocessor defines
52 (defaults to empty). 68 (defaults to empty).
69 * ADDON_TARBALL_CACHING specifies whether downloaded addon source tarballs
70 should be cached or not (defaults to ON).
53 71
54The buildsystem makes some assumptions about the environment which must be met 72The buildsystem makes some assumptions about the environment which must be met
55by whoever uses it: 73by whoever uses it:
diff --git a/project/cmake/addons/addons/audioencoder.flac/audioencoder.flac.txt b/project/cmake/addons/addons/audioencoder.flac/audioencoder.flac.txt
deleted file mode 100644
index 5886cfa..0000000
--- a/project/cmake/addons/addons/audioencoder.flac/audioencoder.flac.txt
+++ /dev/null
@@ -1 +0,0 @@
1audioencoder.flac https://github.com/xbmc/audioencoder.flac 84acb14
diff --git a/project/cmake/addons/addons/audioencoder.flac/platforms.txt b/project/cmake/addons/addons/audioencoder.flac/platforms.txt
deleted file mode 100644
index 174a52e..0000000
--- a/project/cmake/addons/addons/audioencoder.flac/platforms.txt
+++ /dev/null
@@ -1 +0,0 @@
1!ios \ No newline at end of file
diff --git a/project/cmake/addons/addons/audioencoder.lame/audioencoder.lame.txt b/project/cmake/addons/addons/audioencoder.lame/audioencoder.lame.txt
deleted file mode 100644
index a55dc44..0000000
--- a/project/cmake/addons/addons/audioencoder.lame/audioencoder.lame.txt
+++ /dev/null
@@ -1 +0,0 @@
1audioencoder.lame https://github.com/xbmc/audioencoder.lame 3eb59de
diff --git a/project/cmake/addons/addons/audioencoder.lame/platforms.txt b/project/cmake/addons/addons/audioencoder.lame/platforms.txt
deleted file mode 100644
index baa6044..0000000
--- a/project/cmake/addons/addons/audioencoder.lame/platforms.txt
+++ /dev/null
@@ -1 +0,0 @@
1all \ No newline at end of file
diff --git a/project/cmake/addons/addons/audioencoder.vorbis/audioencoder.vorbis.txt b/project/cmake/addons/addons/audioencoder.vorbis/audioencoder.vorbis.txt
deleted file mode 100644
index 8decf52..0000000
--- a/project/cmake/addons/addons/audioencoder.vorbis/audioencoder.vorbis.txt
+++ /dev/null
@@ -1 +0,0 @@
1audioencoder.vorbis https://github.com/xbmc/audioencoder.vorbis d556a68
diff --git a/project/cmake/addons/addons/audioencoder.vorbis/platforms.txt b/project/cmake/addons/addons/audioencoder.vorbis/platforms.txt
deleted file mode 100644
index baa6044..0000000
--- a/project/cmake/addons/addons/audioencoder.vorbis/platforms.txt
+++ /dev/null
@@ -1 +0,0 @@
1all \ No newline at end of file
diff --git a/project/cmake/addons/addons/audioencoder.wav/audioencoder.wav.txt b/project/cmake/addons/addons/audioencoder.wav/audioencoder.wav.txt
deleted file mode 100644
index b3209f6..0000000
--- a/project/cmake/addons/addons/audioencoder.wav/audioencoder.wav.txt
+++ /dev/null
@@ -1 +0,0 @@
1audioencoder.wav https://github.com/xbmc/audioencoder.wav 40aaedf
diff --git a/project/cmake/addons/addons/audioencoder.wav/platforms.txt b/project/cmake/addons/addons/audioencoder.wav/platforms.txt
deleted file mode 100644
index baa6044..0000000
--- a/project/cmake/addons/addons/audioencoder.wav/platforms.txt
+++ /dev/null
@@ -1 +0,0 @@
1all \ No newline at end of file
diff --git a/project/cmake/addons/addons/pvr.argustv/platforms.txt b/project/cmake/addons/addons/pvr.argustv/platforms.txt
deleted file mode 100644
index baa6044..0000000
--- a/project/cmake/addons/addons/pvr.argustv/platforms.txt
+++ /dev/null
@@ -1 +0,0 @@
1all \ No newline at end of file
diff --git a/project/cmake/addons/addons/pvr.argustv/pvr.argustv.txt b/project/cmake/addons/addons/pvr.argustv/pvr.argustv.txt
deleted file mode 100644
index 88ccde4..0000000
--- a/project/cmake/addons/addons/pvr.argustv/pvr.argustv.txt
+++ /dev/null
@@ -1 +0,0 @@
1pvr.argustv https://github.com/kodi-pvr/pvr.argustv 96ee875
diff --git a/project/cmake/addons/addons/pvr.demo/platforms.txt b/project/cmake/addons/addons/pvr.demo/platforms.txt
deleted file mode 100644
index baa6044..0000000
--- a/project/cmake/addons/addons/pvr.demo/platforms.txt
+++ /dev/null
@@ -1 +0,0 @@
1all \ No newline at end of file
diff --git a/project/cmake/addons/addons/pvr.demo/pvr.demo.txt b/project/cmake/addons/addons/pvr.demo/pvr.demo.txt
deleted file mode 100644
index 1307381..0000000
--- a/project/cmake/addons/addons/pvr.demo/pvr.demo.txt
+++ /dev/null
@@ -1 +0,0 @@
1pvr.demo https://github.com/kodi-pvr/pvr.demo b4b7de1
diff --git a/project/cmake/addons/addons/pvr.dvblink/platforms.txt b/project/cmake/addons/addons/pvr.dvblink/platforms.txt
deleted file mode 100644
index baa6044..0000000
--- a/project/cmake/addons/addons/pvr.dvblink/platforms.txt
+++ /dev/null
@@ -1 +0,0 @@
1all \ No newline at end of file
diff --git a/project/cmake/addons/addons/pvr.dvblink/pvr.dvblink.txt b/project/cmake/addons/addons/pvr.dvblink/pvr.dvblink.txt
deleted file mode 100644
index 1aa96d8..0000000
--- a/project/cmake/addons/addons/pvr.dvblink/pvr.dvblink.txt
+++ /dev/null
@@ -1 +0,0 @@
1pvr.dvblink https://github.com/kodi-pvr/pvr.dvblink 5d505b8
diff --git a/project/cmake/addons/addons/pvr.dvbviewer/platforms.txt b/project/cmake/addons/addons/pvr.dvbviewer/platforms.txt
deleted file mode 100644
index baa6044..0000000
--- a/project/cmake/addons/addons/pvr.dvbviewer/platforms.txt
+++ /dev/null
@@ -1 +0,0 @@
1all \ No newline at end of file
diff --git a/project/cmake/addons/addons/pvr.dvbviewer/pvr.dvbviewer.txt b/project/cmake/addons/addons/pvr.dvbviewer/pvr.dvbviewer.txt
deleted file mode 100644
index db25aa2..0000000
--- a/project/cmake/addons/addons/pvr.dvbviewer/pvr.dvbviewer.txt
+++ /dev/null
@@ -1 +0,0 @@
1pvr.dvbviewer https://github.com/manuelm/pvr.dvbviewer master \ No newline at end of file
diff --git a/project/cmake/addons/addons/pvr.filmon/platforms.txt b/project/cmake/addons/addons/pvr.filmon/platforms.txt
deleted file mode 100644
index baa6044..0000000
--- a/project/cmake/addons/addons/pvr.filmon/platforms.txt
+++ /dev/null
@@ -1 +0,0 @@
1all \ No newline at end of file
diff --git a/project/cmake/addons/addons/pvr.filmon/pvr.filmon.txt b/project/cmake/addons/addons/pvr.filmon/pvr.filmon.txt
deleted file mode 100644
index 2e7142c..0000000
--- a/project/cmake/addons/addons/pvr.filmon/pvr.filmon.txt
+++ /dev/null
@@ -1 +0,0 @@
1pvr.filmon https://github.com/kodi-pvr/pvr.filmon 413fe9e
diff --git a/project/cmake/addons/addons/pvr.hts/platforms.txt b/project/cmake/addons/addons/pvr.hts/platforms.txt
deleted file mode 100644
index baa6044..0000000
--- a/project/cmake/addons/addons/pvr.hts/platforms.txt
+++ /dev/null
@@ -1 +0,0 @@
1all \ No newline at end of file
diff --git a/project/cmake/addons/addons/pvr.hts/pvr.hts.txt b/project/cmake/addons/addons/pvr.hts/pvr.hts.txt
deleted file mode 100644
index 5f913f8..0000000
--- a/project/cmake/addons/addons/pvr.hts/pvr.hts.txt
+++ /dev/null
@@ -1 +0,0 @@
1pvr.hts https://github.com/kodi-pvr/pvr.hts 4bf1a97
diff --git a/project/cmake/addons/addons/pvr.iptvsimple/platforms.txt b/project/cmake/addons/addons/pvr.iptvsimple/platforms.txt
deleted file mode 100644
index baa6044..0000000
--- a/project/cmake/addons/addons/pvr.iptvsimple/platforms.txt
+++ /dev/null
@@ -1 +0,0 @@
1all \ No newline at end of file
diff --git a/project/cmake/addons/addons/pvr.iptvsimple/pvr.iptvsimple.txt b/project/cmake/addons/addons/pvr.iptvsimple/pvr.iptvsimple.txt
deleted file mode 100644
index d1d4d3c..0000000
--- a/project/cmake/addons/addons/pvr.iptvsimple/pvr.iptvsimple.txt
+++ /dev/null
@@ -1 +0,0 @@
1pvr.iptvsimple https://github.com/kodi-pvr/pvr.iptvsimple a2e6c6f
diff --git a/project/cmake/addons/addons/pvr.mediaportal.tvserver/platforms.txt b/project/cmake/addons/addons/pvr.mediaportal.tvserver/platforms.txt
deleted file mode 100644
index baa6044..0000000
--- a/project/cmake/addons/addons/pvr.mediaportal.tvserver/platforms.txt
+++ /dev/null
@@ -1 +0,0 @@
1all \ No newline at end of file
diff --git a/project/cmake/addons/addons/pvr.mediaportal.tvserver/pvr.mediaportal.tvserver.txt b/project/cmake/addons/addons/pvr.mediaportal.tvserver/pvr.mediaportal.tvserver.txt
deleted file mode 100644
index 665dfff..0000000
--- a/project/cmake/addons/addons/pvr.mediaportal.tvserver/pvr.mediaportal.tvserver.txt
+++ /dev/null
@@ -1 +0,0 @@
1pvr.mediaportal.tvserver https://github.com/kodi-pvr/pvr.mediaportal.tvserver 6f8ca82
diff --git a/project/cmake/addons/addons/pvr.mythtv/platforms.txt b/project/cmake/addons/addons/pvr.mythtv/platforms.txt
deleted file mode 100644
index baa6044..0000000
--- a/project/cmake/addons/addons/pvr.mythtv/platforms.txt
+++ /dev/null
@@ -1 +0,0 @@
1all \ No newline at end of file
diff --git a/project/cmake/addons/addons/pvr.mythtv/pvr.mythtv.txt b/project/cmake/addons/addons/pvr.mythtv/pvr.mythtv.txt
deleted file mode 100644
index de930ab..0000000
--- a/project/cmake/addons/addons/pvr.mythtv/pvr.mythtv.txt
+++ /dev/null
@@ -1 +0,0 @@
1pvr.mythtv https://github.com/kodi-pvr/pvr.mythtv ef9cf41
diff --git a/project/cmake/addons/addons/pvr.nextpvr/platforms.txt b/project/cmake/addons/addons/pvr.nextpvr/platforms.txt
deleted file mode 100644
index baa6044..0000000
--- a/project/cmake/addons/addons/pvr.nextpvr/platforms.txt
+++ /dev/null
@@ -1 +0,0 @@
1all \ No newline at end of file
diff --git a/project/cmake/addons/addons/pvr.nextpvr/pvr.nextpvr.txt b/project/cmake/addons/addons/pvr.nextpvr/pvr.nextpvr.txt
deleted file mode 100644
index ecb73d2..0000000
--- a/project/cmake/addons/addons/pvr.nextpvr/pvr.nextpvr.txt
+++ /dev/null
@@ -1 +0,0 @@
1pvr.nextpvr https://github.com/kodi-pvr/pvr.nextpvr 1ecbf87
diff --git a/project/cmake/addons/addons/pvr.njoy/platforms.txt b/project/cmake/addons/addons/pvr.njoy/platforms.txt
deleted file mode 100644
index baa6044..0000000
--- a/project/cmake/addons/addons/pvr.njoy/platforms.txt
+++ /dev/null
@@ -1 +0,0 @@
1all \ No newline at end of file
diff --git a/project/cmake/addons/addons/pvr.njoy/pvr.njoy.txt b/project/cmake/addons/addons/pvr.njoy/pvr.njoy.txt
deleted file mode 100644
index fec1b59..0000000
--- a/project/cmake/addons/addons/pvr.njoy/pvr.njoy.txt
+++ /dev/null
@@ -1 +0,0 @@
1pvr.njoy https://github.com/kodi-pvr/pvr.njoy fcd6294
diff --git a/project/cmake/addons/addons/pvr.pctv/platforms.txt b/project/cmake/addons/addons/pvr.pctv/platforms.txt
deleted file mode 100644
index baa6044..0000000
--- a/project/cmake/addons/addons/pvr.pctv/platforms.txt
+++ /dev/null
@@ -1 +0,0 @@
1all \ No newline at end of file
diff --git a/project/cmake/addons/addons/pvr.pctv/pvr.pctv.txt b/project/cmake/addons/addons/pvr.pctv/pvr.pctv.txt
deleted file mode 100644
index b17bdc7..0000000
--- a/project/cmake/addons/addons/pvr.pctv/pvr.pctv.txt
+++ /dev/null
@@ -1 +0,0 @@
1pvr.pctv https://github.com/kodi-pvr/pvr.pctv 0a0924e
diff --git a/project/cmake/addons/addons/pvr.vdr.vnsi/platforms.txt b/project/cmake/addons/addons/pvr.vdr.vnsi/platforms.txt
deleted file mode 100644
index baa6044..0000000
--- a/project/cmake/addons/addons/pvr.vdr.vnsi/platforms.txt
+++ /dev/null
@@ -1 +0,0 @@
1all \ No newline at end of file
diff --git a/project/cmake/addons/addons/pvr.vdr.vnsi/pvr.vdr.vnsi.txt b/project/cmake/addons/addons/pvr.vdr.vnsi/pvr.vdr.vnsi.txt
deleted file mode 100644
index 72b4954..0000000
--- a/project/cmake/addons/addons/pvr.vdr.vnsi/pvr.vdr.vnsi.txt
+++ /dev/null
@@ -1 +0,0 @@
1pvr.vdr.vnsi https://github.com/kodi-pvr/pvr.vdr.vnsi 3a28e39
diff --git a/project/cmake/addons/addons/pvr.vuplus/platforms.txt b/project/cmake/addons/addons/pvr.vuplus/platforms.txt
deleted file mode 100644
index baa6044..0000000
--- a/project/cmake/addons/addons/pvr.vuplus/platforms.txt
+++ /dev/null
@@ -1 +0,0 @@
1all \ No newline at end of file
diff --git a/project/cmake/addons/addons/pvr.vuplus/pvr.vuplus.txt b/project/cmake/addons/addons/pvr.vuplus/pvr.vuplus.txt
deleted file mode 100644
index 36d60af..0000000
--- a/project/cmake/addons/addons/pvr.vuplus/pvr.vuplus.txt
+++ /dev/null
@@ -1 +0,0 @@
1pvr.vuplus https://github.com/kodi-pvr/pvr.vuplus d6abad3
diff --git a/project/cmake/addons/addons/pvr.wmc/platforms.txt b/project/cmake/addons/addons/pvr.wmc/platforms.txt
deleted file mode 100644
index baa6044..0000000
--- a/project/cmake/addons/addons/pvr.wmc/platforms.txt
+++ /dev/null
@@ -1 +0,0 @@
1all \ No newline at end of file
diff --git a/project/cmake/addons/addons/pvr.wmc/pvr.wmc.txt b/project/cmake/addons/addons/pvr.wmc/pvr.wmc.txt
deleted file mode 100644
index 1455925..0000000
--- a/project/cmake/addons/addons/pvr.wmc/pvr.wmc.txt
+++ /dev/null
@@ -1 +0,0 @@
1pvr.wmc https://github.com/kodi-pvr/pvr.wmc cf28e4c
diff --git a/project/cmake/addons/bootstrap/CMakeLists.txt b/project/cmake/addons/bootstrap/CMakeLists.txt
new file mode 100644
index 0000000..86950b8
--- /dev/null
+++ b/project/cmake/addons/bootstrap/CMakeLists.txt
@@ -0,0 +1,95 @@
1project(kodi-addons-bootstrap)
2
3cmake_minimum_required(VERSION 2.8)
4
5list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR})
6
7# make sure CMAKE_INSTALL_PREFIX is properly set
8if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT OR NOT CMAKE_INSTALL_PREFIX)
9 set(CMAKE_INSTALL_PREFIX "${PROJECT_SOURCE_DIR}/../addons")
10endif()
11list(APPEND CMAKE_PREFIX_PATH ${CMAKE_INSTALL_PREFIX})
12
13# figure out where the build directory is located
14if(NOT BUILD_DIR)
15 set(BUILD_DIR "${CMAKE_BINARY_DIR}/build")
16else()
17 file(TO_CMAKE_PATH "${BUILD_DIR}" BUILD_DIR)
18endif()
19get_filename_component(BUILD_DIR "${BUILD_DIR}" ABSOLUTE)
20
21# make sure that the repositories to build have been specified
22if(NOT REPOSITORY_TO_BUILD)
23 set(REPOSITORY_TO_BUILD_DEFAULT ON)
24 set(REPOSITORY_TO_BUILD "all")
25 set(REPOSITORY_REVISION "")
26 message(STATUS "Bootstrapping all repositories")
27else()
28 set(REPOSITORY_TO_BUILD_DEFAULT OFF)
29 message(STATUS "Bootstrapping following repository: ${REPOSITORY_TO_BUILD}")
30endif()
31
32# figure out which addons to bootstrap (defaults to all)
33if(NOT ADDONS_TO_BUILD)
34 set(ADDONS_TO_BUILD "all")
35 message(STATUS "Bootstrapping all addons")
36else()
37 message(STATUS "Bootstrapping following addons: ${ADDONS_TO_BUILD}")
38endif()
39
40include(ExternalProject)
41
42function(bootstrap_repo repo_id repo_url repo_revision)
43 message(STATUS "Bootstrapping addons from ${repo_id} (${repo_url} ${repo_revision})...")
44 externalproject_add(${repo_id}
45 GIT_REPOSITORY ${repo_url}
46 GIT_TAG ${repo_revision}
47 PREFIX ${BUILD_DIR}/${repo_id}
48 CONFIGURE_COMMAND ""
49 BUILD_COMMAND ""
50 INSTALL_COMMAND ${CMAKE_COMMAND}
51 -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}
52 -DPROJECT_SOURCE_DIR=<SOURCE_DIR>
53 -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
54 -DADDONS_TO_BUILD=${ADDONS_TO_BUILD}
55 -P ${PROJECT_SOURCE_DIR}/bootstrap.cmake
56 )
57endfunction()
58
59# look for all addons repository definitions
60set(REPOSITORY_TO_BUILD_FOUND OFF)
61file(GLOB repos repositories/*.txt)
62foreach(repo ${repos})
63 file(STRINGS ${repo} repo_definition)
64 separate_arguments(repo_definition)
65 list(GET repo_definition 0 repo_id)
66
67 list(FIND REPOSITORY_TO_BUILD ${repo_id} idx)
68 if(idx GREATER -1 OR REPOSITORY_TO_BUILD STREQUAL "all")
69 set(REPOSITORY_TO_BUILD_FOUND ON)
70
71 # get the URL of the repository
72 list(GET repo_definition 1 repo_url)
73
74 # get the revision of the repository if not provided as an argument
75 if(NOT REPOSITORY_REVISION)
76 list(GET repo_definition 2 repo_revision)
77 else()
78 set(repo_revision "${REPOSITORY_REVISION}")
79 endif()
80
81 bootstrap_repo(${repo_id} ${repo_url} ${repo_revision})
82 endif()
83endforeach()
84
85# if we have been asked to bootstrap a specific repository (not the default one) and
86# it couldn't be found in the predefined repository definitions we assume that it's a
87# URL to a specific repository
88if(NOT REPOSITORY_TO_BUILD_DEFAULT AND NOT REPOSITORY_TO_BUILD_FOUND)
89 # default to the master branch if no revision has been provided
90 if(NOT REPOSITORY_REVISION)
91 set(REPOSITORY_REVISION "master")
92 endif()
93
94 bootstrap_repo(binary-addons-custom ${REPOSITORY_TO_BUILD} ${REPOSITORY_REVISION})
95endif()
diff --git a/project/cmake/addons/bootstrap/README.md b/project/cmake/addons/bootstrap/README.md
new file mode 100644
index 0000000..b886b5b
--- /dev/null
+++ b/project/cmake/addons/bootstrap/README.md
@@ -0,0 +1,48 @@
1# KODI ADDON DEFINITIONS BOOTSTRAPPING
2This directory contains the cmake-based buildsystem for addon definitions
3bootstrapping which downloads the addon definitions from one or more addon
4definitions repositories. These addon definitions are then used by the addon
5buildsystem to figure out which addons and which versions to build. It looks
6into the "repositories" sub-directory and parses all *.txt files recursively.
7Each addon definitions repository must have its own <repository>.txt file which
8must follow the following defined format:
9```
10<repository> <git-url> <git-revision>
11```
12where
13* `<repository>` is the identification of the repository.
14* `<git-url>` must be the URL of the git repository containing the addon
15 definitions
16* `<git-revision>` must be a valid git tag/branch/commit in the addon
17 definitions repository's git repository which will be used for the build
18
19The buildsystem uses the following variables (which can be passed into it when
20executing cmake with the `-D<variable-name>=<value>` option):
21* `CMAKE_INSTALL_PREFIX` points to the directory where the downloaded addon
22definitions will be installed to (defaults to `../addons`).
23* `BUILD_DIR` points to the directory where the addon definitions repositories
24will be downloaded to.
25* `REPOSITORY_TO_BUILD` specifies a single addon definitions repository to be
26downloaded and processed (defaults to `"all"`).
27* `REPOSITORY_REVISION` specifies the git revision in the addon definitions
28repository which will be used for the build. This option is only valid in
29combination with the `REPOSITORY_TO_BUILD` option (defaults to the git
30revision specified in the repository's definition file).
31* `ADDONS_TO_BUILD` is a quoted, space delimited list of `<addon-id>`s that
32should be bootstrapped (default is `"all"`).
33
34To trigger the cmake-based buildsystem the following command must be executed
35with <path> being the path to this directory (absolute or relative, allowing for
36in-source and out-of-source builds).
37```
38cmake <path> -G <generator>
39```
40
41cmake supports multiple generators, see
42http://www.cmake.org/cmake/help/v2.8.8/cmake.html#section_Generators for a list.
43
44In case of additional options the call might look like this
45```
46cmake <path> [-G <generator>] \
47 -DCMAKE_INSTALL_PREFIX="<path-to-install-directory>"
48``` \ No newline at end of file
diff --git a/project/cmake/addons/bootstrap/bootstrap.cmake b/project/cmake/addons/bootstrap/bootstrap.cmake
new file mode 100644
index 0000000..c78910c
--- /dev/null
+++ b/project/cmake/addons/bootstrap/bootstrap.cmake
@@ -0,0 +1,38 @@
1list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR})
2
3# make sure that the installation location has been specified
4if(NOT CMAKE_INSTALL_PREFIX)
5 message(FATAL_ERROR "CMAKE_INSTALL_PREFIX has not been specified")
6endif()
7
8# figure out which addons to bootstrap (defaults to all)
9if(NOT ADDONS_TO_BUILD)
10 set(ADDONS_TO_BUILD "all")
11else()
12 separate_arguments(ADDONS_TO_BUILD)
13endif()
14
15# find all addon definitions and go through them
16file(GLOB_RECURSE ADDON_DEFINITIONS ${PROJECT_SOURCE_DIR}/*.txt)
17foreach(ADDON_DEFINITION_FILE ${ADDON_DEFINITIONS})
18 # ignore platforms.txt
19 if(NOT (ADDON_DEFINITION_FILE MATCHES platforms.txt))
20 # read the addon definition file
21 file(STRINGS ${ADDON_DEFINITION_FILE} ADDON_DEFINITION)
22 separate_arguments(ADDON_DEFINITION)
23
24 # extract the addon definition's identifier
25 list(GET ADDON_DEFINITION 0 ADDON_ID)
26
27 # check if the addon definition should be built
28 list(FIND ADDONS_TO_BUILD ${ADDON_ID} ADDONS_TO_BUILD_IDX)
29 if(ADDONS_TO_BUILD_IDX GREATER -1 OR "${ADDONS_TO_BUILD}" STREQUAL "all")
30 # get the path to the addon definition directory
31 get_filename_component(ADDON_DEFINITION_DIR ${ADDON_DEFINITION_FILE} PATH)
32
33 # install the addon definition
34 message(STATUS "Bootstrapping ${ADDON_ID} addon...")
35 file(INSTALL ${ADDON_DEFINITION_DIR} DESTINATION ${CMAKE_INSTALL_PREFIX})
36 endif()
37 endif()
38endforeach()
diff --git a/project/cmake/addons/bootstrap/repositories/binary-addons.txt b/project/cmake/addons/bootstrap/repositories/binary-addons.txt
new file mode 100644
index 0000000..8674f06
--- /dev/null
+++ b/project/cmake/addons/bootstrap/repositories/binary-addons.txt
@@ -0,0 +1 @@
binary-addons https://github.com/xbmc/repo-binary-addons.git master \ No newline at end of file
diff --git a/project/cmake/addons/depends/common/kodi-platform/deps.txt b/project/cmake/addons/depends/common/kodi-platform/deps.txt
index f0e8246..b953815 100644
--- a/project/cmake/addons/depends/common/kodi-platform/deps.txt
+++ b/project/cmake/addons/depends/common/kodi-platform/deps.txt
@@ -1,2 +1,2 @@
1kodi 1tinyxml
2tinyxml \ No newline at end of file 2p8-platform
diff --git a/project/cmake/addons/depends/common/kodi-platform/kodi-platform.txt b/project/cmake/addons/depends/common/kodi-platform/kodi-platform.txt
index 009c72b..de42267 100644
--- a/project/cmake/addons/depends/common/kodi-platform/kodi-platform.txt
+++ b/project/cmake/addons/depends/common/kodi-platform/kodi-platform.txt
@@ -1 +1 @@
kodi-platform https://github.com/xbmc/kodi-platform 48bdd985 kodi-platform https://github.com/xbmc/kodi-platform fed924e764b4c9c722f7f5d825ce70d4b61ae54f
diff --git a/project/cmake/addons/depends/common/p8-platform/p8-platform.txt b/project/cmake/addons/depends/common/p8-platform/p8-platform.txt
new file mode 100644
index 0000000..7db4e36
--- /dev/null
+++ b/project/cmake/addons/depends/common/p8-platform/p8-platform.txt
@@ -0,0 +1 @@
p8-platform https://github.com/Pulse-Eight/platform.git 38343e0acd6a636ac46139aa666aee4a8d1f13db
diff --git a/project/cmake/addons/depends/common/tinyxml/tinyxml.txt b/project/cmake/addons/depends/common/tinyxml/tinyxml.txt
index 456b0c5..f8e05e8 100644
--- a/project/cmake/addons/depends/common/tinyxml/tinyxml.txt
+++ b/project/cmake/addons/depends/common/tinyxml/tinyxml.txt
@@ -1 +1 @@
tinyxml http://mirrors.xbmc.org/build-deps/sources/tinyxml-2.6.2_2.tar.gz tinyxml http://mirrors.kodi.tv/build-deps/sources/tinyxml-2.6.2_2.tar.gz