diff options
Diffstat (limited to 'cmake/addons')
| -rw-r--r-- | cmake/addons/CMakeLists.txt | 27 | ||||
| -rw-r--r-- | cmake/addons/README.md | 2 | ||||
| -rw-r--r-- | cmake/addons/bootstrap/README.md | 1 | ||||
| -rw-r--r-- | cmake/addons/depends/common/kodi-platform/deps.txt | 2 | ||||
| -rw-r--r-- | cmake/addons/depends/common/kodi-platform/kodi-platform.txt | 1 | ||||
| -rw-r--r-- | cmake/addons/depends/common/p8-platform/p8-platform.txt | 1 | ||||
| -rw-r--r-- | cmake/addons/depends/common/tinyxml/CMakeLists.txt | 22 | ||||
| -rw-r--r-- | cmake/addons/depends/common/tinyxml/tinyxml.sha256 | 1 | ||||
| -rw-r--r-- | cmake/addons/depends/common/tinyxml/tinyxml.txt | 1 | ||||
| -rw-r--r-- | cmake/addons/depends/windowsstore/CMakeLists.txt | 52 | ||||
| -rw-r--r-- | cmake/addons/depends/windowsstore/Install.cmake | 24 | ||||
| -rw-r--r-- | cmake/addons/depends/windowsstore/README | 19 | ||||
| -rw-r--r-- | cmake/addons/depends/windowsstore/p8-platform/p8-platform.txt | 1 | ||||
| -rw-r--r-- | cmake/addons/depends/windowsstore/prebuilt/README | 21 |
14 files changed, 23 insertions, 152 deletions
diff --git a/cmake/addons/CMakeLists.txt b/cmake/addons/CMakeLists.txt index 5fc798b..3dccc01 100644 --- a/cmake/addons/CMakeLists.txt +++ b/cmake/addons/CMakeLists.txt | |||
| @@ -80,6 +80,8 @@ if (CMAKE_SYSTEM_NAME STREQUAL WindowsStore) | |||
| 80 | -DCMAKE_SYSTEM_VERSION=${CMAKE_SYSTEM_VERSION}) | 80 | -DCMAKE_SYSTEM_VERSION=${CMAKE_SYSTEM_VERSION}) |
| 81 | endif() | 81 | endif() |
| 82 | 82 | ||
| 83 | include(${CORE_SOURCE_DIR}/cmake/scripts/common/CompilerSettings.cmake) | ||
| 84 | |||
| 83 | set(BUILD_ARGS -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} | 85 | set(BUILD_ARGS -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} |
| 84 | -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> | 86 | -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> |
| 85 | -DPACKAGE_CONFIG_PATH=${ADDON_DEPENDS_PATH}/lib/pkgconfig | 87 | -DPACKAGE_CONFIG_PATH=${ADDON_DEPENDS_PATH}/lib/pkgconfig |
| @@ -121,6 +123,17 @@ if(CMAKE_TOOLCHAIN_FILE) | |||
| 121 | message(STATUS ${BUILD_ARGS}) | 123 | message(STATUS ${BUILD_ARGS}) |
| 122 | endif() | 124 | endif() |
| 123 | 125 | ||
| 126 | # used for addons where need special folders to store there content (if | ||
| 127 | # not set the addon define it byself). | ||
| 128 | # e.g. Google Chromium addon where his git bring: | ||
| 129 | # - "unable to create file" ... "Filename too long" | ||
| 130 | # see also WARNING by Windows on: https://bitbucket.org/chromiumembedded/cef/wiki/MasterBuildQuickStart | ||
| 131 | if(THIRD_PARTY_PATH) | ||
| 132 | message(STATUS "Third party lib path specified") | ||
| 133 | message(STATUS ${THIRD_PARTY_PATH}) | ||
| 134 | list(APPEND BUILD_ARGS -DTHIRD_PARTY_PATH=${THIRD_PARTY_PATH}) | ||
| 135 | endif() | ||
| 136 | |||
| 124 | if(NOT ADDONS_TO_BUILD) | 137 | if(NOT ADDONS_TO_BUILD) |
| 125 | set(ADDONS_TO_BUILD "all") | 138 | set(ADDONS_TO_BUILD "all") |
| 126 | else() | 139 | else() |
| @@ -243,9 +256,14 @@ foreach(addon ${addons}) | |||
| 243 | if(idx GREATER -1 OR "${ADDONS_TO_BUILD}" STREQUAL "all") | 256 | if(idx GREATER -1 OR "${ADDONS_TO_BUILD}" STREQUAL "all") |
| 244 | set(ADDON_FOUND TRUE) | 257 | set(ADDON_FOUND TRUE) |
| 245 | # Maybe we have a regex | 258 | # Maybe we have a regex |
| 246 | elseif(id MATCHES "${ADDONS_TO_BUILD}") | 259 | else() |
| 247 | message(STATUS "Pattern ${ADDONS_TO_BUILD} matches ${id}, building addon") | 260 | foreach(ADDONLISTITEM ${ADDONS_TO_BUILD}) |
| 248 | set(ADDON_FOUND TRUE) | 261 | if(id MATCHES "${ADDONLISTITEM}") |
| 262 | message(STATUS "Pattern ${ADDONLISTITEM} matches ${id}, building addon") | ||
| 263 | set(ADDON_FOUND TRUE) | ||
| 264 | break() | ||
| 265 | endif() | ||
| 266 | endforeach() | ||
| 249 | endif() | 267 | endif() |
| 250 | 268 | ||
| 251 | if(ADDON_FOUND) | 269 | if(ADDON_FOUND) |
| @@ -376,9 +394,6 @@ foreach(addon ${addons}) | |||
| 376 | DEPENDERS build | 394 | DEPENDERS build |
| 377 | ALWAYS 1) | 395 | ALWAYS 1) |
| 378 | 396 | ||
| 379 | # add "kodi-platform" as a dependency to every addon | ||
| 380 | add_dependencies(${id} kodi-platform) | ||
| 381 | |||
| 382 | set(${id}_DEPENDS_DIR ${SOURCE_DIR}/depends) | 397 | set(${id}_DEPENDS_DIR ${SOURCE_DIR}/depends) |
| 383 | 398 | ||
| 384 | if(EXISTS ${${id}_DEPENDS_DIR}) | 399 | if(EXISTS ${${id}_DEPENDS_DIR}) |
diff --git a/cmake/addons/README.md b/cmake/addons/README.md index dd222f5..17e6460 100644 --- a/cmake/addons/README.md +++ b/cmake/addons/README.md | |||
| @@ -1,4 +1,4 @@ | |||
| 1 |  | 1 |  |
| 2 | # Kodi add-ons CMake based buildsystem | 2 | # Kodi add-ons CMake based buildsystem |
| 3 | This directory contains the cmake-based buildsystem for Kodi add-ons. It looks into the directory pointed to by the *ADDONS_DEFINITION_DIR* option (which defaults to the *addons* sub-directory) and parses all *.txt files recursively. Each add-on must have its own `<addon-id>.txt` file in a separate sub-directory that must follow one of the defined formats: | 3 | This directory contains the cmake-based buildsystem for Kodi add-ons. It looks into the directory pointed to by the *ADDONS_DEFINITION_DIR* option (which defaults to the *addons* sub-directory) and parses all *.txt files recursively. Each add-on must have its own `<addon-id>.txt` file in a separate sub-directory that must follow one of the defined formats: |
| 4 | 4 | ||
diff --git a/cmake/addons/bootstrap/README.md b/cmake/addons/bootstrap/README.md index b886b5b..52ded74 100644 --- a/cmake/addons/bootstrap/README.md +++ b/cmake/addons/bootstrap/README.md | |||
| @@ -1,3 +1,4 @@ | |||
| 1 |  | ||
| 1 | # KODI ADDON DEFINITIONS BOOTSTRAPPING | 2 | # KODI ADDON DEFINITIONS BOOTSTRAPPING |
| 2 | This directory contains the cmake-based buildsystem for addon definitions | 3 | This directory contains the cmake-based buildsystem for addon definitions |
| 3 | bootstrapping which downloads the addon definitions from one or more addon | 4 | bootstrapping which downloads the addon definitions from one or more addon |
diff --git a/cmake/addons/depends/common/kodi-platform/deps.txt b/cmake/addons/depends/common/kodi-platform/deps.txt deleted file mode 100644 index b953815..0000000 --- a/cmake/addons/depends/common/kodi-platform/deps.txt +++ /dev/null | |||
| @@ -1,2 +0,0 @@ | |||
| 1 | tinyxml | ||
| 2 | p8-platform | ||
diff --git a/cmake/addons/depends/common/kodi-platform/kodi-platform.txt b/cmake/addons/depends/common/kodi-platform/kodi-platform.txt deleted file mode 100644 index c553769..0000000 --- a/cmake/addons/depends/common/kodi-platform/kodi-platform.txt +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | kodi-platform https://github.com/xbmc/kodi-platform e8574b883ffa2131f2eeb96ff3724d60b21130f7 | ||
diff --git a/cmake/addons/depends/common/p8-platform/p8-platform.txt b/cmake/addons/depends/common/p8-platform/p8-platform.txt deleted file mode 100644 index ae7a370..0000000 --- a/cmake/addons/depends/common/p8-platform/p8-platform.txt +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | p8-platform https://github.com/xbmc/platform.git 32190045c7eb6883c0662db2f91b4ceeab904fc2 | ||
diff --git a/cmake/addons/depends/common/tinyxml/CMakeLists.txt b/cmake/addons/depends/common/tinyxml/CMakeLists.txt deleted file mode 100644 index ec396ee..0000000 --- a/cmake/addons/depends/common/tinyxml/CMakeLists.txt +++ /dev/null | |||
| @@ -1,22 +0,0 @@ | |||
| 1 | cmake_minimum_required(VERSION 3.1) | ||
| 2 | project(tinyxml) | ||
| 3 | |||
| 4 | set(SOURCES src/tinystr.cpp | ||
| 5 | src/tinyxml.cpp | ||
| 6 | src/tinyxmlerror.cpp | ||
| 7 | src/tinyxmlparser.cpp) | ||
| 8 | |||
| 9 | if(WIN32) | ||
| 10 | add_definitions(-DWIN32 -D_LIB) | ||
| 11 | endif() | ||
| 12 | add_definitions(-DTIXML_USE_STL) | ||
| 13 | |||
| 14 | add_library(tinyxml ${SOURCES}) | ||
| 15 | |||
| 16 | include_directories(${PROJECT_SOURCE_DIR}/include) | ||
| 17 | |||
| 18 | set(HEADERS ${PROJECT_SOURCE_DIR}/include/tinystr.h | ||
| 19 | ${PROJECT_SOURCE_DIR}/include/tinyxml.h) | ||
| 20 | |||
| 21 | install(FILES ${HEADERS} DESTINATION ${CMAKE_INSTALL_PREFIX}/include) | ||
| 22 | install(TARGETS tinyxml DESTINATION ${CMAKE_INSTALL_PREFIX}/lib) | ||
diff --git a/cmake/addons/depends/common/tinyxml/tinyxml.sha256 b/cmake/addons/depends/common/tinyxml/tinyxml.sha256 deleted file mode 100644 index 78c07c8..0000000 --- a/cmake/addons/depends/common/tinyxml/tinyxml.sha256 +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | 8164c9ad48b9028667768a584d62f7760cfbfb90d0dd6214ad174403058da10c | ||
diff --git a/cmake/addons/depends/common/tinyxml/tinyxml.txt b/cmake/addons/depends/common/tinyxml/tinyxml.txt deleted file mode 100644 index f8e05e8..0000000 --- a/cmake/addons/depends/common/tinyxml/tinyxml.txt +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | tinyxml http://mirrors.kodi.tv/build-deps/sources/tinyxml-2.6.2_2.tar.gz | ||
diff --git a/cmake/addons/depends/windowsstore/CMakeLists.txt b/cmake/addons/depends/windowsstore/CMakeLists.txt deleted file mode 100644 index c8739c0..0000000 --- a/cmake/addons/depends/windowsstore/CMakeLists.txt +++ /dev/null | |||
| @@ -1,52 +0,0 @@ | |||
| 1 | cmake_minimum_required(VERSION 3.1) | ||
| 2 | project(kodi-addons-depends-windows) | ||
| 3 | |||
| 4 | list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}) | ||
| 5 | |||
| 6 | if(NOT CMAKE_BUILD_TYPE) | ||
| 7 | set(CMAKE_BUILD_TYPE Release) | ||
| 8 | endif() | ||
| 9 | |||
| 10 | include(ExternalProject) | ||
| 11 | |||
| 12 | if(NOT ADDON_DEPENDS_PATH) | ||
| 13 | message(FATAL_ERROR "ADDON_DEPENDS_PATH (${ADDON_DEPENDS_PATH}) is not a valid target directory.") | ||
| 14 | else() | ||
| 15 | file(TO_CMAKE_PATH "${ADDON_DEPENDS_PATH}" ADDON_DEPENDS_PATH) | ||
| 16 | endif() | ||
| 17 | get_filename_component(ADDON_DEPENDS_PATH "${ADDON_DEPENDS_PATH}" ABSOLUTE) | ||
| 18 | list(APPEND CMAKE_PREFIX_PATH ${ADDON_DEPENDS_PATH}) | ||
| 19 | |||
| 20 | if(NOT DEPENDS_TO_BUILD) | ||
| 21 | set(DEPENDS_TO_BUILD "all") | ||
| 22 | endif() | ||
| 23 | |||
| 24 | function(add_internal id url inputfile) | ||
| 25 | externalproject_add(${id} | ||
| 26 | URL ${url} | ||
| 27 | PREFIX build/${id} | ||
| 28 | CONFIGURE_COMMAND "" | ||
| 29 | BUILD_COMMAND "" | ||
| 30 | INSTALL_COMMAND ${CMAKE_COMMAND} | ||
| 31 | -DINPUTDIR=${PROJECT_BINARY_DIR}/build/${id}/src/${id} | ||
| 32 | -DINPUTFILE=${inputfile} | ||
| 33 | -DDESTDIR=${ADDON_DEPENDS_PATH} | ||
| 34 | -P ${PROJECT_SOURCE_DIR}/Install.cmake | ||
| 35 | ) | ||
| 36 | endfunction() | ||
| 37 | |||
| 38 | file(GLOB_RECURSE download_input_files prebuilt/*.txt) | ||
| 39 | foreach(file ${download_input_files}) | ||
| 40 | if(NOT file MATCHES install.txt) | ||
| 41 | file(STRINGS ${file} def) | ||
| 42 | get_filename_component(dir ${file} DIRECTORY) | ||
| 43 | string(REPLACE " " ";" def ${def}) | ||
| 44 | list(GET def 0 id) | ||
| 45 | |||
| 46 | list(FIND DEPENDS_TO_BUILD ${id} idx) | ||
| 47 | if(idx GREATER -1 OR DEPENDS_TO_BUILD STREQUAL "all") | ||
| 48 | list(GET def 1 url) | ||
| 49 | add_internal(${id} ${url} ${dir}/install.txt) | ||
| 50 | endif() | ||
| 51 | endif() | ||
| 52 | endforeach() | ||
diff --git a/cmake/addons/depends/windowsstore/Install.cmake b/cmake/addons/depends/windowsstore/Install.cmake deleted file mode 100644 index 9a3adbb..0000000 --- a/cmake/addons/depends/windowsstore/Install.cmake +++ /dev/null | |||
| @@ -1,24 +0,0 @@ | |||
| 1 | if(EXISTS "${INPUTFILE}") | ||
| 2 | # if there's an input file we use it to determine which files to copy where | ||
| 3 | file(STRINGS ${INPUTFILE} FILES) | ||
| 4 | string(REPLACE "\n" ";" FILES "${FILES}") | ||
| 5 | foreach(file ${FILES}) | ||
| 6 | string(REPLACE " " ";" file "${file}") | ||
| 7 | list(GET file 0 dir) | ||
| 8 | list(GET file 1 dest) | ||
| 9 | list(LENGTH file deflength) | ||
| 10 | if(deflength GREATER 2) | ||
| 11 | list(GET file 2 copy) | ||
| 12 | endif() | ||
| 13 | file(GLOB files ${INPUTDIR}/${dir}) | ||
| 14 | foreach(instfile ${files}) | ||
| 15 | file(COPY ${instfile} DESTINATION ${DESTDIR}/${dest}) | ||
| 16 | if(copy) | ||
| 17 | file(COPY ${instfile} DESTINATION ${DESTDIR}/${copy}) | ||
| 18 | endif() | ||
| 19 | endforeach() | ||
| 20 | endforeach() | ||
| 21 | else() | ||
| 22 | # otherwise we assume that the content of the extracted archive is already well-formed and can just be copied | ||
| 23 | file(COPY ${INPUTDIR}/${dir} DESTINATION ${DESTDIR}) | ||
| 24 | endif() \ No newline at end of file | ||
diff --git a/cmake/addons/depends/windowsstore/README b/cmake/addons/depends/windowsstore/README deleted file mode 100644 index 67dc594..0000000 --- a/cmake/addons/depends/windowsstore/README +++ /dev/null | |||
| @@ -1,19 +0,0 @@ | |||
| 1 | KODI WIN32 ADDON DEPENDENCIES | ||
| 2 | ============================= | ||
| 3 | This directory contains the cmake-based buildsystem for dependencies (currently | ||
| 4 | only prebuilt) used by one or multiple addons. The buildsystem looks into the | ||
| 5 | "prebuilt" sub-directory, downloads all the specified dependencies, extracts | ||
| 6 | them and places them into the "depends" sub-directory. | ||
| 7 | |||
| 8 | To trigger the cmake-based buildsystem the following command must be executed | ||
| 9 | with <path> being the path to this directory (absolute or relative, allowing for | ||
| 10 | in-source and out-of-source builds). | ||
| 11 | |||
| 12 | cmake <path> [-G <generator>] | ||
| 13 | |||
| 14 | cmake supports multiple generators, see | ||
| 15 | http://www.cmake.org/cmake/help/v2.8.8/cmake.html#section_Generators for a list. | ||
| 16 | For win32 builds one of the "Visual Studio XX" or the "NMake Makefiles" | ||
| 17 | generators is preferred. For the "NMake Makefiles" generator to work the above | ||
| 18 | command must be called from an environment prepared for VC++ builds (see | ||
| 19 | http://msdn.microsoft.com/en-us/library/f2ccy3wt.aspx). | ||
diff --git a/cmake/addons/depends/windowsstore/p8-platform/p8-platform.txt b/cmake/addons/depends/windowsstore/p8-platform/p8-platform.txt deleted file mode 100644 index db6f782..0000000 --- a/cmake/addons/depends/windowsstore/p8-platform/p8-platform.txt +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | p8-platform https://github.com/afedchin/platform.git win10 | ||
diff --git a/cmake/addons/depends/windowsstore/prebuilt/README b/cmake/addons/depends/windowsstore/prebuilt/README deleted file mode 100644 index a0c70d6..0000000 --- a/cmake/addons/depends/windowsstore/prebuilt/README +++ /dev/null | |||
| @@ -1,21 +0,0 @@ | |||
| 1 | KODI WIN32 PREBUILT ADDON DEPENDENCIES | ||
| 2 | ====================================== | ||
| 3 | This directory contains a file or sub-directory for every prebuilt dependency | ||
| 4 | used by one of the addons being built. There are two different modes supported. | ||
| 5 | Both include a file named <library-id>.txt which must follow the defined format | ||
| 6 | <library-id> <download-url> | ||
| 7 | |||
| 8 | If the archive, which the <download-url> points at, contains | ||
| 9 | * only the necessary files and in the proper directory structure (i.e. an | ||
| 10 | "include" and a "lib" directory) then the file must be put into this | ||
| 11 | directory and nothing else is needed. | ||
| 12 | * unnecessary files and/or does not follow the defined directory structure | ||
| 13 | (i.e. an "include" and a "lib" directory) then the file must be put into a | ||
| 14 | sub-directory named <library-id>. Furthermore an additional file called | ||
| 15 | "install.txt" must be placed in that sub-directory. install.txt contains a | ||
| 16 | line for every path/directory/file with a destination where it must be copied | ||
| 17 | to. It must follow the defined format | ||
| 18 | <source> <destination> [<copy-destination>] | ||
| 19 | where <source> must be an existing file, directory or a path containing | ||
| 20 | wildcards, <destination> and the optional <copy-destination> must be existing | ||
| 21 | directories. | ||
