From 5f8335c1e49ce108ef3481863833c98efa00411b Mon Sep 17 00:00:00 2001 From: manuel Date: Thu, 2 Jul 2020 23:09:26 +0200 Subject: sync with upstream --- cmake/addons/CMakeLists.txt | 27 ++++++++--- cmake/addons/README.md | 2 +- cmake/addons/bootstrap/README.md | 1 + cmake/addons/depends/common/kodi-platform/deps.txt | 2 - .../depends/common/kodi-platform/kodi-platform.txt | 1 - .../depends/common/p8-platform/p8-platform.txt | 1 - cmake/addons/depends/common/tinyxml/CMakeLists.txt | 22 --------- cmake/addons/depends/common/tinyxml/tinyxml.sha256 | 1 - cmake/addons/depends/common/tinyxml/tinyxml.txt | 1 - cmake/addons/depends/windowsstore/CMakeLists.txt | 52 ---------------------- cmake/addons/depends/windowsstore/Install.cmake | 24 ---------- cmake/addons/depends/windowsstore/README | 19 -------- .../windowsstore/p8-platform/p8-platform.txt | 1 - cmake/addons/depends/windowsstore/prebuilt/README | 21 --------- 14 files changed, 23 insertions(+), 152 deletions(-) delete mode 100644 cmake/addons/depends/common/kodi-platform/deps.txt delete mode 100644 cmake/addons/depends/common/kodi-platform/kodi-platform.txt delete mode 100644 cmake/addons/depends/common/p8-platform/p8-platform.txt delete mode 100644 cmake/addons/depends/common/tinyxml/CMakeLists.txt delete mode 100644 cmake/addons/depends/common/tinyxml/tinyxml.sha256 delete mode 100644 cmake/addons/depends/common/tinyxml/tinyxml.txt delete mode 100644 cmake/addons/depends/windowsstore/CMakeLists.txt delete mode 100644 cmake/addons/depends/windowsstore/Install.cmake delete mode 100644 cmake/addons/depends/windowsstore/README delete mode 100644 cmake/addons/depends/windowsstore/p8-platform/p8-platform.txt delete mode 100644 cmake/addons/depends/windowsstore/prebuilt/README (limited to 'cmake/addons') 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) -DCMAKE_SYSTEM_VERSION=${CMAKE_SYSTEM_VERSION}) endif() +include(${CORE_SOURCE_DIR}/cmake/scripts/common/CompilerSettings.cmake) + set(BUILD_ARGS -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} -DCMAKE_INSTALL_PREFIX:PATH= -DPACKAGE_CONFIG_PATH=${ADDON_DEPENDS_PATH}/lib/pkgconfig @@ -121,6 +123,17 @@ if(CMAKE_TOOLCHAIN_FILE) message(STATUS ${BUILD_ARGS}) endif() +# used for addons where need special folders to store there content (if +# not set the addon define it byself). +# e.g. Google Chromium addon where his git bring: +# - "unable to create file" ... "Filename too long" +# see also WARNING by Windows on: https://bitbucket.org/chromiumembedded/cef/wiki/MasterBuildQuickStart +if(THIRD_PARTY_PATH) + message(STATUS "Third party lib path specified") + message(STATUS ${THIRD_PARTY_PATH}) + list(APPEND BUILD_ARGS -DTHIRD_PARTY_PATH=${THIRD_PARTY_PATH}) +endif() + if(NOT ADDONS_TO_BUILD) set(ADDONS_TO_BUILD "all") else() @@ -243,9 +256,14 @@ foreach(addon ${addons}) 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) + else() + foreach(ADDONLISTITEM ${ADDONS_TO_BUILD}) + if(id MATCHES "${ADDONLISTITEM}") + message(STATUS "Pattern ${ADDONLISTITEM} matches ${id}, building addon") + set(ADDON_FOUND TRUE) + break() + endif() + endforeach() endif() if(ADDON_FOUND) @@ -376,9 +394,6 @@ foreach(addon ${addons}) DEPENDERS build ALWAYS 1) - # add "kodi-platform" as a dependency to every addon - add_dependencies(${id} kodi-platform) - set(${id}_DEPENDS_DIR ${SOURCE_DIR}/depends) 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 @@ -![Kodi logo](https://raw.githubusercontent.com/xbmc/xbmc-forum/master/xbmc/images/logo-sbs-black.png) +![Kodi logo](https://github.com/xbmc/xbmc/raw/master/docs/resources/banner_slim.png) # Kodi add-ons CMake based buildsystem 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 `.txt` file in a separate sub-directory that must follow one of the defined formats: 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 @@ +![Kodi logo](https://github.com/xbmc/xbmc/raw/master/docs/resources/banner_slim.png) # KODI ADDON DEFINITIONS BOOTSTRAPPING This directory contains the cmake-based buildsystem for addon definitions 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 @@ -tinyxml -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 @@ -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 @@ -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 @@ -cmake_minimum_required(VERSION 3.1) -project(tinyxml) - -set(SOURCES src/tinystr.cpp - src/tinyxml.cpp - src/tinyxmlerror.cpp - src/tinyxmlparser.cpp) - -if(WIN32) - add_definitions(-DWIN32 -D_LIB) -endif() -add_definitions(-DTIXML_USE_STL) - -add_library(tinyxml ${SOURCES}) - -include_directories(${PROJECT_SOURCE_DIR}/include) - -set(HEADERS ${PROJECT_SOURCE_DIR}/include/tinystr.h - ${PROJECT_SOURCE_DIR}/include/tinyxml.h) - -install(FILES ${HEADERS} DESTINATION ${CMAKE_INSTALL_PREFIX}/include) -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 @@ -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 @@ -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 @@ -cmake_minimum_required(VERSION 3.1) -project(kodi-addons-depends-windows) - -list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}) - -if(NOT CMAKE_BUILD_TYPE) - set(CMAKE_BUILD_TYPE Release) -endif() - -include(ExternalProject) - -if(NOT ADDON_DEPENDS_PATH) - message(FATAL_ERROR "ADDON_DEPENDS_PATH (${ADDON_DEPENDS_PATH}) is not a valid target directory.") -else() - file(TO_CMAKE_PATH "${ADDON_DEPENDS_PATH}" ADDON_DEPENDS_PATH) -endif() -get_filename_component(ADDON_DEPENDS_PATH "${ADDON_DEPENDS_PATH}" ABSOLUTE) -list(APPEND CMAKE_PREFIX_PATH ${ADDON_DEPENDS_PATH}) - -if(NOT DEPENDS_TO_BUILD) - set(DEPENDS_TO_BUILD "all") -endif() - -function(add_internal id url inputfile) - externalproject_add(${id} - URL ${url} - PREFIX build/${id} - CONFIGURE_COMMAND "" - BUILD_COMMAND "" - INSTALL_COMMAND ${CMAKE_COMMAND} - -DINPUTDIR=${PROJECT_BINARY_DIR}/build/${id}/src/${id} - -DINPUTFILE=${inputfile} - -DDESTDIR=${ADDON_DEPENDS_PATH} - -P ${PROJECT_SOURCE_DIR}/Install.cmake - ) -endfunction() - -file(GLOB_RECURSE download_input_files prebuilt/*.txt) -foreach(file ${download_input_files}) - if(NOT file MATCHES install.txt) - file(STRINGS ${file} def) - get_filename_component(dir ${file} DIRECTORY) - string(REPLACE " " ";" def ${def}) - list(GET def 0 id) - - list(FIND DEPENDS_TO_BUILD ${id} idx) - if(idx GREATER -1 OR DEPENDS_TO_BUILD STREQUAL "all") - list(GET def 1 url) - add_internal(${id} ${url} ${dir}/install.txt) - endif() - endif() -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 @@ -if(EXISTS "${INPUTFILE}") - # if there's an input file we use it to determine which files to copy where - file(STRINGS ${INPUTFILE} FILES) - string(REPLACE "\n" ";" FILES "${FILES}") - foreach(file ${FILES}) - string(REPLACE " " ";" file "${file}") - list(GET file 0 dir) - list(GET file 1 dest) - list(LENGTH file deflength) - if(deflength GREATER 2) - list(GET file 2 copy) - endif() - file(GLOB files ${INPUTDIR}/${dir}) - foreach(instfile ${files}) - file(COPY ${instfile} DESTINATION ${DESTDIR}/${dest}) - if(copy) - file(COPY ${instfile} DESTINATION ${DESTDIR}/${copy}) - endif() - endforeach() - endforeach() -else() - # otherwise we assume that the content of the extracted archive is already well-formed and can just be copied - file(COPY ${INPUTDIR}/${dir} DESTINATION ${DESTDIR}) -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 @@ -KODI WIN32 ADDON DEPENDENCIES -============================= -This directory contains the cmake-based buildsystem for dependencies (currently -only prebuilt) used by one or multiple addons. The buildsystem looks into the -"prebuilt" sub-directory, downloads all the specified dependencies, extracts -them and places them into the "depends" sub-directory. - -To trigger the cmake-based buildsystem the following command must be executed -with being the path to this directory (absolute or relative, allowing for -in-source and out-of-source builds). - - cmake [-G ] - -cmake supports multiple generators, see -http://www.cmake.org/cmake/help/v2.8.8/cmake.html#section_Generators for a list. -For win32 builds one of the "Visual Studio XX" or the "NMake Makefiles" -generators is preferred. For the "NMake Makefiles" generator to work the above -command must be called from an environment prepared for VC++ builds (see -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 @@ -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 @@ -KODI WIN32 PREBUILT ADDON DEPENDENCIES -====================================== -This directory contains a file or sub-directory for every prebuilt dependency -used by one of the addons being built. There are two different modes supported. -Both include a file named .txt which must follow the defined format - - -If the archive, which the points at, contains - * only the necessary files and in the proper directory structure (i.e. an - "include" and a "lib" directory) then the file must be put into this - directory and nothing else is needed. - * unnecessary files and/or does not follow the defined directory structure - (i.e. an "include" and a "lib" directory) then the file must be put into a - sub-directory named . Furthermore an additional file called - "install.txt" must be placed in that sub-directory. install.txt contains a - line for every path/directory/file with a destination where it must be copied - to. It must follow the defined format - [] - where must be an existing file, directory or a path containing - wildcards, and the optional must be existing - directories. -- cgit v1.2.3