diff options
Diffstat (limited to 'cmake')
113 files changed, 1365 insertions, 689 deletions
diff --git a/cmake/KodiConfig.cmake.in b/cmake/KodiConfig.cmake.in index 9ec1215..a06d889 100644 --- a/cmake/KodiConfig.cmake.in +++ b/cmake/KodiConfig.cmake.in | |||
| @@ -4,6 +4,7 @@ set(APP_NAME_UC @APP_NAME_UC@) | |||
| 4 | set(APP_PACKAGE @APP_PACKAGE@) | 4 | set(APP_PACKAGE @APP_PACKAGE@) |
| 5 | set(APP_VERSION_MAJOR @APP_VERSION_MAJOR@) | 5 | set(APP_VERSION_MAJOR @APP_VERSION_MAJOR@) |
| 6 | set(APP_VERSION_MINOR @APP_VERSION_MINOR@) | 6 | set(APP_VERSION_MINOR @APP_VERSION_MINOR@) |
| 7 | set(APP_VERSION_CODE @APP_VERSION_CODE@) | ||
| 7 | if(NOT @APP_NAME_UC@_PREFIX) | 8 | if(NOT @APP_NAME_UC@_PREFIX) |
| 8 | set(@APP_NAME_UC@_PREFIX @APP_PREFIX@) | 9 | set(@APP_NAME_UC@_PREFIX @APP_PREFIX@) |
| 9 | endif() | 10 | endif() |
| @@ -17,9 +18,6 @@ if(NOT @APP_NAME_UC@_DATA_DIR) | |||
| 17 | set(@APP_NAME_UC@_DATA_DIR @APP_DATA_DIR@) | 18 | set(@APP_NAME_UC@_DATA_DIR @APP_DATA_DIR@) |
| 18 | endif() | 19 | endif() |
| 19 | set(APP_RENDER_SYSTEM @APP_RENDER_SYSTEM@) | 20 | set(APP_RENDER_SYSTEM @APP_RENDER_SYSTEM@) |
| 20 | if(NOT WIN32) | ||
| 21 | set(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS} @CXX11_SWITCH@") | ||
| 22 | endif() | ||
| 23 | list(APPEND CMAKE_MODULE_PATH @APP_LIB_DIR@ @APP_DATA_DIR@/cmake) | 21 | list(APPEND CMAKE_MODULE_PATH @APP_LIB_DIR@ @APP_DATA_DIR@/cmake) |
| 24 | 22 | ||
| 25 | string(REPLACE ";" " " ARCH_DEFINES "@ARCH_DEFINES@") | 23 | string(REPLACE ";" " " ARCH_DEFINES "@ARCH_DEFINES@") |
diff --git a/cmake/README.md b/cmake/README.md index 2febe48..9fd5d1b 100644 --- a/cmake/README.md +++ b/cmake/README.md | |||
| @@ -5,7 +5,7 @@ Welcome to Kodi's CMake Based Build System. CMake is a cross-platform tool for g | |||
| 5 | 5 | ||
| 6 | * Linux (several distros) | 6 | * Linux (several distros) |
| 7 | * Windows | 7 | * Windows |
| 8 | * macOS and iOS | 8 | * macOS, iOS and tvOS |
| 9 | * Android | 9 | * Android |
| 10 | * FreeBSD | 10 | * FreeBSD |
| 11 | 11 | ||
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. | ||
diff --git a/cmake/cpack/deb/copyright b/cmake/cpack/deb/copyright index 3033afd..3a3916c 100644 --- a/cmake/cpack/deb/copyright +++ b/cmake/cpack/deb/copyright | |||
| @@ -2362,6 +2362,33 @@ LZO Library - LZO real-time data compression library | |||
| 2362 | You should have received a copy of the GNU General Public License | 2362 | You should have received a copy of the GNU General Public License |
| 2363 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 2363 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 2364 | 2364 | ||
| 2365 | dav1d - AV1 cross-platform decoder | ||
| 2366 | <https://code.videolan.org/videolan/dav1d> | ||
| 2367 | |||
| 2368 | Copyright © 2018-2019, VideoLAN and dav1d authors | ||
| 2369 | All rights reserved. | ||
| 2370 | |||
| 2371 | Redistribution and use in source and binary forms, with or without | ||
| 2372 | modification, are permitted provided that the following conditions are met: | ||
| 2373 | |||
| 2374 | 1. Redistributions of source code must retain the above copyright notice, this | ||
| 2375 | list of conditions and the following disclaimer. | ||
| 2376 | |||
| 2377 | 2. Redistributions in binary form must reproduce the above copyright notice, | ||
| 2378 | this list of conditions and the following disclaimer in the documentation | ||
| 2379 | and/or other materials provided with the distribution. | ||
| 2380 | |||
| 2381 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | ||
| 2382 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
| 2383 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
| 2384 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR | ||
| 2385 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
| 2386 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 2387 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
| 2388 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
| 2389 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
| 2390 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 2391 | |||
| 2365 | Licenses: | 2392 | Licenses: |
| 2366 | 2393 | ||
| 2367 | License: GPL | 2394 | License: GPL |
| @@ -2908,3 +2935,113 @@ We are required to state that | |||
| 2908 | CompuServe Incorporated." | 2935 | CompuServe Incorporated." |
| 2909 | 2936 | ||
| 2910 | -- End of IJG License -- | 2937 | -- End of IJG License -- |
| 2938 | |||
| 2939 | License: Alliance for Open Media Patent License 1.0 | ||
| 2940 | |||
| 2941 | 1. License Terms. | ||
| 2942 | |||
| 2943 | 1.1. Patent License. Subject to the terms and conditions of this License, each | ||
| 2944 | Licensor, on behalf of itself and successors in interest and assigns, | ||
| 2945 | grants Licensee a non-sublicensable, perpetual, worldwide, non-exclusive, | ||
| 2946 | no-charge, royalty-free, irrevocable (except as expressly stated in this | ||
| 2947 | License) patent license to its Necessary Claims to make, use, sell, offer | ||
| 2948 | for sale, import or distribute any Implementation. | ||
| 2949 | |||
| 2950 | 1.2. Conditions. | ||
| 2951 | |||
| 2952 | 1.2.1. Availability. As a condition to the grant of rights to Licensee to make, | ||
| 2953 | sell, offer for sale, import or distribute an Implementation under | ||
| 2954 | Section 1.1, Licensee must make its Necessary Claims available under | ||
| 2955 | this License, and must reproduce this License with any Implementation | ||
| 2956 | as follows: | ||
| 2957 | |||
| 2958 | a. For distribution in source code, by including this License in the | ||
| 2959 | root directory of the source code with its Implementation. | ||
| 2960 | |||
| 2961 | b. For distribution in any other form (including binary, object form, | ||
| 2962 | and/or hardware description code (e.g., HDL, RTL, Gate Level Netlist, | ||
| 2963 | GDSII, etc.)), by including this License in the documentation, legal | ||
| 2964 | notices, and/or other written materials provided with the | ||
| 2965 | Implementation. | ||
| 2966 | |||
| 2967 | 1.2.2. Additional Conditions. This license is directly from Licensor to | ||
| 2968 | Licensee. Licensee acknowledges as a condition of benefiting from it | ||
| 2969 | that no rights from Licensor are received from suppliers, distributors, | ||
| 2970 | or otherwise in connection with this License. | ||
| 2971 | |||
| 2972 | 1.3. Defensive Termination. If any Licensee, its Affiliates, or its agents | ||
| 2973 | initiates patent litigation or files, maintains, or voluntarily | ||
| 2974 | participates in a lawsuit against another entity or any person asserting | ||
| 2975 | that any Implementation infringes Necessary Claims, any patent licenses | ||
| 2976 | granted under this License directly to the Licensee are immediately | ||
| 2977 | terminated as of the date of the initiation of action unless 1) that suit | ||
| 2978 | was in response to a corresponding suit regarding an Implementation first | ||
| 2979 | brought against an initiating entity, or 2) that suit was brought to | ||
| 2980 | enforce the terms of this License (including intervention in a third-party | ||
| 2981 | action by a Licensee). | ||
| 2982 | |||
| 2983 | 1.4. Disclaimers. The Reference Implementation and Specification are provided | ||
| 2984 | "AS IS" and without warranty. The entire risk as to implementing or | ||
| 2985 | otherwise using the Reference Implementation or Specification is assumed | ||
| 2986 | by the implementer and user. Licensor expressly disclaims any warranties | ||
| 2987 | (express, implied, or otherwise), including implied warranties of | ||
| 2988 | merchantability, non-infringement, fitness for a particular purpose, or | ||
| 2989 | title, related to the material. IN NO EVENT WILL LICENSOR BE LIABLE TO | ||
| 2990 | ANY OTHER PARTY FOR LOST PROFITS OR ANY FORM OF INDIRECT, SPECIAL, | ||
| 2991 | INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER FROM ANY CAUSES OF | ||
| 2992 | ACTION OF ANY KIND WITH RESPECT TO THIS LICENSE, WHETHER BASED ON BREACH | ||
| 2993 | OF CONTRACT, TORT (INCLUDING NEGLIGENCE), OR OTHERWISE, AND WHETHER OR | ||
| 2994 | NOT THE OTHER PARTRY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 2995 | |||
| 2996 | 2. Definitions. | ||
| 2997 | |||
| 2998 | 2.1. Affiliate. “Affiliate” means an entity that directly or indirectly | ||
| 2999 | Controls, is Controlled by, or is under common Control of that party. | ||
| 3000 | |||
| 3001 | 2.2. Control. “Control” means direct or indirect control of more than 50% of | ||
| 3002 | the voting power to elect directors of that corporation, or for any other | ||
| 3003 | entity, the power to direct management of such entity. | ||
| 3004 | |||
| 3005 | 2.3. Decoder. "Decoder" means any decoder that conforms fully with all | ||
| 3006 | non-optional portions of the Specification. | ||
| 3007 | |||
| 3008 | 2.4. Encoder. "Encoder" means any encoder that produces a bitstream that can | ||
| 3009 | be decoded by a Decoder only to the extent it produces such a bitstream. | ||
| 3010 | |||
| 3011 | 2.5. Final Deliverable. “Final Deliverable” means the final version of a | ||
| 3012 | deliverable approved by the Alliance for Open Media as a Final | ||
| 3013 | Deliverable. | ||
| 3014 | |||
| 3015 | 2.6. Implementation. "Implementation" means any implementation, including the | ||
| 3016 | Reference Implementation, that is an Encoder and/or a Decoder. An | ||
| 3017 | Implementation also includes components of an Implementation only to the | ||
| 3018 | extent they are used as part of an Implementation. | ||
| 3019 | |||
| 3020 | 2.7. License. “License” means this license. | ||
| 3021 | |||
| 3022 | 2.8. Licensee. “Licensee” means any person or entity who exercises patent | ||
| 3023 | rights granted under this License. | ||
| 3024 | |||
| 3025 | 2.9. Licensor. "Licensor" means (i) any Licensee that makes, sells, offers | ||
| 3026 | for sale, imports or distributes any Implementation, or (ii) a person | ||
| 3027 | or entity that has a licensing obligation to the Implementation as a | ||
| 3028 | result of its membership and/or participation in the Alliance for Open | ||
| 3029 | Media working group that developed the Specification. | ||
| 3030 | |||
| 3031 | 2.10. Necessary Claims. "Necessary Claims" means all claims of patents or | ||
| 3032 | patent applications, (a) that currently or at any time in the future, | ||
| 3033 | are owned or controlled by the Licensor, and (b) (i) would be an | ||
| 3034 | Essential Claim as defined by the W3C Policy as of February 5, 2004 | ||
| 3035 | (https://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential) | ||
| 3036 | as if the Specification was a W3C Recommendation; or (ii) are infringed | ||
| 3037 | by the Reference Implementation. | ||
| 3038 | |||
| 3039 | 2.11. Reference Implementation. “Reference Implementation” means an Encoder | ||
| 3040 | and/or Decoder released by the Alliance for Open Media as a Final | ||
| 3041 | Deliverable. | ||
| 3042 | |||
| 3043 | 2.12. Specification. “Specification” means the specification designated by | ||
| 3044 | the Alliance for Open Media as a Final Deliverable for which this | ||
| 3045 | License was issued. | ||
| 3046 | |||
| 3047 | -- End of Alliance for Open Media Patent License 1.0 License -- \ No newline at end of file | ||
diff --git a/cmake/cpack/deb/packages/kodi.txt.in b/cmake/cpack/deb/packages/kodi.txt.in index 4776622..78df46a 100644 --- a/cmake/cpack/deb/packages/kodi.txt.in +++ b/cmake/cpack/deb/packages/kodi.txt.in | |||
| @@ -15,7 +15,7 @@ PACKAGE_ARCHITECTURE all | |||
| 15 | PACKAGE_SECTION video | 15 | PACKAGE_SECTION video |
| 16 | PACKAGE_PRIORITY optional | 16 | PACKAGE_PRIORITY optional |
| 17 | PACKAGE_SHLIBDEPS | 17 | PACKAGE_SHLIBDEPS |
| 18 | PACKAGE_DEPENDS @APP_NAME_LC@-bin (>= @CPACK_DEBIAN_PACKAGE_VERSION@), @APP_NAME_LC@-bin (<< @CPACK_DEBIAN_PACKAGE_VERSION@.1~), curl, libcurl4 | libcurl3, mesa-utils, x11-utils, fonts-liberation | ttf-liberation, fonts-dejavu-core | ttf-dejavu-core, python-bluez | python-lightblue, python-imaging | python-pil, python-simplejson, libass9 | libass5 | libass4, libgif5 | libgif7, libnfs8 | libnfs4 | libnfs1, libbluray1 | libbluray2, libshairplay0, libvorbisfile3, libaacs0, libcec4, libgnutls30 | libgnutls-deb0-28 | libgnutls28 | libgnutls26, libxslt1.1 | 18 | PACKAGE_DEPENDS @APP_NAME_LC@-bin (>= @CPACK_DEBIAN_PACKAGE_VERSION@), @APP_NAME_LC@-bin (<< @CPACK_DEBIAN_PACKAGE_VERSION@.1~), curl, libcurl4 | libcurl3, mesa-utils, x11-utils, fonts-liberation | ttf-liberation, fonts-dejavu-core | ttf-dejavu-core, python3-pil, python3-simplejson, libass9 | libass5 | libass4, libgif5 | libgif7, libnfs8 | libnfs4 | libnfs1, libbluray1 | libbluray2, libshairplay0, libvorbisfile3, libaacs0, libcec4, libgnutls30 | libgnutls-deb0-28 | libgnutls28 | libgnutls26, libxslt1.1 |
| 19 | PACKAGE_RECOMMENDS libvdpau1, libva-intel-vaapi-driver, libva1 | 19 | PACKAGE_RECOMMENDS libvdpau1, libva-intel-vaapi-driver, libva1 |
| 20 | PACKAGE_SUGGESTS @APP_NAME_LC@-pvr-mythtv, @APP_NAME_LC@-pvr-vuplus, @APP_NAME_LC@-pvr-vdr-vnsi, @APP_NAME_LC@-pvr-njoy, @APP_NAME_LC@-pvr-nextpvr, @APP_NAME_LC@-pvr-mediaportal-tvserver, @APP_NAME_LC@-pvr-tvheadend-hts, @APP_NAME_LC@-pvr-dvbviewer, @APP_NAME_LC@-pvr-argustv, @APP_NAME_LC@-pvr-iptvsimple, @APP_NAME_LC@-audioencoder-vorbis, @APP_NAME_LC@-audioencoder-flac, @APP_NAME_LC@-audioencoder-lame | 20 | PACKAGE_SUGGESTS @APP_NAME_LC@-pvr-mythtv, @APP_NAME_LC@-pvr-vuplus, @APP_NAME_LC@-pvr-vdr-vnsi, @APP_NAME_LC@-pvr-njoy, @APP_NAME_LC@-pvr-nextpvr, @APP_NAME_LC@-pvr-mediaportal-tvserver, @APP_NAME_LC@-pvr-tvheadend-hts, @APP_NAME_LC@-pvr-dvbviewer, @APP_NAME_LC@-pvr-argustv, @APP_NAME_LC@-pvr-iptvsimple, @APP_NAME_LC@-audioencoder-vorbis, @APP_NAME_LC@-audioencoder-flac, @APP_NAME_LC@-audioencoder-lame |
| 21 | PACKAGE_BREAKS xbmc (<< 2:14.0~git20141019), xbmc-data, xbmc-standalone | 21 | PACKAGE_BREAKS xbmc (<< 2:14.0~git20141019), xbmc-data, xbmc-standalone |
diff --git a/cmake/installdata/common/certificates.txt b/cmake/installdata/common/certificates.txt index 14e74a7..e802c04 100644 --- a/cmake/installdata/common/certificates.txt +++ b/cmake/installdata/common/certificates.txt | |||
| @@ -1 +1 @@ | |||
| tools/depends/target/openssl/cacert.pem system/certs \ No newline at end of file | system/certs/* | ||
diff --git a/cmake/installdata/ios/fontconfig.txt b/cmake/installdata/darwin_embedded/fontconfig.txt index 1f1bd9d..1f1bd9d 100644 --- a/cmake/installdata/ios/fontconfig.txt +++ b/cmake/installdata/darwin_embedded/fontconfig.txt | |||
diff --git a/cmake/installdata/ios/packaging.txt b/cmake/installdata/darwin_embedded/packaging.txt index 3d5ae4a..3d5ae4a 100644 --- a/cmake/installdata/ios/packaging.txt +++ b/cmake/installdata/darwin_embedded/packaging.txt | |||
diff --git a/cmake/installdata/ios/runtime.txt b/cmake/installdata/darwin_embedded/runtime.txt index 3bb5467..3bb5467 100644 --- a/cmake/installdata/ios/runtime.txt +++ b/cmake/installdata/darwin_embedded/runtime.txt | |||
diff --git a/cmake/installdata/test-reference-data.txt b/cmake/installdata/test-reference-data.txt index b6c94a7..91738ba 100644 --- a/cmake/installdata/test-reference-data.txt +++ b/cmake/installdata/test-reference-data.txt | |||
| @@ -1,10 +1,18 @@ | |||
| 1 | xbmc/utils/test/CXBMCTinyXML-test.xml | 1 | xbmc/utils/test/CXBMCTinyXML-test.xml |
| 2 | xbmc/utils/test/data/language/Spanish/strings.po | 2 | xbmc/utils/test/data/language/Spanish/strings.po |
| 3 | xbmc/filesystem/test/extendedlocalheader.zip | ||
| 3 | xbmc/filesystem/test/reffile.txt | 4 | xbmc/filesystem/test/reffile.txt |
| 4 | xbmc/filesystem/test/reffile.txt.rar | 5 | xbmc/filesystem/test/reffile.txt.rar |
| 5 | xbmc/filesystem/test/reffile.txt.zip | 6 | xbmc/filesystem/test/reffile.txt.zip |
| 6 | xbmc/filesystem/test/refRARnormal.rar | 7 | xbmc/filesystem/test/refRARnormal.rar |
| 7 | xbmc/filesystem/test/refRARstored.rar | 8 | xbmc/filesystem/test/refRARstored.rar |
| 9 | xbmc/filesystem/test/data/httpdirectory/apache-default.html | ||
| 10 | xbmc/filesystem/test/data/httpdirectory/apache-fancy.html | ||
| 11 | xbmc/filesystem/test/data/httpdirectory/apache-html.html | ||
| 12 | xbmc/filesystem/test/data/httpdirectory/basic.html | ||
| 13 | xbmc/filesystem/test/data/httpdirectory/basic-multiline.html | ||
| 14 | xbmc/filesystem/test/data/httpdirectory/lighttp-default.html | ||
| 15 | xbmc/filesystem/test/data/httpdirectory/nginx-default.html | ||
| 8 | xbmc/network/test/data/test.html | 16 | xbmc/network/test/data/test.html |
| 9 | xbmc/network/test/data/test.png | 17 | xbmc/network/test/data/test.png |
| 10 | xbmc/network/test/data/test-ranges.txt | 18 | xbmc/network/test/data/test-ranges.txt |
diff --git a/cmake/modules/FindAML.cmake b/cmake/modules/FindAML.cmake deleted file mode 100644 index 89d1fd9..0000000 --- a/cmake/modules/FindAML.cmake +++ /dev/null | |||
| @@ -1,49 +0,0 @@ | |||
| 1 | #.rst: | ||
| 2 | # FindAML | ||
| 3 | # ------- | ||
| 4 | # Finds the AML codec | ||
| 5 | # | ||
| 6 | # This will define the following variables:: | ||
| 7 | # | ||
| 8 | # AML_FOUND - system has AML | ||
| 9 | # AML_INCLUDE_DIRS - the AML include directory | ||
| 10 | # AML_DEFINITIONS - the AML definitions | ||
| 11 | # | ||
| 12 | # and the following imported targets:: | ||
| 13 | # | ||
| 14 | # AML::AML - The AML codec | ||
| 15 | |||
| 16 | find_path(AML_INCLUDE_DIR codec_error.h | ||
| 17 | PATH_SUFFIXES amcodec) | ||
| 18 | |||
| 19 | include(FindPackageHandleStandardArgs) | ||
| 20 | find_package_handle_standard_args(AML | ||
| 21 | REQUIRED_VARS AML_INCLUDE_DIR) | ||
| 22 | |||
| 23 | include(CheckCSourceCompiles) | ||
| 24 | set(CMAKE_REQUIRED_INCLUDES ${AML_INCLUDE_DIR}) | ||
| 25 | check_c_source_compiles("#include <amcodec/codec.h> | ||
| 26 | |||
| 27 | int main() | ||
| 28 | { | ||
| 29 | int i = VIDEO_DEC_FORMAT_VP9; | ||
| 30 | return 0; | ||
| 31 | } | ||
| 32 | " AML_HAS_VP9) | ||
| 33 | |||
| 34 | if(AML_FOUND) | ||
| 35 | set(AML_INCLUDE_DIRS ${AML_INCLUDE_DIR}) | ||
| 36 | set(AML_DEFINITIONS -DHAS_LIBAMCODEC=1) | ||
| 37 | if(AML_HAS_VP9) | ||
| 38 | list(APPEND AML_DEFINITIONS -DHAS_LIBAMCODEC_VP9=1) | ||
| 39 | endif() | ||
| 40 | |||
| 41 | if(NOT TARGET AML::AML) | ||
| 42 | add_library(AML::AML UNKNOWN IMPORTED) | ||
| 43 | set_target_properties(AML::AML PROPERTIES | ||
| 44 | INTERFACE_INCLUDE_DIRECTORIES "${AML_INCLUDE_DIR}" | ||
| 45 | INTERFACE_COMPILE_DEFINITIONS HAS_LIBAMCODEC=1) | ||
| 46 | endif() | ||
| 47 | endif() | ||
| 48 | |||
| 49 | mark_as_advanced(AMLCODEC_INCLUDE_DIR) | ||
diff --git a/cmake/modules/FindBluray.cmake b/cmake/modules/FindBluray.cmake index 58a9a91..34bc50e 100644 --- a/cmake/modules/FindBluray.cmake +++ b/cmake/modules/FindBluray.cmake | |||
| @@ -48,6 +48,10 @@ if(BLURAY_FOUND) | |||
| 48 | list(APPEND BLURAY_DEFINITIONS -DHAVE_LIBBLURAY_BDJ=1) | 48 | list(APPEND BLURAY_DEFINITIONS -DHAVE_LIBBLURAY_BDJ=1) |
| 49 | endif() | 49 | endif() |
| 50 | 50 | ||
| 51 | if(${BLURAY_LIBRARY} MATCHES ".+\.a$" AND PC_BLURAY_STATIC_LIBRARIES) | ||
| 52 | list(APPEND BLURAY_LIBRARIES ${PC_BLURAY_STATIC_LIBRARIES}) | ||
| 53 | endif() | ||
| 54 | |||
| 51 | if(NOT TARGET Bluray::Bluray) | 55 | if(NOT TARGET Bluray::Bluray) |
| 52 | add_library(Bluray::Bluray UNKNOWN IMPORTED) | 56 | add_library(Bluray::Bluray UNKNOWN IMPORTED) |
| 53 | if(BLURAY_LIBRARY) | 57 | if(BLURAY_LIBRARY) |
diff --git a/cmake/modules/FindCdio.cmake b/cmake/modules/FindCdio.cmake index 91ba7bc..465ecc6 100644 --- a/cmake/modules/FindCdio.cmake +++ b/cmake/modules/FindCdio.cmake | |||
| @@ -8,47 +8,27 @@ | |||
| 8 | # CDIO_FOUND - system has cdio | 8 | # CDIO_FOUND - system has cdio |
| 9 | # CDIO_INCLUDE_DIRS - the cdio include directory | 9 | # CDIO_INCLUDE_DIRS - the cdio include directory |
| 10 | # CDIO_LIBRARIES - the cdio libraries | 10 | # CDIO_LIBRARIES - the cdio libraries |
| 11 | # | ||
| 12 | # and the following imported targets:: | ||
| 13 | # | ||
| 14 | # CDIO::CDIO - The cdio library | ||
| 15 | 11 | ||
| 16 | if(PKG_CONFIG_FOUND) | 12 | if(PKG_CONFIG_FOUND) |
| 17 | pkg_check_modules(PC_CDIO libcdio>=0.78 libiso9660 QUIET) | 13 | pkg_check_modules(PC_CDIO libcdio>=0.80 QUIET) |
| 18 | endif() | 14 | endif() |
| 19 | 15 | ||
| 20 | find_path(CDIO_INCLUDE_DIR NAMES cdio/cdio.h | 16 | find_path(CDIO_INCLUDE_DIR NAMES cdio/cdio.h |
| 21 | PATHS ${PC_CDIO_libcdio_INCLUDEDIR} | 17 | PATHS ${PC_CDIO_INCLUDEDIR}) |
| 22 | ${PC_CDIO_libiso9660_INCLUDEDIR}) | ||
| 23 | find_library(CDIO_LIBRARY NAMES cdio libcdio | ||
| 24 | PATHS ${CDIO_libcdio_LIBDIR} ${CDIO_libiso9660_LIBDIR}) | ||
| 25 | 18 | ||
| 26 | if(NOT WIN32) | 19 | find_library(CDIO_LIBRARY NAMES cdio libcdio |
| 27 | find_path(ISO9660_INCLUDE_DIR NAMES cdio/iso9660.h | 20 | PATHS ${PC_CDIO_LIBDIR}) |
| 28 | PATHS ${PC_CDIO_libcdio_INCLUDEDIR} | ||
| 29 | ${PC_CDIO_libiso9660_INCLUDEDIR}) | ||
| 30 | find_library(ISO9660_LIBRARY NAMES iso9660 | ||
| 31 | PATHS ${CDIO_libcdio_LIBDIR} ${CDIO_libiso9660_LIBDIR}) | ||
| 32 | list(APPEND ISO9660_VARS ISO9660_INCLUDE_DIR ISO9660_LIBRARY) | ||
| 33 | endif() | ||
| 34 | 21 | ||
| 35 | set(CDIO_VERSION ${PC_CDIO_libcdio_VERSION}) | 22 | set(CDIO_VERSION ${PC_CDIO_VERSION}) |
| 36 | 23 | ||
| 37 | include(FindPackageHandleStandardArgs) | 24 | include(FindPackageHandleStandardArgs) |
| 38 | find_package_handle_standard_args(Cdio | 25 | find_package_handle_standard_args(Cdio |
| 39 | REQUIRED_VARS CDIO_LIBRARY CDIO_INCLUDE_DIR ${ISO9660_VARS} | 26 | REQUIRED_VARS CDIO_LIBRARY CDIO_INCLUDE_DIR |
| 40 | VERSION_VAR CDIO_VERSION) | 27 | VERSION_VAR CDIO_VERSION) |
| 41 | 28 | ||
| 42 | if(CDIO_FOUND) | 29 | if(CDIO_FOUND) |
| 43 | set(CDIO_LIBRARIES ${CDIO_LIBRARY} ${ISO9660_LIBRARY}) | 30 | set(CDIO_LIBRARIES ${CDIO_LIBRARY}) |
| 44 | set(CDIO_INCLUDE_DIRS ${CDIO_INCLUDE_DIR} ${ISO9660_INCLUDE_DIR}) | 31 | set(CDIO_INCLUDE_DIRS ${CDIO_INCLUDE_DIR}) |
| 45 | |||
| 46 | if(NOT TARGET CDIO::CDIO) | ||
| 47 | add_library(CDIO::CDIO UNKNOWN IMPORTED) | ||
| 48 | set_target_properties(CDIO::CDIO PROPERTIES | ||
| 49 | IMPORTED_LOCATION "${CDIO_LIBRARY}" | ||
| 50 | INTERFACE_INCLUDE_DIRECTORIES "${CDIO_INCLUDE_DIR}") | ||
| 51 | endif() | ||
| 52 | endif() | 32 | endif() |
| 53 | 33 | ||
| 54 | mark_as_advanced(CDIO_INCLUDE_DIR CDIO_LIBRARY ISO9660_INCLUDE_DIR ISO9660_LIBRARY) | 34 | mark_as_advanced(CDIO_INCLUDE_DIR CDIO_LIBRARY) |
diff --git a/cmake/modules/FindClangFormat.cmake b/cmake/modules/FindClangFormat.cmake new file mode 100644 index 0000000..7220d31 --- /dev/null +++ b/cmake/modules/FindClangFormat.cmake | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | #.rst: | ||
| 2 | # FindClangFormat | ||
| 3 | # ---------- | ||
| 4 | # Finds clang-format | ||
| 5 | |||
| 6 | find_program(CLANG_FORMAT_EXECUTABLE clang-format) | ||
| 7 | |||
| 8 | include(FindPackageHandleStandardArgs) | ||
| 9 | find_package_handle_standard_args(ClangFormat REQUIRED_VARS CLANG_FORMAT_EXECUTABLE) | ||
| 10 | |||
| 11 | mark_as_advanced(CLANG_FORMAT_EXECUTABLE) | ||
diff --git a/cmake/modules/FindCpluff.cmake b/cmake/modules/FindCpluff.cmake deleted file mode 100644 index 9e29e17..0000000 --- a/cmake/modules/FindCpluff.cmake +++ /dev/null | |||
| @@ -1,51 +0,0 @@ | |||
| 1 | # - Builds Cpluff as external project | ||
| 2 | # Once done this will define | ||
| 3 | # | ||
| 4 | # CPLUFF_FOUND - system has cpluff | ||
| 5 | # CPLUFF_INCLUDE_DIRS - the cpluff include directories | ||
| 6 | # | ||
| 7 | # and link Kodi against the cpluff libraries. | ||
| 8 | |||
| 9 | find_package(EXPAT REQUIRED) | ||
| 10 | if(CORE_SYSTEM_NAME MATCHES windows) | ||
| 11 | add_subdirectory(${CMAKE_SOURCE_DIR}/lib/cpluff) | ||
| 12 | set(CPLUFF_LIBRARIES $<TARGET_FILE:libcpluff> ${EXPAT_LIBRARIES}) | ||
| 13 | else() | ||
| 14 | string(REPLACE ";" " " defines "${CMAKE_C_FLAGS} ${SYSTEM_DEFINES} -I${EXPAT_INCLUDE_DIR}") | ||
| 15 | get_filename_component(expat_dir ${EXPAT_LIBRARY} DIRECTORY) | ||
| 16 | set(ldflags "-L${expat_dir}") | ||
| 17 | |||
| 18 | # iOS: Without specifying -arch, configure tries to use /bin/cpp as C-preprocessor | ||
| 19 | # http://stackoverflow.com/questions/38836754/cant-cross-compile-c-library-for-arm-ios | ||
| 20 | if(CORE_SYSTEM_NAME STREQUAL ios) | ||
| 21 | set(cppflags "-arch ${CPU}") | ||
| 22 | endif() | ||
| 23 | |||
| 24 | ExternalProject_Add(libcpluff SOURCE_DIR ${CMAKE_SOURCE_DIR}/lib/cpluff | ||
| 25 | BUILD_IN_SOURCE 1 | ||
| 26 | PREFIX ${CORE_BUILD_DIR}/cpluff | ||
| 27 | CONFIGURE_COMMAND AR=${CMAKE_AR} RANLIB=${CMAKE_RANLIB} CC=${CMAKE_C_COMPILER} ${CMAKE_SOURCE_DIR}/lib/cpluff/configure | ||
| 28 | --disable-nls | ||
| 29 | --enable-static | ||
| 30 | --disable-shared | ||
| 31 | --with-pic | ||
| 32 | --prefix=<INSTALL_DIR> | ||
| 33 | --libdir=<INSTALL_DIR>/lib | ||
| 34 | --host=${ARCH} | ||
| 35 | CFLAGS=${defines} | ||
| 36 | CPPFLAGS=${cppflags} | ||
| 37 | LDFLAGS=${ldflags} | ||
| 38 | BUILD_BYPRODUCTS <INSTALL_DIR>/lib/libcpluff.a) | ||
| 39 | ExternalProject_Add_Step(libcpluff autoreconf | ||
| 40 | DEPENDEES download update patch | ||
| 41 | DEPENDERS configure | ||
| 42 | COMMAND rm -f config.status | ||
| 43 | COMMAND PATH=${NATIVEPREFIX}/bin:$ENV{PATH} autoreconf -vif | ||
| 44 | WORKING_DIRECTORY <SOURCE_DIR>) | ||
| 45 | |||
| 46 | set(CPLUFF_LIBRARIES ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/cpluff/lib/libcpluff.a ${EXPAT_LIBRARIES}) | ||
| 47 | endif() | ||
| 48 | set(CPLUFF_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/cpluff/include) | ||
| 49 | set(CPLUFF_FOUND 1) | ||
| 50 | mark_as_advanced(CPLUFF_INCLUDE_DIRS CPLUFF_LIBRARIES) | ||
| 51 | set_target_properties(libcpluff PROPERTIES FOLDER "External Projects") | ||
diff --git a/cmake/modules/FindCrossGUID.cmake b/cmake/modules/FindCrossGUID.cmake index 7384747..613c2a4 100644 --- a/cmake/modules/FindCrossGUID.cmake +++ b/cmake/modules/FindCrossGUID.cmake | |||
| @@ -34,9 +34,6 @@ if(ENABLE_INTERNAL_CROSSGUID) | |||
| 34 | <SOURCE_DIR> && | 34 | <SOURCE_DIR> && |
| 35 | ${CMAKE_COMMAND} -E copy | 35 | ${CMAKE_COMMAND} -E copy |
| 36 | ${CMAKE_SOURCE_DIR}/tools/depends/target/crossguid/FindUUID.cmake | 36 | ${CMAKE_SOURCE_DIR}/tools/depends/target/crossguid/FindUUID.cmake |
| 37 | <SOURCE_DIR> && | ||
| 38 | ${CMAKE_COMMAND} -E copy | ||
| 39 | ${CMAKE_SOURCE_DIR}/tools/depends/target/crossguid/FindCXX11.cmake | ||
| 40 | <SOURCE_DIR> | 37 | <SOURCE_DIR> |
| 41 | BUILD_BYPRODUCTS ${CROSSGUID_LIBRARY}) | 38 | BUILD_BYPRODUCTS ${CROSSGUID_LIBRARY}) |
| 42 | set_target_properties(crossguid PROPERTIES FOLDER "External Projects") | 39 | set_target_properties(crossguid PROPERTIES FOLDER "External Projects") |
| @@ -49,7 +46,7 @@ if(ENABLE_INTERNAL_CROSSGUID) | |||
| 49 | set(CROSSGUID_LIBRARIES ${CROSSGUID_LIBRARY}) | 46 | set(CROSSGUID_LIBRARIES ${CROSSGUID_LIBRARY}) |
| 50 | set(CROSSGUID_INCLUDE_DIRS ${CROSSGUID_INCLUDE_DIR}) | 47 | set(CROSSGUID_INCLUDE_DIRS ${CROSSGUID_INCLUDE_DIR}) |
| 51 | else() | 48 | else() |
| 52 | find_path(CROSSGUID_INCLUDE_DIR NAMES guid.h) | 49 | find_path(CROSSGUID_INCLUDE_DIR NAMES guid.hpp guid.h) |
| 53 | 50 | ||
| 54 | find_library(CROSSGUID_LIBRARY_RELEASE NAMES crossguid) | 51 | find_library(CROSSGUID_LIBRARY_RELEASE NAMES crossguid) |
| 55 | find_library(CROSSGUID_LIBRARY_DEBUG NAMES crossguidd) | 52 | find_library(CROSSGUID_LIBRARY_DEBUG NAMES crossguidd) |
| @@ -65,6 +62,10 @@ else() | |||
| 65 | set(CROSSGUID_LIBRARIES ${CROSSGUID_LIBRARY}) | 62 | set(CROSSGUID_LIBRARIES ${CROSSGUID_LIBRARY}) |
| 66 | set(CROSSGUID_INCLUDE_DIRS ${CROSSGUID_INCLUDE_DIR}) | 63 | set(CROSSGUID_INCLUDE_DIRS ${CROSSGUID_INCLUDE_DIR}) |
| 67 | 64 | ||
| 65 | if(EXISTS "${CROSSGUID_INCLUDE_DIR}/guid.hpp") | ||
| 66 | set(CROSSGUID_DEFINITIONS -DHAVE_NEW_CROSSGUID) | ||
| 67 | endif() | ||
| 68 | |||
| 68 | add_custom_target(crossguid) | 69 | add_custom_target(crossguid) |
| 69 | set_target_properties(crossguid PROPERTIES FOLDER "External Projects") | 70 | set_target_properties(crossguid PROPERTIES FOLDER "External Projects") |
| 70 | endif() | 71 | endif() |
diff --git a/cmake/modules/FindDav1d.cmake b/cmake/modules/FindDav1d.cmake new file mode 100644 index 0000000..7625afa --- /dev/null +++ b/cmake/modules/FindDav1d.cmake | |||
| @@ -0,0 +1,82 @@ | |||
| 1 | #.rst: | ||
| 2 | # FindDav1d | ||
| 3 | # -------- | ||
| 4 | # Finds the dav1d library | ||
| 5 | # | ||
| 6 | # This will define the following variables:: | ||
| 7 | # | ||
| 8 | # DAV1D_FOUND - system has dav1d | ||
| 9 | # DAV1D_INCLUDE_DIRS - the dav1d include directories | ||
| 10 | # DAV1D_LIBRARIES - the dav1d libraries | ||
| 11 | |||
| 12 | if(PKG_CONFIG_FOUND) | ||
| 13 | pkg_check_modules(PC_DAV1D dav1d QUIET) | ||
| 14 | endif() | ||
| 15 | |||
| 16 | find_library(DAV1D_LIBRARY NAMES dav1d libdav1d | ||
| 17 | PATHS ${PC_DAV1D_LIBDIR}) | ||
| 18 | |||
| 19 | find_path(DAV1D_INCLUDE_DIR NAMES dav1d/dav1d.h | ||
| 20 | PATHS ${PC_DAV1D_INCLUDEDIR}) | ||
| 21 | |||
| 22 | set(DAV1D_VERSION ${PC_DAV1D_VERSION}) | ||
| 23 | |||
| 24 | if(ENABLE_INTERNAL_DAV1D) | ||
| 25 | include(ExternalProject) | ||
| 26 | |||
| 27 | # Extract version | ||
| 28 | file(STRINGS ${CMAKE_SOURCE_DIR}/tools/depends/target/dav1d/DAV1D-VERSION VER) | ||
| 29 | |||
| 30 | string(REGEX MATCH "VERSION=[^ ]*$.*" DAV1D_VER "${VER}") | ||
| 31 | list(GET DAV1D_VER 0 DAV1D_VER) | ||
| 32 | string(SUBSTRING "${DAV1D_VER}" 8 -1 DAV1D_VER) | ||
| 33 | |||
| 34 | # allow user to override the download URL with a local tarball | ||
| 35 | # needed for offline build envs | ||
| 36 | if(DAV1D_URL) | ||
| 37 | get_filename_component(DAV1D_URL "${DAV1D_URL}" ABSOLUTE) | ||
| 38 | else() | ||
| 39 | set(DAV1D_URL http://mirrors.kodi.tv/build-deps/sources/dav1d-${DAV1D_VER}.tar.gz) | ||
| 40 | endif() | ||
| 41 | |||
| 42 | if(VERBOSE) | ||
| 43 | message(STATUS "DAV1D_URL: ${DAV1D_URL}") | ||
| 44 | endif() | ||
| 45 | |||
| 46 | set(DAV1D_LIBRARY ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/lib/libdav1d.a) | ||
| 47 | set(DAV1D_INCLUDE_DIR ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/include) | ||
| 48 | set(DAV1D_VERSION ${DAV1D_VER}) | ||
| 49 | |||
| 50 | externalproject_add(dav1d | ||
| 51 | URL ${DAV1D_URL} | ||
| 52 | DOWNLOAD_NAME dav1d-${DAV1D_VER}.tar.gz | ||
| 53 | DOWNLOAD_DIR ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/download | ||
| 54 | PREFIX ${CORE_BUILD_DIR}/dav1d | ||
| 55 | CONFIGURE_COMMAND meson | ||
| 56 | --buildtype=release | ||
| 57 | --default-library=static | ||
| 58 | --prefix=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR} | ||
| 59 | --libdir=lib | ||
| 60 | -Denable_asm=true | ||
| 61 | -Denable_tools=false | ||
| 62 | -Denable_examples=false | ||
| 63 | -Denable_tests=false | ||
| 64 | ../dav1d | ||
| 65 | BUILD_COMMAND ninja | ||
| 66 | INSTALL_COMMAND ninja install | ||
| 67 | BUILD_BYPRODUCTS ${DAV1D_LIBRARY}) | ||
| 68 | |||
| 69 | set_target_properties(dav1d PROPERTIES FOLDER "External Projects") | ||
| 70 | endif() | ||
| 71 | |||
| 72 | include(FindPackageHandleStandardArgs) | ||
| 73 | find_package_handle_standard_args(Dav1d | ||
| 74 | REQUIRED_VARS DAV1D_LIBRARY DAV1D_INCLUDE_DIR | ||
| 75 | VERSION_VAR DAV1D_VERSION) | ||
| 76 | |||
| 77 | if(DAV1D_FOUND) | ||
| 78 | set(DAV1D_INCLUDE_DIRS ${DAV1D_INCLUDE_DIR}) | ||
| 79 | set(DAV1D_LIBRARIES ${DAV1D_LIBRARY}) | ||
| 80 | endif() | ||
| 81 | |||
| 82 | mark_as_advanced(DAV1D_INCLUDE_DIR DAV1D_LIBRARY) | ||
diff --git a/cmake/modules/FindEpollShim.cmake b/cmake/modules/FindEpollShim.cmake new file mode 100644 index 0000000..61366d8 --- /dev/null +++ b/cmake/modules/FindEpollShim.cmake | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | # FindEpollShim | ||
| 2 | # ------------- | ||
| 3 | # Finds the epoll-shim library | ||
| 4 | # | ||
| 5 | # This will define the following variables:: | ||
| 6 | # | ||
| 7 | # EPOLLSHIM_FOUND - the system has epoll-shim | ||
| 8 | # EPOLLSHIM_INCLUDE_DIR - the epoll-shim include directory | ||
| 9 | # EPOLLSHIM_LIBRARY - the epoll-shim library | ||
| 10 | |||
| 11 | if(PKG_CONFIG_FOUND) | ||
| 12 | pkg_check_modules(PC_EPOLLSHIM epoll-shim QUIET) | ||
| 13 | endif() | ||
| 14 | |||
| 15 | find_path(EPOLLSHIM_INCLUDE_DIR NAMES sys/epoll.h PATHS ${PC_EPOLLSHIM_INCLUDE_DIRS}) | ||
| 16 | find_library(EPOLLSHIM_LIBRARY NAMES epoll-shim PATHS ${PC_EPOLLSHIM_LIBDIR}) | ||
| 17 | |||
| 18 | include(FindPackageHandleStandardArgs) | ||
| 19 | find_package_handle_standard_args(EpollShim | ||
| 20 | REQUIRED_VARS EPOLLSHIM_LIBRARY EPOLLSHIM_INCLUDE_DIR) | ||
| 21 | |||
| 22 | if(EPOLLSHIM_FOUND) | ||
| 23 | set(EPOLLSHIM_INCLUDE_DIRS ${EPOLLSHIM_INCLUDE_DIR}) | ||
| 24 | set(EPOLLSHIM_LIBRARIES ${EPOLLSHIM_LIBRARY}) | ||
| 25 | endif() | ||
| 26 | |||
| 27 | mark_as_advanced(EPOLLSHIM_INCLUDE_DIR EPOLLSHIM_LIBRARY) | ||
diff --git a/cmake/modules/FindFFMPEG.cmake b/cmake/modules/FindFFMPEG.cmake index ef74671..81d2697 100644 --- a/cmake/modules/FindFFMPEG.cmake +++ b/cmake/modules/FindFFMPEG.cmake | |||
| @@ -33,14 +33,14 @@ | |||
| 33 | # | 33 | # |
| 34 | 34 | ||
| 35 | # required ffmpeg library versions | 35 | # required ffmpeg library versions |
| 36 | set(REQUIRED_FFMPEG_VERSION 4.0) | 36 | set(REQUIRED_FFMPEG_VERSION 4.3) |
| 37 | set(_avcodec_ver ">=58.18.100") | 37 | set(_avcodec_ver ">=58.91.100") |
| 38 | set(_avfilter_ver ">=7.16.100") | 38 | set(_avfilter_ver ">=7.85.100") |
| 39 | set(_avformat_ver ">=58.12.100") | 39 | set(_avformat_ver ">=58.45.100") |
| 40 | set(_avutil_ver ">=56.14.100") | 40 | set(_avutil_ver ">=56.51.100") |
| 41 | set(_swscale_ver ">=5.1.100") | 41 | set(_swscale_ver ">=5.7.100") |
| 42 | set(_swresample_ver ">=3.1.100") | 42 | set(_swresample_ver ">=3.7.100") |
| 43 | set(_postproc_ver ">=55.1.100") | 43 | set(_postproc_ver ">=55.7.100") |
| 44 | 44 | ||
| 45 | 45 | ||
| 46 | # Allows building with external ffmpeg not found in system paths, | 46 | # Allows building with external ffmpeg not found in system paths, |
| @@ -229,10 +229,16 @@ if(NOT FFMPEG_FOUND) | |||
| 229 | message(STATUS "FFMPEG_URL: ${FFMPEG_URL}") | 229 | message(STATUS "FFMPEG_URL: ${FFMPEG_URL}") |
| 230 | endif() | 230 | endif() |
| 231 | 231 | ||
| 232 | if (NOT DAV1D_FOUND) | ||
| 233 | message(STATUS "dav1d not found, internal ffmpeg build will be missing AV1 support!") | ||
| 234 | endif() | ||
| 235 | |||
| 232 | set(FFMPEG_OPTIONS -DENABLE_CCACHE=${ENABLE_CCACHE} | 236 | set(FFMPEG_OPTIONS -DENABLE_CCACHE=${ENABLE_CCACHE} |
| 233 | -DCCACHE_PROGRAM=${CCACHE_PROGRAM} | 237 | -DCCACHE_PROGRAM=${CCACHE_PROGRAM} |
| 234 | -DENABLE_VAAPI=${ENABLE_VAAPI} | 238 | -DENABLE_VAAPI=${ENABLE_VAAPI} |
| 235 | -DENABLE_VDPAU=${ENABLE_VDPAU}) | 239 | -DENABLE_VDPAU=${ENABLE_VDPAU} |
| 240 | -DENABLE_DAV1D=${DAV1D_FOUND} | ||
| 241 | -DEXTRA_FLAGS=${FFMPEG_EXTRA_FLAGS}) | ||
| 236 | 242 | ||
| 237 | if(KODI_DEPENDSBUILD) | 243 | if(KODI_DEPENDSBUILD) |
| 238 | set(CROSS_ARGS -DDEPENDS_PATH=${DEPENDS_PATH} | 244 | set(CROSS_ARGS -DDEPENDS_PATH=${DEPENDS_PATH} |
| @@ -265,6 +271,7 @@ if(NOT FFMPEG_FOUND) | |||
| 265 | -DCMAKE_EXE_LINKER_FLAGS=${LINKER_FLAGS} | 271 | -DCMAKE_EXE_LINKER_FLAGS=${LINKER_FLAGS} |
| 266 | ${CROSS_ARGS} | 272 | ${CROSS_ARGS} |
| 267 | ${FFMPEG_OPTIONS} | 273 | ${FFMPEG_OPTIONS} |
| 274 | -DPKG_CONFIG_PATH=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/lib/pkgconfig | ||
| 268 | PATCH_COMMAND ${CMAKE_COMMAND} -E copy | 275 | PATCH_COMMAND ${CMAKE_COMMAND} -E copy |
| 269 | ${CMAKE_SOURCE_DIR}/tools/depends/target/ffmpeg/CMakeLists.txt | 276 | ${CMAKE_SOURCE_DIR}/tools/depends/target/ffmpeg/CMakeLists.txt |
| 270 | <SOURCE_DIR> && | 277 | <SOURCE_DIR> && |
| @@ -272,6 +279,10 @@ if(NOT FFMPEG_FOUND) | |||
| 272 | ${CMAKE_SOURCE_DIR}/tools/depends/target/ffmpeg/FindGnuTls.cmake | 279 | ${CMAKE_SOURCE_DIR}/tools/depends/target/ffmpeg/FindGnuTls.cmake |
| 273 | <SOURCE_DIR>) | 280 | <SOURCE_DIR>) |
| 274 | 281 | ||
| 282 | if (ENABLE_INTERNAL_DAV1D) | ||
| 283 | add_dependencies(ffmpeg dav1d) | ||
| 284 | endif() | ||
| 285 | |||
| 275 | find_program(BASH_COMMAND bash) | 286 | find_program(BASH_COMMAND bash) |
| 276 | if(NOT BASH_COMMAND) | 287 | if(NOT BASH_COMMAND) |
| 277 | message(FATAL_ERROR "Internal FFmpeg requires bash.") | 288 | message(FATAL_ERROR "Internal FFmpeg requires bash.") |
diff --git a/cmake/modules/FindFlatBuffers.cmake b/cmake/modules/FindFlatBuffers.cmake index 6f7e6a2..5ca67c5 100644 --- a/cmake/modules/FindFlatBuffers.cmake +++ b/cmake/modules/FindFlatBuffers.cmake | |||
| @@ -11,7 +11,7 @@ | |||
| 11 | 11 | ||
| 12 | if(ENABLE_INTERNAL_FLATBUFFERS) | 12 | if(ENABLE_INTERNAL_FLATBUFFERS) |
| 13 | include(ExternalProject) | 13 | include(ExternalProject) |
| 14 | file(STRINGS ${CMAKE_SOURCE_DIR}/tools/depends/native/flatbuffers-native/Makefile VER REGEX "^[ ]*VERSION[ ]*=.+$") | 14 | file(STRINGS ${CMAKE_SOURCE_DIR}/tools/depends/native/flatbuffers/Makefile VER REGEX "^[ ]*VERSION[ ]*=.+$") |
| 15 | string(REGEX REPLACE "^[ ]*VERSION[ ]*=[ ]*" "" FLATBUFFERS_VER "${VER}") | 15 | string(REGEX REPLACE "^[ ]*VERSION[ ]*=[ ]*" "" FLATBUFFERS_VER "${VER}") |
| 16 | 16 | ||
| 17 | # Allow user to override the download URL with a local tarball | 17 | # Allow user to override the download URL with a local tarball |
| @@ -43,7 +43,6 @@ if(ENABLE_INTERNAL_FLATBUFFERS) | |||
| 43 | -DFLATBUFFERS_BUILD_GRPCTEST=OFF | 43 | -DFLATBUFFERS_BUILD_GRPCTEST=OFF |
| 44 | -DFLATBUFFERS_BUILD_SHAREDLIB=OFF | 44 | -DFLATBUFFERS_BUILD_SHAREDLIB=OFF |
| 45 | "${EXTRA_ARGS}" | 45 | "${EXTRA_ARGS}" |
| 46 | PATCH_COMMAND patch -p1 < ${CORE_SOURCE_DIR}/tools/depends/native/flatbuffers-native/0001-Fix-compiler-warning.patch | ||
| 47 | BUILD_BYPRODUCTS ${FLATBUFFERS_FLATC_EXECUTABLE}) | 46 | BUILD_BYPRODUCTS ${FLATBUFFERS_FLATC_EXECUTABLE}) |
| 48 | set_target_properties(flatbuffers PROPERTIES FOLDER "External Projects" | 47 | set_target_properties(flatbuffers PROPERTIES FOLDER "External Projects" |
| 49 | INTERFACE_INCLUDE_DIRECTORIES ${FLATBUFFERS_INCLUDE_DIR}) | 48 | INTERFACE_INCLUDE_DIRECTORIES ${FLATBUFFERS_INCLUDE_DIR}) |
diff --git a/cmake/modules/FindFmt.cmake b/cmake/modules/FindFmt.cmake index 47cf8be..b426d8c 100644 --- a/cmake/modules/FindFmt.cmake +++ b/cmake/modules/FindFmt.cmake | |||
| @@ -39,6 +39,8 @@ if(ENABLE_INTERNAL_FMT) | |||
| 39 | DOWNLOAD_DIR ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/download | 39 | DOWNLOAD_DIR ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/download |
| 40 | PREFIX ${CORE_BUILD_DIR}/fmt | 40 | PREFIX ${CORE_BUILD_DIR}/fmt |
| 41 | CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR} | 41 | CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR} |
| 42 | -DCMAKE_CXX_EXTENSIONS=${CMAKE_CXX_EXTENSIONS} | ||
| 43 | -DCMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD} | ||
| 42 | -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} | 44 | -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} |
| 43 | -DCMAKE_INSTALL_LIBDIR=lib | 45 | -DCMAKE_INSTALL_LIBDIR=lib |
| 44 | -DFMT_DOC=OFF | 46 | -DFMT_DOC=OFF |
| @@ -57,12 +59,7 @@ if(ENABLE_INTERNAL_FMT) | |||
| 57 | 59 | ||
| 58 | else() | 60 | else() |
| 59 | 61 | ||
| 60 | if(CORE_SYSTEM_NAME STREQUAL windows OR CORE_SYSTEM_NAME STREQUAL windowsstore) | 62 | find_package(FMT 6.1.2 CONFIG REQUIRED QUIET) |
| 61 | # TODO: fix windows fmt package to include fmt-config.cmake and fmt-config-version.cmake | ||
| 62 | set(FMT_VERSION 3.0.1) | ||
| 63 | else() | ||
| 64 | find_package(FMT 3.0.1 CONFIG REQUIRED QUIET) | ||
| 65 | endif() | ||
| 66 | 63 | ||
| 67 | if(PKG_CONFIG_FOUND) | 64 | if(PKG_CONFIG_FOUND) |
| 68 | pkg_check_modules(PC_FMT libfmt QUIET) | 65 | pkg_check_modules(PC_FMT libfmt QUIET) |
diff --git a/cmake/modules/FindFriBidi.cmake b/cmake/modules/FindFriBidi.cmake index 91f3994..7a135e7 100644 --- a/cmake/modules/FindFriBidi.cmake +++ b/cmake/modules/FindFriBidi.cmake | |||
| @@ -17,7 +17,8 @@ if(PKG_CONFIG_FOUND) | |||
| 17 | pkg_check_modules(PC_FRIBIDI fribidi QUIET) | 17 | pkg_check_modules(PC_FRIBIDI fribidi QUIET) |
| 18 | endif() | 18 | endif() |
| 19 | 19 | ||
| 20 | find_path(FRIBIDI_INCLUDE_DIR NAMES fribidi/fribidi.h | 20 | find_path(FRIBIDI_INCLUDE_DIR NAMES fribidi.h |
| 21 | PATH_SUFFIXES fribidi | ||
| 21 | PATHS ${PC_FRIBIDI_INCLUDEDIR}) | 22 | PATHS ${PC_FRIBIDI_INCLUDEDIR}) |
| 22 | find_library(FRIBIDI_LIBRARY NAMES fribidi libfribidi | 23 | find_library(FRIBIDI_LIBRARY NAMES fribidi libfribidi |
| 23 | PATHS ${PC_FRIBIDI_LIBDIR}) | 24 | PATHS ${PC_FRIBIDI_LIBDIR}) |
diff --git a/cmake/modules/FindGIF.cmake b/cmake/modules/FindGIF.cmake index 1c616e0..7564a58 100644 --- a/cmake/modules/FindGIF.cmake +++ b/cmake/modules/FindGIF.cmake | |||
| @@ -16,15 +16,9 @@ | |||
| 16 | find_path(GIF_INCLUDE_DIR gif_lib.h) | 16 | find_path(GIF_INCLUDE_DIR gif_lib.h) |
| 17 | 17 | ||
| 18 | include(FindPackageHandleStandardArgs) | 18 | include(FindPackageHandleStandardArgs) |
| 19 | if(NOT WIN32) | 19 | find_library(GIF_LIBRARY NAMES gif) |
| 20 | find_library(GIF_LIBRARY NAMES gif) | 20 | find_package_handle_standard_args(GIF |
| 21 | find_package_handle_standard_args(GIF | 21 | REQUIRED_VARS GIF_LIBRARY GIF_INCLUDE_DIR) |
| 22 | REQUIRED_VARS GIF_LIBRARY GIF_INCLUDE_DIR) | ||
| 23 | else() | ||
| 24 | # Dynamically loaded DLL | ||
| 25 | find_package_handle_standard_args(GIF | ||
| 26 | REQUIRED_VARS GIF_INCLUDE_DIR) | ||
| 27 | endif() | ||
| 28 | 22 | ||
| 29 | if(GIF_FOUND) | 23 | if(GIF_FOUND) |
| 30 | set(GIF_LIBRARIES ${GIF_LIBRARY}) | 24 | set(GIF_LIBRARIES ${GIF_LIBRARY}) |
diff --git a/cmake/modules/FindGtest.cmake b/cmake/modules/FindGtest.cmake new file mode 100644 index 0000000..b59554b --- /dev/null +++ b/cmake/modules/FindGtest.cmake | |||
| @@ -0,0 +1,84 @@ | |||
| 1 | #.rst: | ||
| 2 | # FindGtest | ||
| 3 | # -------- | ||
| 4 | # Finds the gtest library | ||
| 5 | # | ||
| 6 | # This will define the following variables:: | ||
| 7 | # | ||
| 8 | # GTEST_FOUND - system has gtest | ||
| 9 | # GTEST_INCLUDE_DIRS - the gtest include directories | ||
| 10 | # GTEST_LIBRARIES - the gtest libraries | ||
| 11 | # | ||
| 12 | # and the following imported targets: | ||
| 13 | # | ||
| 14 | # Gtest::Gtest - The gtest library | ||
| 15 | |||
| 16 | if(ENABLE_INTERNAL_GTEST) | ||
| 17 | include(ExternalProject) | ||
| 18 | |||
| 19 | file(STRINGS ${CMAKE_SOURCE_DIR}/tools/depends/target/googletest/Makefile VER) | ||
| 20 | string(REGEX MATCH "VERSION=[^ ]*" GTEST_VERSION "${VER}") | ||
| 21 | list(GET GTEST_VERSION 0 GTEST_VERSION) | ||
| 22 | string(SUBSTRING "${GTEST_VERSION}" 8 -1 GTEST_VERSION) | ||
| 23 | |||
| 24 | # allow user to override the download URL with a local tarball | ||
| 25 | # needed for offline build envs | ||
| 26 | if(GTEST_URL) | ||
| 27 | get_filename_component(GTEST_URL "${GTEST_URL}" ABSOLUTE) | ||
| 28 | else() | ||
| 29 | set(GTEST_URL http://mirrors.kodi.tv/build-deps/sources/googletest-${GTEST_VERSION}.tar.gz) | ||
| 30 | endif() | ||
| 31 | |||
| 32 | if(VERBOSE) | ||
| 33 | message(STATUS "GTEST_URL: ${GTEST_URL}") | ||
| 34 | endif() | ||
| 35 | |||
| 36 | set(GTEST_LIBRARY ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/lib/libgtest.a) | ||
| 37 | set(GTEST_INCLUDE_DIR ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/include) | ||
| 38 | |||
| 39 | externalproject_add(gtest | ||
| 40 | URL ${GTEST_URL} | ||
| 41 | DOWNLOAD_DIR ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/download | ||
| 42 | PREFIX ${CORE_BUILD_DIR}/gtest | ||
| 43 | INSTALL_DIR ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR} | ||
| 44 | CMAKE_ARGS -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} -DBUILD_GMOCK=OFF -DINSTALL_GTEST=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR> -DCMAKE_INSTALL_LIBDIR=lib | ||
| 45 | BUILD_BYPRODUCTS ${GTEST_LIBRARY}) | ||
| 46 | set_target_properties(gtest PROPERTIES FOLDER "External Projects") | ||
| 47 | else() | ||
| 48 | if(PKG_CONFIG_FOUND) | ||
| 49 | pkg_check_modules(PC_GTEST gtest>=1.10.0 QUIET) | ||
| 50 | set(GTEST_VERSION ${PC_GTEST_VERSION}) | ||
| 51 | elseif(WIN32) | ||
| 52 | set(GTEST_VERSION 1.10.0) | ||
| 53 | endif() | ||
| 54 | |||
| 55 | find_path(GTEST_INCLUDE_DIR NAMES gtest/gtest.h | ||
| 56 | PATHS ${PC_GTEST_INCLUDEDIR}) | ||
| 57 | |||
| 58 | find_library(GTEST_LIBRARY_RELEASE NAMES gtest | ||
| 59 | PATHS ${PC_GTEST_LIBDIR}) | ||
| 60 | find_library(GTEST_LIBRARY_DEBUG NAMES gtestd | ||
| 61 | PATHS ${PC_GTEST_LIBDIR}) | ||
| 62 | |||
| 63 | include(SelectLibraryConfigurations) | ||
| 64 | select_library_configurations(GTEST) | ||
| 65 | endif() | ||
| 66 | |||
| 67 | include(FindPackageHandleStandardArgs) | ||
| 68 | find_package_handle_standard_args(Gtest | ||
| 69 | REQUIRED_VARS GTEST_LIBRARY GTEST_INCLUDE_DIR | ||
| 70 | VERSION_VAR GTEST_VERSION) | ||
| 71 | |||
| 72 | if(GTEST_FOUND) | ||
| 73 | set(GTEST_LIBRARIES ${GTEST_LIBRARY}) | ||
| 74 | set(GTEST_INCLUDE_DIRS ${GTEST_INCLUDE_DIR}) | ||
| 75 | endif() | ||
| 76 | |||
| 77 | if(NOT TARGET Gtest::Gtest) | ||
| 78 | add_library(Gtest::Gtest UNKNOWN IMPORTED) | ||
| 79 | set_target_properties(Gtest::Gtest PROPERTIES | ||
| 80 | IMPORTED_LOCATION "${GTEST_LIBRARY}" | ||
| 81 | INTERFACE_INCLUDE_DIRECTORIES "${GTEST_INCLUDE_DIR}") | ||
| 82 | endif() | ||
| 83 | |||
| 84 | mark_as_advanced(GTEST_INCLUDE_DIR GTEST_LIBRARY) | ||
diff --git a/cmake/modules/FindIso9660pp.cmake b/cmake/modules/FindIso9660pp.cmake new file mode 100644 index 0000000..5f84b55 --- /dev/null +++ b/cmake/modules/FindIso9660pp.cmake | |||
| @@ -0,0 +1,43 @@ | |||
| 1 | #.rst: | ||
| 2 | # FindIso9660pp | ||
| 3 | # -------- | ||
| 4 | # Finds the iso9660++ library | ||
| 5 | # | ||
| 6 | # This will define the following variables:: | ||
| 7 | # | ||
| 8 | # ISO9660PP_FOUND - system has iso9660++ | ||
| 9 | # ISO9660PP_INCLUDE_DIRS - the iso9660++ include directory | ||
| 10 | # ISO9660PP_LIBRARIES - the iso9660++ libraries | ||
| 11 | # ISO9660PP_DEFINITIONS - the iso9660++ definitions | ||
| 12 | |||
| 13 | if(PKG_CONFIG_FOUND) | ||
| 14 | pkg_check_modules(PC_ISO9660PP libiso9660++>=2.1.0 QUIET) | ||
| 15 | pkg_check_modules(PC_ISO9660 libiso9660>=2.1.0 QUIET) | ||
| 16 | endif() | ||
| 17 | |||
| 18 | find_path(ISO9660PP_INCLUDE_DIR NAMES cdio++/iso9660.hpp | ||
| 19 | PATHS ${PC_ISO9660PP_INCLUDEDIR}) | ||
| 20 | |||
| 21 | find_library(ISO9660PP_LIBRARY NAMES libiso9660++ iso9660++ | ||
| 22 | PATHS ${PC_ISO9660PP_LIBDIR}) | ||
| 23 | |||
| 24 | find_path(ISO9660_INCLUDE_DIR NAMES cdio/iso9660.h | ||
| 25 | PATHS ${PC_ISO9660_INCLUDEDIR}) | ||
| 26 | |||
| 27 | find_library(ISO9660_LIBRARY NAMES libiso9660 iso9660 | ||
| 28 | PATHS ${PC_ISO9660_LIBDIR}) | ||
| 29 | |||
| 30 | set(ISO9660PP_VERSION ${PC_ISO9660PP_VERSION}) | ||
| 31 | |||
| 32 | include(FindPackageHandleStandardArgs) | ||
| 33 | find_package_handle_standard_args(Iso9660pp | ||
| 34 | REQUIRED_VARS ISO9660PP_LIBRARY ISO9660PP_INCLUDE_DIR ISO9660_LIBRARY ISO9660_INCLUDE_DIR | ||
| 35 | VERSION_VAR ISO9660PP_VERSION) | ||
| 36 | |||
| 37 | if(ISO9660PP_FOUND) | ||
| 38 | set(ISO9660PP_LIBRARIES ${ISO9660PP_LIBRARY} ${ISO9660_LIBRARY}) | ||
| 39 | set(ISO9660PP_INCLUDE_DIRS ${ISO9660PP_INCLUDE_DIR} ${ISO9660_INCLUDE_DIR}) | ||
| 40 | set(ISO9660PP_DEFINITIONS -DHAS_ISO9660PP=1) | ||
| 41 | endif() | ||
| 42 | |||
| 43 | mark_as_advanced(ISO9660PP_INCLUDE_DIR ISO9660PP_LIBRARY ISO9660_INCLUDE_DIR ISO9660_LIBRARY) | ||
diff --git a/cmake/modules/FindLibDRM.cmake b/cmake/modules/FindLibDRM.cmake index 4b39de3..0d680f2 100644 --- a/cmake/modules/FindLibDRM.cmake +++ b/cmake/modules/FindLibDRM.cmake | |||
| @@ -8,6 +8,7 @@ | |||
| 8 | # LIBDRM_FOUND - system has LibDRM | 8 | # LIBDRM_FOUND - system has LibDRM |
| 9 | # LIBDRM_INCLUDE_DIRS - the LibDRM include directory | 9 | # LIBDRM_INCLUDE_DIRS - the LibDRM include directory |
| 10 | # LIBDRM_LIBRARIES - the LibDRM libraries | 10 | # LIBDRM_LIBRARIES - the LibDRM libraries |
| 11 | # LIBDRM_DEFINITIONS - the LibDRM definitions | ||
| 11 | # | 12 | # |
| 12 | # and the following imported targets:: | 13 | # and the following imported targets:: |
| 13 | # | 14 | # |
| @@ -30,9 +31,23 @@ find_package_handle_standard_args(LibDRM | |||
| 30 | REQUIRED_VARS LIBDRM_LIBRARY LIBDRM_INCLUDE_DIR | 31 | REQUIRED_VARS LIBDRM_LIBRARY LIBDRM_INCLUDE_DIR |
| 31 | VERSION_VAR LIBDRM_VERSION) | 32 | VERSION_VAR LIBDRM_VERSION) |
| 32 | 33 | ||
| 34 | include(CheckCSourceCompiles) | ||
| 35 | set(CMAKE_REQUIRED_INCLUDES ${LIBDRM_INCLUDE_DIR}) | ||
| 36 | check_c_source_compiles("#include <drm_mode.h> | ||
| 37 | |||
| 38 | int main() | ||
| 39 | { | ||
| 40 | struct hdr_output_metadata test; | ||
| 41 | return test.metadata_type; | ||
| 42 | } | ||
| 43 | " LIBDRM_HAS_HDR_OUTPUT_METADATA) | ||
| 44 | |||
| 33 | if(LIBDRM_FOUND) | 45 | if(LIBDRM_FOUND) |
| 34 | set(LIBDRM_LIBRARIES ${LIBDRM_LIBRARY}) | 46 | set(LIBDRM_LIBRARIES ${LIBDRM_LIBRARY}) |
| 35 | set(LIBDRM_INCLUDE_DIRS ${LIBDRM_INCLUDE_DIR}) | 47 | set(LIBDRM_INCLUDE_DIRS ${LIBDRM_INCLUDE_DIR}) |
| 48 | if(LIBDRM_HAS_HDR_OUTPUT_METADATA) | ||
| 49 | set(LIBDRM_DEFINITIONS -DHAVE_HDR_OUTPUT_METADATA=1) | ||
| 50 | endif() | ||
| 36 | 51 | ||
| 37 | if(NOT TARGET LIBDRM::LIBDRM) | 52 | if(NOT TARGET LIBDRM::LIBDRM) |
| 38 | add_library(LIBDRM::LIBDRM UNKNOWN IMPORTED) | 53 | add_library(LIBDRM::LIBDRM UNKNOWN IMPORTED) |
diff --git a/cmake/modules/FindLibDvd.cmake b/cmake/modules/FindLibDvd.cmake index bd08b94..44e7e92 100644 --- a/cmake/modules/FindLibDvd.cmake +++ b/cmake/modules/FindLibDvd.cmake | |||
| @@ -89,6 +89,8 @@ else() | |||
| 89 | set(HOST_ARCH aarch64-linux-android) | 89 | set(HOST_ARCH aarch64-linux-android) |
| 90 | elseif(ARCH STREQUAL i486-linux) | 90 | elseif(ARCH STREQUAL i486-linux) |
| 91 | set(HOST_ARCH i686-linux-android) | 91 | set(HOST_ARCH i686-linux-android) |
| 92 | elseif(ARCH STREQUAL x86_64) | ||
| 93 | set(HOST_ARCH x86_64-linux-android) | ||
| 92 | endif() | 94 | endif() |
| 93 | elseif(CORE_SYSTEM_NAME STREQUAL windowsstore) | 95 | elseif(CORE_SYSTEM_NAME STREQUAL windowsstore) |
| 94 | set(LIBDVD_ADDITIONAL_ARGS "-DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME}" "-DCMAKE_SYSTEM_VERSION=${CMAKE_SYSTEM_VERSION}") | 96 | set(LIBDVD_ADDITIONAL_ARGS "-DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME}" "-DCMAKE_SYSTEM_VERSION=${CMAKE_SYSTEM_VERSION}") |
| @@ -233,6 +235,7 @@ else() | |||
| 233 | set(LIBDVD_TARGET_DIR dlls) | 235 | set(LIBDVD_TARGET_DIR dlls) |
| 234 | endif() | 236 | endif() |
| 235 | copy_file_to_buildtree(${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/libdvd/bin/libdvdnav.dll DIRECTORY ${LIBDVD_TARGET_DIR}) | 237 | copy_file_to_buildtree(${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/libdvd/bin/libdvdnav.dll DIRECTORY ${LIBDVD_TARGET_DIR}) |
| 238 | add_dependencies(export-files dvdnav) | ||
| 236 | endif() | 239 | endif() |
| 237 | 240 | ||
| 238 | set(LIBDVD_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/libdvd/include) | 241 | set(LIBDVD_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/libdvd/include) |
diff --git a/cmake/modules/FindLibUSB.cmake b/cmake/modules/FindLibUSB.cmake index 17cf6ec..7bf3a92 100644 --- a/cmake/modules/FindLibUSB.cmake +++ b/cmake/modules/FindLibUSB.cmake | |||
| @@ -24,7 +24,7 @@ find_library(LIBUSB_LIBRARY NAMES usb | |||
| 24 | set(LIBUSB_VERSION ${PC_LIBUSB_VERSION}) | 24 | set(LIBUSB_VERSION ${PC_LIBUSB_VERSION}) |
| 25 | 25 | ||
| 26 | include(FindPackageHandleStandardArgs) | 26 | include(FindPackageHandleStandardArgs) |
| 27 | find_package_handle_standard_args(LIBUSB | 27 | find_package_handle_standard_args(LibUSB |
| 28 | REQUIRED_VARS LIBUSB_LIBRARY LIBUSB_INCLUDE_DIR | 28 | REQUIRED_VARS LIBUSB_LIBRARY LIBUSB_INCLUDE_DIR |
| 29 | VERSION_VAR LIBUSB_VERSION) | 29 | VERSION_VAR LIBUSB_VERSION) |
| 30 | 30 | ||
diff --git a/cmake/modules/FindMariaDBClient.cmake b/cmake/modules/FindMariaDBClient.cmake index 7530ab5..374aeeb 100644 --- a/cmake/modules/FindMariaDBClient.cmake +++ b/cmake/modules/FindMariaDBClient.cmake | |||
| @@ -28,11 +28,11 @@ endif() | |||
| 28 | 28 | ||
| 29 | find_path(MARIADBCLIENT_INCLUDE_DIR NAMES mariadb/mysql.h mariadb/server/mysql.h | 29 | find_path(MARIADBCLIENT_INCLUDE_DIR NAMES mariadb/mysql.h mariadb/server/mysql.h |
| 30 | PATHS ${PC_MARIADBCLIENT_INCLUDEDIR}) | 30 | PATHS ${PC_MARIADBCLIENT_INCLUDEDIR}) |
| 31 | find_library(MARIADBCLIENT_LIBRARY_RELEASE NAMES mariadbclient mariadb | 31 | find_library(MARIADBCLIENT_LIBRARY_RELEASE NAMES mariadbclient mariadb libmariadb |
| 32 | PATHS ${PC_MARIADBCLIENT_LIBDIR} | 32 | PATHS ${PC_MARIADBCLIENT_LIBDIR} |
| 33 | PATH_SUFFIXES mariadb | 33 | PATH_SUFFIXES mariadb |
| 34 | ${EXTRA_FIND_ARGS}) | 34 | ${EXTRA_FIND_ARGS}) |
| 35 | find_library(MARIADBCLIENT_LIBRARY_DEBUG NAMES mariadbclient mariadb | 35 | find_library(MARIADBCLIENT_LIBRARY_DEBUG NAMES mariadbclient mariadb libmariadbd |
| 36 | PATHS ${PC_MARIADBCLIENT_LIBDIR} | 36 | PATHS ${PC_MARIADBCLIENT_LIBDIR} |
| 37 | PATH_SUFFIXES mariadb | 37 | PATH_SUFFIXES mariadb |
| 38 | ${EXTRA_FIND_ARGS}) | 38 | ${EXTRA_FIND_ARGS}) |
diff --git a/cmake/modules/FindNFS.cmake b/cmake/modules/FindNFS.cmake index c2414a1..d62d4e6 100644 --- a/cmake/modules/FindNFS.cmake +++ b/cmake/modules/FindNFS.cmake | |||
| @@ -36,6 +36,44 @@ if(NFS_FOUND) | |||
| 36 | set(NFS_INCLUDE_DIRS ${NFS_INCLUDE_DIR}) | 36 | set(NFS_INCLUDE_DIRS ${NFS_INCLUDE_DIR}) |
| 37 | set(NFS_DEFINITIONS -DHAS_FILESYSTEM_NFS=1) | 37 | set(NFS_DEFINITIONS -DHAS_FILESYSTEM_NFS=1) |
| 38 | 38 | ||
| 39 | set(CMAKE_REQUIRED_INCLUDES "${NFS_INCLUDE_DIR}") | ||
| 40 | set(CMAKE_REQUIRED_LIBRARIES ${NFS_LIBRARY}) | ||
| 41 | if(CMAKE_SYSTEM_NAME MATCHES "Windows") | ||
| 42 | set(NFS_CXX_INCLUDE "#include <Winsock2.h>") | ||
| 43 | set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} "ws2_32.lib") | ||
| 44 | endif() | ||
| 45 | |||
| 46 | # Check for nfs_set_timeout | ||
| 47 | check_cxx_source_compiles(" | ||
| 48 | ${NFS_CXX_INCLUDE} | ||
| 49 | #include <nfsc/libnfs.h> | ||
| 50 | int main() | ||
| 51 | { | ||
| 52 | nfs_set_timeout(NULL, 0); | ||
| 53 | } | ||
| 54 | " NFS_SET_TIMEOUT) | ||
| 55 | |||
| 56 | if(NFS_SET_TIMEOUT) | ||
| 57 | list(APPEND NFS_DEFINITIONS -DHAS_NFS_SET_TIMEOUT) | ||
| 58 | endif() | ||
| 59 | |||
| 60 | # Check for mount_getexports_timeout | ||
| 61 | check_cxx_source_compiles(" | ||
| 62 | ${NFS_CXX_INCLUDE} | ||
| 63 | #include <nfsc/libnfs.h> | ||
| 64 | int main() | ||
| 65 | { | ||
| 66 | mount_getexports_timeout(NULL, 0); | ||
| 67 | } | ||
| 68 | " NFS_MOUNT_GETEXPORTS_TIMEOUT) | ||
| 69 | |||
| 70 | if(NFS_MOUNT_GETEXPORTS_TIMEOUT) | ||
| 71 | list(APPEND NFS_DEFINITIONS -DHAS_NFS_MOUNT_GETEXPORTS_TIMEOUT) | ||
| 72 | endif() | ||
| 73 | |||
| 74 | unset(CMAKE_REQUIRED_INCLUDES) | ||
| 75 | unset(CMAKE_REQUIRED_LIBRARIES) | ||
| 76 | |||
| 39 | if(NOT TARGET NFS::NFS) | 77 | if(NOT TARGET NFS::NFS) |
| 40 | add_library(NFS::NFS UNKNOWN IMPORTED) | 78 | add_library(NFS::NFS UNKNOWN IMPORTED) |
| 41 | if(NFS_LIBRARY) | 79 | if(NFS_LIBRARY) |
diff --git a/cmake/modules/FindOpenGLES.cmake b/cmake/modules/FindOpenGLES.cmake index 0191d9e..43a1367 100644 --- a/cmake/modules/FindOpenGLES.cmake +++ b/cmake/modules/FindOpenGLES.cmake | |||
| @@ -18,7 +18,7 @@ if(PKG_CONFIG_FOUND) | |||
| 18 | pkg_check_modules(PC_OPENGLES ${_brcmprefix}glesv2 QUIET) | 18 | pkg_check_modules(PC_OPENGLES ${_brcmprefix}glesv2 QUIET) |
| 19 | endif() | 19 | endif() |
| 20 | 20 | ||
| 21 | if(NOT CORE_SYSTEM_NAME STREQUAL ios) | 21 | if(NOT CORE_SYSTEM_NAME STREQUAL darwin_embedded) |
| 22 | find_path(OPENGLES_INCLUDE_DIR GLES2/gl2.h | 22 | find_path(OPENGLES_INCLUDE_DIR GLES2/gl2.h |
| 23 | PATHS ${PC_OPENGLES_INCLUDEDIR}) | 23 | PATHS ${PC_OPENGLES_INCLUDEDIR}) |
| 24 | find_library(OPENGLES_gl_LIBRARY NAMES ${_brcmprefix}GLESv2 | 24 | find_library(OPENGLES_gl_LIBRARY NAMES ${_brcmprefix}GLESv2 |
diff --git a/cmake/modules/FindPlist.cmake b/cmake/modules/FindPlist.cmake index cd143e9..2c86b74 100644 --- a/cmake/modules/FindPlist.cmake +++ b/cmake/modules/FindPlist.cmake | |||
| @@ -23,20 +23,13 @@ find_path(PLIST_INCLUDE_DIR plist/plist.h | |||
| 23 | 23 | ||
| 24 | set(PLIST_VERSION ${PC_PLIST_VERSION}) | 24 | set(PLIST_VERSION ${PC_PLIST_VERSION}) |
| 25 | 25 | ||
| 26 | find_library(PLIST_LIBRARY NAMES plist libplist | ||
| 27 | PATHS ${PC_PLIST_LIBDIR}) | ||
| 28 | |||
| 26 | include(FindPackageHandleStandardArgs) | 29 | include(FindPackageHandleStandardArgs) |
| 27 | if(NOT WIN32) | 30 | find_package_handle_standard_args(Plist |
| 28 | find_library(PLIST_LIBRARY NAMES plist | 31 | REQUIRED_VARS PLIST_LIBRARY PLIST_INCLUDE_DIR |
| 29 | PATHS ${PC_PLIST_LIBDIR}) | 32 | VERSION_VAR PLIST_VERSION) |
| 30 | |||
| 31 | find_package_handle_standard_args(Plist | ||
| 32 | REQUIRED_VARS PLIST_LIBRARY PLIST_INCLUDE_DIR | ||
| 33 | VERSION_VAR PLIST_VERSION) | ||
| 34 | else() | ||
| 35 | # Dynamically loaded DLL | ||
| 36 | find_package_handle_standard_args(Plist | ||
| 37 | REQUIRED_VARS PLIST_INCLUDE_DIR | ||
| 38 | VERSION_VAR PLIST_VERSION) | ||
| 39 | endif() | ||
| 40 | 33 | ||
| 41 | if(PLIST_FOUND) | 34 | if(PLIST_FOUND) |
| 42 | set(PLIST_LIBRARIES ${PLIST_LIBRARY}) | 35 | set(PLIST_LIBRARIES ${PLIST_LIBRARY}) |
diff --git a/cmake/modules/FindPython.cmake b/cmake/modules/FindPython.cmake index 213b17c..e39d4e5 100644 --- a/cmake/modules/FindPython.cmake +++ b/cmake/modules/FindPython.cmake | |||
| @@ -6,12 +6,12 @@ | |||
| 6 | # PYTHON_LIBRARIES - The python libraries | 6 | # PYTHON_LIBRARIES - The python libraries |
| 7 | 7 | ||
| 8 | if(PKG_CONFIG_FOUND) | 8 | if(PKG_CONFIG_FOUND) |
| 9 | pkg_check_modules(PC_PYTHON python>=2.7 QUIET) | 9 | pkg_check_modules(PC_PYTHON python3>=3.5 QUIET) |
| 10 | endif() | 10 | endif() |
| 11 | 11 | ||
| 12 | find_program(PYTHON_EXECUTABLE python ONLY_CMAKE_FIND_ROOT_PATH) | 12 | find_program(PYTHON_EXECUTABLE python3 ONLY_CMAKE_FIND_ROOT_PATH) |
| 13 | find_library(PYTHON_LIBRARY NAMES python2.7 PATHS ${PC_PYTHON_LIBDIR}) | 13 | find_library(PYTHON_LIBRARY NAMES python3.8 python3.7 python3.6 python3.5 PATHS ${PC_PYTHON_LIBDIR}) |
| 14 | find_path(PYTHON_INCLUDE_DIR NAMES Python.h PATHS ${PC_PYTHON_INCLUDE_DIRS} ${DEPENDS_PATH}/include/python2.7) | 14 | find_path(PYTHON_INCLUDE_DIR NAMES Python.h PATHS ${PC_PYTHON_INCLUDE_DIRS} PATH_SUFFIXES python3.8 python3.7 python3.6 python3.5) |
| 15 | 15 | ||
| 16 | if(KODI_DEPENDSBUILD) | 16 | if(KODI_DEPENDSBUILD) |
| 17 | find_library(FFI_LIBRARY ffi REQUIRED) | 17 | find_library(FFI_LIBRARY ffi REQUIRED) |
| @@ -25,7 +25,7 @@ if(KODI_DEPENDSBUILD) | |||
| 25 | 25 | ||
| 26 | set(PYTHON_LIBRARIES ${PYTHON_LIBRARY} ${FFI_LIBRARY} ${EXPAT_LIBRARY} ${INTL_LIBRARY} ${GMP_LIBRARY} ${PYTHON_DEP_LIBRARIES}) | 26 | set(PYTHON_LIBRARIES ${PYTHON_LIBRARY} ${FFI_LIBRARY} ${EXPAT_LIBRARY} ${INTL_LIBRARY} ${GMP_LIBRARY} ${PYTHON_DEP_LIBRARIES}) |
| 27 | else() | 27 | else() |
| 28 | find_package(PythonLibs 2.7 REQUIRED) | 28 | find_package(PythonLibs 3.5 REQUIRED) |
| 29 | list(APPEND PYTHON_LIBRARIES ${PC_PYTHON_STATIC_LIBRARIES}) | 29 | list(APPEND PYTHON_LIBRARIES ${PC_PYTHON_STATIC_LIBRARIES}) |
| 30 | endif() | 30 | endif() |
| 31 | 31 | ||
diff --git a/cmake/modules/FindSSE.cmake b/cmake/modules/FindSSE.cmake index 08e3630..d9d5c7a 100644 --- a/cmake/modules/FindSSE.cmake +++ b/cmake/modules/FindSSE.cmake | |||
| @@ -141,6 +141,7 @@ include(FindPackageHandleStandardArgs) | |||
| 141 | find_package_handle_standard_args(SSE | 141 | find_package_handle_standard_args(SSE |
| 142 | REQUIRED_VARS _SSE_TRUE _SSE_OK | 142 | REQUIRED_VARS _SSE_TRUE _SSE_OK |
| 143 | FAIL_MESSAGE "Could not find hardware support for SSE") | 143 | FAIL_MESSAGE "Could not find hardware support for SSE") |
| 144 | set(FPHSA_NAME_MISMATCHED ON) | ||
| 144 | find_package_handle_standard_args(SSE2 | 145 | find_package_handle_standard_args(SSE2 |
| 145 | REQUIRED_VARS _SSE2_TRUE _SSE2_OK | 146 | REQUIRED_VARS _SSE2_TRUE _SSE2_OK |
| 146 | FAIL_MESSAGE "Could not find hardware support for SSE2") | 147 | FAIL_MESSAGE "Could not find hardware support for SSE2") |
| @@ -162,6 +163,7 @@ find_package_handle_standard_args(AVX | |||
| 162 | find_package_handle_standard_args(AVX2 | 163 | find_package_handle_standard_args(AVX2 |
| 163 | REQUIRED_VARS _AVX2_TRUE _AVX2_OK | 164 | REQUIRED_VARS _AVX2_TRUE _AVX2_OK |
| 164 | FAIL_MESSAGE "Could not find hardware support for AVX2") | 165 | FAIL_MESSAGE "Could not find hardware support for AVX2") |
| 166 | unset(FPHSA_NAME_MISMATCHED) | ||
| 165 | 167 | ||
| 166 | mark_as_advanced(SSE2_FOUND SSE3_FOUND SSSE3_FOUND SSE4_1_FOUND SSE4_2_FOUND AVX_FOUND AVX2_FOUND) | 168 | mark_as_advanced(SSE2_FOUND SSE3_FOUND SSSE3_FOUND SSE4_1_FOUND SSE4_2_FOUND AVX_FOUND AVX2_FOUND) |
| 167 | 169 | ||
diff --git a/cmake/modules/FindSWIG.cmake b/cmake/modules/FindSWIG.cmake index f9b27c2..fba544b 100644 --- a/cmake/modules/FindSWIG.cmake +++ b/cmake/modules/FindSWIG.cmake | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | # SWIG_FOUND - system has SWIG | 8 | # SWIG_FOUND - system has SWIG |
| 9 | # SWIG_EXECUTABLE - the SWIG executable | 9 | # SWIG_EXECUTABLE - the SWIG executable |
| 10 | 10 | ||
| 11 | find_program(SWIG_EXECUTABLE NAMES swig3.0 swig2.0 swig | 11 | find_program(SWIG_EXECUTABLE NAMES swig4.0 swig3.0 swig2.0 swig |
| 12 | PATH_SUFFIXES swig) | 12 | PATH_SUFFIXES swig) |
| 13 | if(SWIG_EXECUTABLE) | 13 | if(SWIG_EXECUTABLE) |
| 14 | execute_process(COMMAND ${SWIG_EXECUTABLE} -swiglib | 14 | execute_process(COMMAND ${SWIG_EXECUTABLE} -swiglib |
diff --git a/cmake/modules/FindShairplay.cmake b/cmake/modules/FindShairplay.cmake index bbb3372..506cffd 100644 --- a/cmake/modules/FindShairplay.cmake +++ b/cmake/modules/FindShairplay.cmake | |||
| @@ -17,32 +17,26 @@ | |||
| 17 | find_path(SHAIRPLAY_INCLUDE_DIR shairplay/raop.h) | 17 | find_path(SHAIRPLAY_INCLUDE_DIR shairplay/raop.h) |
| 18 | 18 | ||
| 19 | include(FindPackageHandleStandardArgs) | 19 | include(FindPackageHandleStandardArgs) |
| 20 | if(NOT WIN32) | 20 | find_library(SHAIRPLAY_LIBRARY NAMES shairplay libshairplay) |
| 21 | find_library(SHAIRPLAY_LIBRARY NAMES shairplay) | 21 | |
| 22 | 22 | if(SHAIRPLAY_INCLUDE_DIR AND SHAIRPLAY_LIBRARY) | |
| 23 | if(SHAIRPLAY_INCLUDE_DIR AND SHAIRPLAY_LIBRARY) | 23 | include(CheckCSourceCompiles) |
| 24 | include(CheckCSourceCompiles) | 24 | set(CMAKE_REQUIRED_INCLUDES ${SHAIRPLAY_INCLUDE_DIR}) |
| 25 | set(CMAKE_REQUIRED_INCLUDES ${SHAIRPLAY_INCLUDE_DIRS}) | 25 | set(CMAKE_REQUIRED_LIBRARIES ${SHAIRPLAY_LIBRARIES}) |
| 26 | set(CMAKE_REQUIRED_LIBRARIES ${SHAIRPLAY_LIBRARIES}) | 26 | check_c_source_compiles("#include <shairplay/raop.h> |
| 27 | check_c_source_compiles("#include <shairplay/raop.h> | 27 | |
| 28 | 28 | int main() | |
| 29 | int main() | 29 | { |
| 30 | { | 30 | struct raop_callbacks_s foo; |
| 31 | struct raop_callbacks_s foo; | 31 | foo.cls; |
| 32 | foo.cls; | 32 | return 0; |
| 33 | return 0; | 33 | } |
| 34 | } | 34 | " HAVE_SHAIRPLAY_CALLBACK_CLS) |
| 35 | " HAVE_SHAIRPLAY_CALLBACK_CLS) | ||
| 36 | endif() | ||
| 37 | |||
| 38 | find_package_handle_standard_args(Shairplay | ||
| 39 | REQUIRED_VARS SHAIRPLAY_LIBRARY SHAIRPLAY_INCLUDE_DIR HAVE_SHAIRPLAY_CALLBACK_CLS) | ||
| 40 | else() | ||
| 41 | # Dynamically loaded DLL | ||
| 42 | find_package_handle_standard_args(Shairplay | ||
| 43 | REQUIRED_VARS SHAIRPLAY_INCLUDE_DIR) | ||
| 44 | endif() | 35 | endif() |
| 45 | 36 | ||
| 37 | find_package_handle_standard_args(Shairplay | ||
| 38 | REQUIRED_VARS SHAIRPLAY_LIBRARY SHAIRPLAY_INCLUDE_DIR HAVE_SHAIRPLAY_CALLBACK_CLS) | ||
| 39 | |||
| 46 | if(SHAIRPLAY_FOUND) | 40 | if(SHAIRPLAY_FOUND) |
| 47 | set(SHAIRPLAY_LIBRARIES ${SHAIRPLAY_LIBRARY}) | 41 | set(SHAIRPLAY_LIBRARIES ${SHAIRPLAY_LIBRARY}) |
| 48 | set(SHAIRPLAY_INCLUDE_DIRS ${SHAIRPLAY_INCLUDE_DIR}) | 42 | set(SHAIRPLAY_INCLUDE_DIRS ${SHAIRPLAY_INCLUDE_DIR}) |
diff --git a/cmake/modules/FindSmbClient.cmake b/cmake/modules/FindSmbClient.cmake index 70492ff..fde48ab 100644 --- a/cmake/modules/FindSmbClient.cmake +++ b/cmake/modules/FindSmbClient.cmake | |||
| @@ -32,6 +32,9 @@ find_package_handle_standard_args(SmbClient | |||
| 32 | 32 | ||
| 33 | if(SMBCLIENT_FOUND) | 33 | if(SMBCLIENT_FOUND) |
| 34 | set(SMBCLIENT_LIBRARIES ${SMBCLIENT_LIBRARY}) | 34 | set(SMBCLIENT_LIBRARIES ${SMBCLIENT_LIBRARY}) |
| 35 | if(${SMBCLIENT_LIBRARY} MATCHES ".+\.a$" AND PC_SMBCLIENT_STATIC_LIBRARIES) | ||
| 36 | list(APPEND SMBCLIENT_LIBRARIES ${PC_SMBCLIENT_STATIC_LIBRARIES}) | ||
| 37 | endif() | ||
| 35 | set(SMBCLIENT_INCLUDE_DIRS ${SMBCLIENT_INCLUDE_DIR}) | 38 | set(SMBCLIENT_INCLUDE_DIRS ${SMBCLIENT_INCLUDE_DIR}) |
| 36 | set(SMBCLIENT_DEFINITIONS -DHAS_FILESYSTEM_SMB=1) | 39 | set(SMBCLIENT_DEFINITIONS -DHAS_FILESYSTEM_SMB=1) |
| 37 | 40 | ||
diff --git a/cmake/modules/FindSpdlog.cmake b/cmake/modules/FindSpdlog.cmake new file mode 100644 index 0000000..270e486 --- /dev/null +++ b/cmake/modules/FindSpdlog.cmake | |||
| @@ -0,0 +1,107 @@ | |||
| 1 | # FindSpdlog | ||
| 2 | # ------- | ||
| 3 | # Finds the Spdlog library | ||
| 4 | # | ||
| 5 | # This will define the following variables: | ||
| 6 | # | ||
| 7 | # SPDLOG_FOUND - system has Spdlog | ||
| 8 | # SPDLOG_INCLUDE_DIRS - the Spdlog include directory | ||
| 9 | # SPDLOG_LIBRARIES - the Spdlog libraries | ||
| 10 | # SPDLOG_DEFINITIONS - the Spdlog compile definitions | ||
| 11 | # | ||
| 12 | # and the following imported targets: | ||
| 13 | # | ||
| 14 | # Spdlog::Spdlog - The Spdlog library | ||
| 15 | |||
| 16 | if(ENABLE_INTERNAL_SPDLOG) | ||
| 17 | include(ExternalProject) | ||
| 18 | file(STRINGS ${CMAKE_SOURCE_DIR}/tools/depends/target/libspdlog/Makefile VER REGEX "^[ ]*VERSION[ ]*=.+$") | ||
| 19 | string(REGEX REPLACE "^[ ]*VERSION[ ]*=[ ]*" "" SPDLOG_VERSION "${VER}") | ||
| 20 | |||
| 21 | # allow user to override the download URL with a local tarball | ||
| 22 | # needed for offline build envs | ||
| 23 | if(SPDLOG_URL) | ||
| 24 | get_filename_component(SPDLOG_URL "${SPDLOG_URL}" ABSOLUTE) | ||
| 25 | else() | ||
| 26 | set(SPDLOG_URL http://mirrors.kodi.tv/build-deps/sources/spdlog-${SPDLOG_VERSION}.tar.gz) | ||
| 27 | endif() | ||
| 28 | if(VERBOSE) | ||
| 29 | message(STATUS "SPDLOG_URL: ${SPDLOG_URL}") | ||
| 30 | endif() | ||
| 31 | |||
| 32 | if(APPLE) | ||
| 33 | set(EXTRA_ARGS "-DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES}") | ||
| 34 | endif() | ||
| 35 | |||
| 36 | set(SPDLOG_LIBRARY ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/lib/libspdlog.a) | ||
| 37 | set(SPDLOG_INCLUDE_DIR ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/include) | ||
| 38 | |||
| 39 | externalproject_add(spdlog | ||
| 40 | URL ${SPDLOG_URL} | ||
| 41 | DOWNLOAD_DIR ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/download | ||
| 42 | PATCH_COMMAND patch -p1 -i ${CMAKE_SOURCE_DIR}/tools/depends/target/libspdlog/0001-fix_fmt_version.patch | ||
| 43 | PREFIX ${CORE_BUILD_DIR}/spdlog | ||
| 44 | CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR} | ||
| 45 | -DCMAKE_CXX_EXTENSIONS=${CMAKE_CXX_EXTENSIONS} | ||
| 46 | -DCMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD} | ||
| 47 | -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} | ||
| 48 | -DCMAKE_INSTALL_LIBDIR=lib | ||
| 49 | -DSPDLOG_BUILD_EXAMPLE=OFF | ||
| 50 | -DSPDLOG_BUILD_TESTS=OFF | ||
| 51 | -DSPDLOG_BUILD_BENCH=OFF | ||
| 52 | -DSPDLOG_FMT_EXTERNAL=ON | ||
| 53 | -DCMAKE_PREFIX_PATH=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR} | ||
| 54 | "${EXTRA_ARGS}" | ||
| 55 | BUILD_BYPRODUCTS ${SPDLOG_LIBRARY}) | ||
| 56 | set_target_properties(spdlog PROPERTIES FOLDER "External Projects") | ||
| 57 | |||
| 58 | if(ENABLE_INTERNAL_FMT) | ||
| 59 | add_dependencies(spdlog fmt) | ||
| 60 | endif() | ||
| 61 | else() | ||
| 62 | find_package(spdlog 1.5.0 CONFIG REQUIRED QUIET) | ||
| 63 | |||
| 64 | if(PKG_CONFIG_FOUND) | ||
| 65 | pkg_check_modules(PC_SPDLOG spdlog QUIET) | ||
| 66 | set(SPDLOG_VERSION ${PC_SPDLOG_VERSION}) | ||
| 67 | endif() | ||
| 68 | |||
| 69 | find_path(SPDLOG_INCLUDE_DIR NAMES spdlog/spdlog.h | ||
| 70 | PATHS ${PC_SPDLOG_INCLUDEDIR}) | ||
| 71 | |||
| 72 | find_library(SPDLOG_LIBRARY_RELEASE NAMES spdlog | ||
| 73 | PATHS ${PC_SPDLOG_LIBDIR}) | ||
| 74 | find_library(SPDLOG_LIBRARY_DEBUG NAMES spdlogd | ||
| 75 | PATHS ${PC_SPDLOG_LIBDIR}) | ||
| 76 | |||
| 77 | include(SelectLibraryConfigurations) | ||
| 78 | select_library_configurations(SPDLOG) | ||
| 79 | endif() | ||
| 80 | |||
| 81 | include(FindPackageHandleStandardArgs) | ||
| 82 | find_package_handle_standard_args(Spdlog | ||
| 83 | REQUIRED_VARS SPDLOG_LIBRARY SPDLOG_INCLUDE_DIR | ||
| 84 | VERSION_VAR SPDLOG_VERSION) | ||
| 85 | |||
| 86 | if(SPDLOG_FOUND) | ||
| 87 | set(SPDLOG_LIBRARIES ${SPDLOG_LIBRARY}) | ||
| 88 | set(SPDLOG_INCLUDE_DIRS ${SPDLOG_INCLUDE_DIR}) | ||
| 89 | set(SPDLOG_DEFINITIONS -DSPDLOG_FMT_EXTERNAL | ||
| 90 | -DSPDLOG_DEBUG_ON | ||
| 91 | -DSPDLOG_NO_ATOMIC_LEVELS | ||
| 92 | -DSPDLOG_ENABLE_PATTERN_PADDING) | ||
| 93 | if(WIN32) | ||
| 94 | list(APPEND SPDLOG_DEFINITIONS -DSPDLOG_WCHAR_FILENAMES | ||
| 95 | -DSPDLOG_WCHAR_TO_UTF8_SUPPORT) | ||
| 96 | endif() | ||
| 97 | |||
| 98 | if(NOT TARGET Spdlog::Spdlog) | ||
| 99 | add_library(Spdlog::Spdlog UNKNOWN IMPORTED) | ||
| 100 | set_target_properties(Spdlog::Spdlog PROPERTIES | ||
| 101 | IMPORTED_LOCATION "${SPDLOG_LIBRARY}" | ||
| 102 | INTERFACE_INCLUDE_DIRECTORIES "${SPDLOG_INCLUDE_DIR}" | ||
| 103 | INTERFACE_COMPILE_DEFINITIONS "${SPDLOG_DEFINITIONS}") | ||
| 104 | endif() | ||
| 105 | endif() | ||
| 106 | |||
| 107 | mark_as_advanced(SPDLOG_INCLUDE_DIR SPDLOG_LIBRARY) | ||
diff --git a/cmake/modules/FindUdfread.cmake b/cmake/modules/FindUdfread.cmake new file mode 100644 index 0000000..20fb322 --- /dev/null +++ b/cmake/modules/FindUdfread.cmake | |||
| @@ -0,0 +1,78 @@ | |||
| 1 | #.rst: | ||
| 2 | # FindUdfread | ||
| 3 | # -------- | ||
| 4 | # Finds the udfread library | ||
| 5 | # | ||
| 6 | # This will define the following variables:: | ||
| 7 | # | ||
| 8 | # UDFREAD_FOUND - system has udfread | ||
| 9 | # UDFREAD_INCLUDE_DIRS - the udfread include directory | ||
| 10 | # UDFREAD_LIBRARIES - the udfread libraries | ||
| 11 | # UDFREAD_DEFINITIONS - the udfread definitions | ||
| 12 | |||
| 13 | if(PKG_CONFIG_FOUND) | ||
| 14 | pkg_check_modules(PC_UDFREAD udfread>=1.0.0 QUIET) | ||
| 15 | endif() | ||
| 16 | |||
| 17 | find_path(UDFREAD_INCLUDE_DIR NAMES udfread/udfread.h | ||
| 18 | PATHS ${PC_UDFREAD_INCLUDEDIR}) | ||
| 19 | |||
| 20 | find_library(UDFREAD_LIBRARY NAMES udfread libudfread | ||
| 21 | PATHS ${PC_UDFREAD_LIBDIR}) | ||
| 22 | |||
| 23 | set(UDFREAD_VERSION ${PC_UDFREAD_VERSION}) | ||
| 24 | |||
| 25 | if(ENABLE_INTERNAL_UDFREAD) | ||
| 26 | include(ExternalProject) | ||
| 27 | |||
| 28 | # Extract version | ||
| 29 | file(STRINGS ${CMAKE_SOURCE_DIR}/tools/depends/target/libudfread/UDFREAD-VERSION VER) | ||
| 30 | |||
| 31 | string(REGEX MATCH "VERSION=[^ ]*$.*" UDFREAD_VER "${VER}") | ||
| 32 | list(GET UDFREAD_VER 0 UDFREAD_VER) | ||
| 33 | string(SUBSTRING "${UDFREAD_VER}" 8 -1 UDFREAD_VER) | ||
| 34 | |||
| 35 | # allow user to override the download URL with a local tarball | ||
| 36 | # needed for offline build envs | ||
| 37 | if(UDFREAD_URL) | ||
| 38 | get_filename_component(UDFREAD_URL "${UDFREAD_URL}" ABSOLUTE) | ||
| 39 | else() | ||
| 40 | set(UDFREAD_URL http://mirrors.kodi.tv/build-deps/sources/libudfread-${UDFREAD_VER}.tar.gz) | ||
| 41 | endif() | ||
| 42 | |||
| 43 | if(VERBOSE) | ||
| 44 | message(STATUS "UDFREAD_URL: ${UDFREAD_URL}") | ||
| 45 | endif() | ||
| 46 | |||
| 47 | set(UDFREAD_LIBRARY ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/lib/libudfread.a) | ||
| 48 | set(UDFREAD_INCLUDE_DIR ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/include) | ||
| 49 | set(UDFREAD_VERSION ${UDFREAD_VER}) | ||
| 50 | |||
| 51 | externalproject_add(udfread | ||
| 52 | URL ${UDFREAD_URL} | ||
| 53 | DOWNLOAD_NAME libudfread-${UDFREAD_VER}.tar.gz | ||
| 54 | DOWNLOAD_DIR ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/download | ||
| 55 | PREFIX ${CORE_BUILD_DIR}/libudfread | ||
| 56 | CONFIGURE_COMMAND autoreconf -vif && | ||
| 57 | ./configure | ||
| 58 | --enable-static | ||
| 59 | --disable-shared | ||
| 60 | --prefix=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR} | ||
| 61 | BUILD_BYPRODUCTS ${UDFREAD_LIBRARY} | ||
| 62 | BUILD_IN_SOURCE 1) | ||
| 63 | |||
| 64 | set_target_properties(udfread PROPERTIES FOLDER "External Projects") | ||
| 65 | endif() | ||
| 66 | |||
| 67 | include(FindPackageHandleStandardArgs) | ||
| 68 | find_package_handle_standard_args(Udfread | ||
| 69 | REQUIRED_VARS UDFREAD_LIBRARY UDFREAD_INCLUDE_DIR | ||
| 70 | VERSION_VAR UDFREAD_VERSION) | ||
| 71 | |||
| 72 | if(UDFREAD_FOUND) | ||
| 73 | set(UDFREAD_LIBRARIES ${UDFREAD_LIBRARY}) | ||
| 74 | set(UDFREAD_INCLUDE_DIRS ${UDFREAD_INCLUDE_DIR}) | ||
| 75 | set(UDFREAD_DEFINITIONS -DHAS_UDFREAD=1) | ||
| 76 | endif() | ||
| 77 | |||
| 78 | mark_as_advanced(UDFREAD_INCLUDE_DIR UDFREAD_LIBRARY) | ||
diff --git a/cmake/platform/android/defines.txt b/cmake/platform/android/defines.txt index fa103d0..4b70e59 100644 --- a/cmake/platform/android/defines.txt +++ b/cmake/platform/android/defines.txt | |||
| @@ -1 +1 @@ | |||
| -DTARGET_POSIX -DTARGET_LINUX -D_LINUX -DTARGET_ANDROID | -DTARGET_POSIX -DTARGET_LINUX -DTARGET_ANDROID | ||
diff --git a/cmake/platform/darwin_embedded/defines.txt b/cmake/platform/darwin_embedded/defines.txt new file mode 100644 index 0000000..603d749 --- /dev/null +++ b/cmake/platform/darwin_embedded/defines.txt | |||
| @@ -0,0 +1 @@ | |||
| -DTARGET_POSIX -DTARGET_DARWIN -DTARGET_DARWIN_EMBEDDED | |||
diff --git a/cmake/platform/ios/ios.cmake b/cmake/platform/darwin_embedded/ios.cmake index 75c9b7b..4c377b7 100644 --- a/cmake/platform/ios/ios.cmake +++ b/cmake/platform/darwin_embedded/ios.cmake | |||
| @@ -1,2 +1,3 @@ | |||
| 1 | set(PLATFORM_REQUIRED_DEPS OpenGLES) | 1 | set(PLATFORM_REQUIRED_DEPS OpenGLES) |
| 2 | set(APP_RENDER_SYSTEM gles) | 2 | set(APP_RENDER_SYSTEM gles) |
| 3 | list(APPEND PLATFORM_DEFINES -DTARGET_DARWIN_IOS) | ||
diff --git a/cmake/platform/darwin_embedded/tvos.cmake b/cmake/platform/darwin_embedded/tvos.cmake new file mode 100644 index 0000000..b29ed32 --- /dev/null +++ b/cmake/platform/darwin_embedded/tvos.cmake | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | set(PLATFORM_REQUIRED_DEPS OpenGLES) | ||
| 2 | set(APP_RENDER_SYSTEM gles) | ||
| 3 | list(APPEND PLATFORM_DEFINES -DTARGET_DARWIN_TVOS) | ||
diff --git a/cmake/platform/freebsd/defines.txt b/cmake/platform/freebsd/defines.txt index 9483597..bd23e57 100644 --- a/cmake/platform/freebsd/defines.txt +++ b/cmake/platform/freebsd/defines.txt | |||
| @@ -1 +1 @@ | |||
| -DTARGET_POSIX -DTARGET_FREEBSD -D_LINUX | -DTARGET_POSIX -DTARGET_FREEBSD | ||
diff --git a/cmake/platform/freebsd/gbm.cmake b/cmake/platform/freebsd/gbm.cmake index b273a06..2d20731 100644 --- a/cmake/platform/freebsd/gbm.cmake +++ b/cmake/platform/freebsd/gbm.cmake | |||
| @@ -1 +1,2 @@ | |||
| 1 | include(cmake/platform/linux/gbm.cmake) | 1 | include(cmake/platform/linux/gbm.cmake) |
| 2 | list(APPEND PLATFORM_REQUIRED_DEPS EpollShim) | ||
diff --git a/cmake/platform/ios/defines.txt b/cmake/platform/ios/defines.txt deleted file mode 100644 index d0989ea..0000000 --- a/cmake/platform/ios/defines.txt +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | -DTARGET_POSIX -DTARGET_DARWIN -DTARGET_DARWIN_IOS -D_LINUX | ||
diff --git a/cmake/platform/linux/aml.cmake b/cmake/platform/linux/aml.cmake deleted file mode 100644 index a151226..0000000 --- a/cmake/platform/linux/aml.cmake +++ /dev/null | |||
| @@ -1,3 +0,0 @@ | |||
| 1 | set(PLATFORM_REQUIRED_DEPS OpenGLES AML EGL LibInput Xkbcommon) | ||
| 2 | set(APP_RENDER_SYSTEM gles) | ||
| 3 | list(APPEND PLATFORM_DEFINES -DMESA_EGL_NO_X11_HEADERS) | ||
diff --git a/cmake/platform/linux/defines.txt b/cmake/platform/linux/defines.txt index 3fe9c5c..88d2e6e 100644 --- a/cmake/platform/linux/defines.txt +++ b/cmake/platform/linux/defines.txt | |||
| @@ -1 +1 @@ | |||
| -DTARGET_POSIX -DTARGET_LINUX -D_LINUX -fPIC | -DTARGET_POSIX -DTARGET_LINUX -fPIC | ||
diff --git a/cmake/platform/linux/gbm.cmake b/cmake/platform/linux/gbm.cmake index e5b44ad..75b23f3 100644 --- a/cmake/platform/linux/gbm.cmake +++ b/cmake/platform/linux/gbm.cmake | |||
| @@ -14,4 +14,4 @@ else() | |||
| 14 | endif() | 14 | endif() |
| 15 | 15 | ||
| 16 | # __GBM__ is needed by eglplatform.h in case it is included before gbm.h | 16 | # __GBM__ is needed by eglplatform.h in case it is included before gbm.h |
| 17 | list(APPEND PLATFORM_DEFINES -DMESA_EGL_NO_X11_HEADERS -D__GBM__=1 -DPLATFORM_SETTINGS_FILE=gbm.xml) | 17 | list(APPEND PLATFORM_DEFINES -DMESA_EGL_NO_X11_HEADERS -DEGL_NO_X11 -D__GBM__=1 -DPLATFORM_SETTINGS_FILE=gbm.xml) |
diff --git a/cmake/platform/linux/x11.cmake b/cmake/platform/linux/x11.cmake index 72d9640..5d7f3d4 100644 --- a/cmake/platform/linux/x11.cmake +++ b/cmake/platform/linux/x11.cmake | |||
| @@ -1,4 +1,17 @@ | |||
| 1 | set(PLATFORM_REQUIRED_DEPS OpenGl EGL X XRandR LibDRM) | 1 | set(PLATFORM_REQUIRED_DEPS EGL X XRandR LibDRM) |
| 2 | set(PLATFORM_OPTIONAL_DEPS VAAPI VDPAU GLX) | 2 | set(PLATFORM_OPTIONAL_DEPS VAAPI) |
| 3 | set(APP_RENDER_SYSTEM gl) | 3 | |
| 4 | set(X11_RENDER_SYSTEM "" CACHE STRING "Render system to use with X11: \"gl\" or \"gles\"") | ||
| 5 | |||
| 6 | if(X11_RENDER_SYSTEM STREQUAL "gl") | ||
| 7 | list(APPEND PLATFORM_REQUIRED_DEPS OpenGl) | ||
| 8 | list(APPEND PLATFORM_OPTIONAL_DEPS GLX VDPAU) | ||
| 9 | set(APP_RENDER_SYSTEM gl) | ||
| 10 | elseif(X11_RENDER_SYSTEM STREQUAL "gles") | ||
| 11 | list(APPEND PLATFORM_REQUIRED_DEPS OpenGLES) | ||
| 12 | set(APP_RENDER_SYSTEM gles) | ||
| 13 | else() | ||
| 14 | message(SEND_ERROR "You need to decide whether you want to use GL- or GLES-based rendering in combination with the X11 windowing system. Please set X11_RENDER_SYSTEM to either \"gl\" or \"gles\". For normal desktop systems, you will usually want to use \"gl\".") | ||
| 15 | endif() | ||
| 16 | |||
| 4 | list(APPEND PLATFORM_DEFINES -DPLATFORM_SETTINGS_FILE=x11.xml) \ No newline at end of file | 17 | list(APPEND PLATFORM_DEFINES -DPLATFORM_SETTINGS_FILE=x11.xml) \ No newline at end of file |
diff --git a/cmake/platform/osx/defines.txt b/cmake/platform/osx/defines.txt index 33b009e..8ebb2ba 100644 --- a/cmake/platform/osx/defines.txt +++ b/cmake/platform/osx/defines.txt | |||
| @@ -1 +1 @@ | |||
| -DTARGET_POSIX -DTARGET_DARWIN -DTARGET_DARWIN_OSX -D_LINUX | -DTARGET_POSIX -DTARGET_DARWIN -DTARGET_DARWIN_OSX | ||
diff --git a/cmake/scripts/android/ArchSetup.cmake b/cmake/scripts/android/ArchSetup.cmake index 69bb88d..1e529de 100644 --- a/cmake/scripts/android/ArchSetup.cmake +++ b/cmake/scripts/android/ArchSetup.cmake | |||
| @@ -2,7 +2,7 @@ if(NOT CMAKE_TOOLCHAIN_FILE) | |||
| 2 | message(FATAL_ERROR "CMAKE_TOOLCHAIN_FILE required for android. See ${CMAKE_SOURCE_DIR}/cmake/README.md") | 2 | message(FATAL_ERROR "CMAKE_TOOLCHAIN_FILE required for android. See ${CMAKE_SOURCE_DIR}/cmake/README.md") |
| 3 | endif() | 3 | endif() |
| 4 | 4 | ||
| 5 | set(ARCH_DEFINES -DTARGET_POSIX -DTARGET_LINUX -D_LINUX -DTARGET_ANDROID) | 5 | set(ARCH_DEFINES -DTARGET_POSIX -DTARGET_LINUX -DTARGET_ANDROID) |
| 6 | set(SYSTEM_DEFINES -D__STDC_CONSTANT_MACROS -D_LARGEFILE64_SOURCE | 6 | set(SYSTEM_DEFINES -D__STDC_CONSTANT_MACROS -D_LARGEFILE64_SOURCE |
| 7 | -D_FILE_OFFSET_BITS=64 -D__USE_FILE_OFFSET64=1) | 7 | -D_FILE_OFFSET_BITS=64 -D__USE_FILE_OFFSET64=1) |
| 8 | 8 | ||
| @@ -10,6 +10,7 @@ set(SYSTEM_DEFINES -D__STDC_CONSTANT_MACROS -D_LARGEFILE64_SOURCE | |||
| 10 | set(CORE_MAIN_SOURCE ${CMAKE_SOURCE_DIR}/xbmc/platform/android/activity/XBMCApp.cpp) | 10 | set(CORE_MAIN_SOURCE ${CMAKE_SOURCE_DIR}/xbmc/platform/android/activity/XBMCApp.cpp) |
| 11 | 11 | ||
| 12 | set(PLATFORM_DIR platform/linux) | 12 | set(PLATFORM_DIR platform/linux) |
| 13 | set(PLATFORMDEFS_DIR platform/posix) | ||
| 13 | if(WITH_ARCH) | 14 | if(WITH_ARCH) |
| 14 | set(ARCH ${WITH_ARCH}) | 15 | set(ARCH ${WITH_ARCH}) |
| 15 | else() | 16 | else() |
| @@ -26,16 +27,18 @@ else() | |||
| 26 | elseif(CPU STREQUAL i686) | 27 | elseif(CPU STREQUAL i686) |
| 27 | set(ARCH i486-linux) | 28 | set(ARCH i486-linux) |
| 28 | set(NEON False) | 29 | set(NEON False) |
| 30 | elseif(CPU STREQUAL x86_64) | ||
| 31 | set(ARCH x86_64) | ||
| 32 | set(NEON False) | ||
| 29 | else() | 33 | else() |
| 30 | message(SEND_ERROR "Unknown CPU: ${CPU}") | 34 | message(SEND_ERROR "Unknown CPU: ${CPU}") |
| 31 | endif() | 35 | endif() |
| 32 | endif() | 36 | endif() |
| 33 | 37 | ||
| 34 | # Additional SYSTEM_DEFINES | 38 | # Additional SYSTEM_DEFINES |
| 35 | list(APPEND SYSTEM_DEFINES -DHAS_ZEROCONF -DHAS_LINUX_NETWORK) | 39 | list(APPEND SYSTEM_DEFINES -DHAS_ZEROCONF) |
| 36 | 40 | ||
| 37 | set(ENABLE_X11 OFF CACHE BOOL "" FORCE) | 41 | set(ENABLE_X11 OFF CACHE BOOL "" FORCE) |
| 38 | set(ENABLE_AML OFF CACHE BOOL "" FORCE) | ||
| 39 | set(ENABLE_OPTICAL OFF CACHE BOOL "" FORCE) | 42 | set(ENABLE_OPTICAL OFF CACHE BOOL "" FORCE) |
| 40 | set(ENABLE_MDNS OFF CACHE BOOL "" FORCE) | 43 | set(ENABLE_MDNS OFF CACHE BOOL "" FORCE) |
| 41 | 44 | ||
diff --git a/cmake/scripts/android/Install.cmake b/cmake/scripts/android/Install.cmake index a121295..5b7b411 100644 --- a/cmake/scripts/android/Install.cmake +++ b/cmake/scripts/android/Install.cmake | |||
| @@ -107,7 +107,7 @@ add_custom_target(bundle | |||
| 107 | ${CMAKE_BINARY_DIR}/tools/android/packaging/media | 107 | ${CMAKE_BINARY_DIR}/tools/android/packaging/media |
| 108 | COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/tools/android/packaging/xbmc/res | 108 | COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/tools/android/packaging/xbmc/res |
| 109 | ${CMAKE_BINARY_DIR}/tools/android/packaging/xbmc/res | 109 | ${CMAKE_BINARY_DIR}/tools/android/packaging/xbmc/res |
| 110 | COMMAND ${CMAKE_COMMAND} -E copy_directory ${DEPENDS_PATH}/lib/python2.7 ${libdir}/python2.7 | 110 | COMMAND ${CMAKE_COMMAND} -E copy_directory ${DEPENDS_PATH}/lib/python${PYTHON_VERSION} ${libdir}/python${PYTHON_VERSION} |
| 111 | COMMAND ${CMAKE_COMMAND} -E copy_directory ${DEPENDS_PATH}/share/${APP_NAME_LC} ${datadir}/${APP_NAME_LC} | 111 | COMMAND ${CMAKE_COMMAND} -E copy_directory ${DEPENDS_PATH}/share/${APP_NAME_LC} ${datadir}/${APP_NAME_LC} |
| 112 | COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:${APP_NAME_LC}> | 112 | COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:${APP_NAME_LC}> |
| 113 | ${libdir}/${APP_NAME_LC}/$<TARGET_FILE_NAME:${APP_NAME_LC}>) | 113 | ${libdir}/${APP_NAME_LC}/$<TARGET_FILE_NAME:${APP_NAME_LC}>) |
| @@ -153,13 +153,12 @@ foreach(lib IN LISTS required_dyload dyload_optional ITEMS Shairplay) | |||
| 153 | endif() | 153 | endif() |
| 154 | endforeach() | 154 | endforeach() |
| 155 | add_bundle_file(${ASS_LIBRARY} ${libdir} "") | 155 | add_bundle_file(${ASS_LIBRARY} ${libdir} "") |
| 156 | add_bundle_file(${BLURAY_LIBRARY} ${libdir} "") | 156 | add_bundle_file(${SHAIRPLAY_LIBRARY} ${libdir} "") |
| 157 | add_bundle_file(${SMBCLIENT_LIBRARY} ${libdir} "") | 157 | add_bundle_file(${SMBCLIENT_LIBRARY} ${libdir} "") |
| 158 | 158 | ||
| 159 | # Main targets from Makefile.in | 159 | # Main targets from Makefile.in |
| 160 | if(CPU MATCHES i686) | 160 | if(CPU MATCHES i686) |
| 161 | set(CPU x86) | 161 | set(CPU x86) |
| 162 | set(ARCH x86) | ||
| 163 | endif() | 162 | endif() |
| 164 | foreach(target apk obb apk-unsigned apk-obb apk-obb-unsigned apk-noobb apk-clean apk-sign) | 163 | foreach(target apk obb apk-unsigned apk-obb apk-obb-unsigned apk-noobb apk-clean apk-sign) |
| 165 | add_custom_target(${target} | 164 | add_custom_target(${target} |
| @@ -168,7 +167,6 @@ foreach(target apk obb apk-unsigned apk-obb apk-obb-unsigned apk-noobb apk-clean | |||
| 168 | CMAKE_SOURCE_DIR=${CMAKE_SOURCE_DIR} | 167 | CMAKE_SOURCE_DIR=${CMAKE_SOURCE_DIR} |
| 169 | CC=${CMAKE_C_COMPILER} | 168 | CC=${CMAKE_C_COMPILER} |
| 170 | CPU=${CPU} | 169 | CPU=${CPU} |
| 171 | ARCH=${ARCH} | ||
| 172 | HOST=${HOST} | 170 | HOST=${HOST} |
| 173 | TOOLCHAIN=${TOOLCHAIN} | 171 | TOOLCHAIN=${TOOLCHAIN} |
| 174 | PREFIX=${prefix} | 172 | PREFIX=${prefix} |
diff --git a/cmake/scripts/common/AddonHelpers.cmake b/cmake/scripts/common/AddonHelpers.cmake index 2f3f302..c541ad7 100644 --- a/cmake/scripts/common/AddonHelpers.cmake +++ b/cmake/scripts/common/AddonHelpers.cmake | |||
| @@ -92,6 +92,7 @@ macro (build_addon target prefix libs) | |||
| 92 | endforeach() | 92 | endforeach() |
| 93 | endif() | 93 | endif() |
| 94 | 94 | ||
| 95 | message(STATUS "Addon dependency check ...") | ||
| 95 | # Set defines used in addon.xml.in and read from versions.h to set add-on | 96 | # Set defines used in addon.xml.in and read from versions.h to set add-on |
| 96 | # version parts automatically | 97 | # version parts automatically |
| 97 | file(STRINGS ${KODI_INCLUDE_DIR}/versions.h BIN_ADDON_PARTS) | 98 | file(STRINGS ${KODI_INCLUDE_DIR}/versions.h BIN_ADDON_PARTS) |
| @@ -108,7 +109,8 @@ macro (build_addon target prefix libs) | |||
| 108 | if("${include_name}" MATCHES "_DEPENDS") | 109 | if("${include_name}" MATCHES "_DEPENDS") |
| 109 | # Use start definition name as base for other value type | 110 | # Use start definition name as base for other value type |
| 110 | list(GET loop_var 0 list_name) | 111 | list(GET loop_var 0 list_name) |
| 111 | string(REPLACE "_DEPENDS" "" depends_name ${list_name}) | 112 | string(REPLACE "_DEPENDS" "_MIN" depends_minver ${list_name}) |
| 113 | string(REPLACE "_DEPENDS" "" depends_ver ${list_name}) | ||
| 112 | string(REPLACE "_DEPENDS" "_XML_ID" xml_entry_name ${list_name}) | 114 | string(REPLACE "_DEPENDS" "_XML_ID" xml_entry_name ${list_name}) |
| 113 | string(REPLACE "_DEPENDS" "_USED" used_type_name ${list_name}) | 115 | string(REPLACE "_DEPENDS" "_USED" used_type_name ${list_name}) |
| 114 | 116 | ||
| @@ -120,16 +122,14 @@ macro (build_addon target prefix libs) | |||
| 120 | foreach(src_file ${USED_SOURCES}) | 122 | foreach(src_file ${USED_SOURCES}) |
| 121 | file(STRINGS ${src_file} BIN_ADDON_SRC_PARTS) | 123 | file(STRINGS ${src_file} BIN_ADDON_SRC_PARTS) |
| 122 | foreach(loop_var ${BIN_ADDON_SRC_PARTS}) | 124 | foreach(loop_var ${BIN_ADDON_SRC_PARTS}) |
| 123 | string(FIND "${loop_var}" "#include" matchres) | 125 | string(REGEX MATCH "^[ \t]*#[ \t]*(include|import)[ \t]*[<\"](kodi\/)?(.+)[\">]" include_name "${loop_var}") |
| 124 | if("${matchres}" EQUAL 0) | 126 | if(include_name AND CMAKE_MATCH_3 MATCHES ^${depend_header}) |
| 125 | string(REPLACE " " ";" loop_var "${loop_var}") | 127 | get_directory_property(CURRENT_DEFS COMPILE_DEFINITIONS) |
| 126 | list(GET loop_var 1 include_name) | 128 | if(NOT used_type_name IN_LIST CURRENT_DEFS) |
| 127 | string(REGEX REPLACE "[<>\"]|kodi/" "" include_name "${include_name}") | 129 | set(ADDON_DEPENDS "${ADDON_DEPENDS}\n<import addon=\"${${xml_entry_name}}\" minversion=\"${${depends_minver}}\" version=\"${${depends_ver}}\"/>") |
| 128 | if(include_name MATCHES ${depend_header}) | 130 | # Inform with them the addon header about used type, if not present before |
| 129 | set(ADDON_DEPENDS "${ADDON_DEPENDS}\n<import addon=\"${${xml_entry_name}}\" version=\"${${depends_name}}\"/>") | ||
| 130 | # Inform with them the addon header about used type | ||
| 131 | add_definitions(-D${used_type_name}) | 131 | add_definitions(-D${used_type_name}) |
| 132 | message(STATUS "Added usage definition: ${used_type_name}") | 132 | message(STATUS " - Added API usage definition: ${used_type_name} (Version: \"${${depends_ver}}\", Min. Version: \"${${depends_minver}}\")") |
| 133 | set(FOUND_HEADER_USAGE 1) | 133 | set(FOUND_HEADER_USAGE 1) |
| 134 | endif() | 134 | endif() |
| 135 | endif() | 135 | endif() |
| @@ -276,6 +276,18 @@ macro (build_addon target prefix libs) | |||
| 276 | install(FILES ${${prefix}_ADDITIONAL_BINARY} DESTINATION ${target} | 276 | install(FILES ${${prefix}_ADDITIONAL_BINARY} DESTINATION ${target} |
| 277 | COMPONENT ${target}-${${prefix}_VERSION}-${PLATFORM_TAG}) | 277 | COMPONENT ${target}-${${prefix}_VERSION}-${PLATFORM_TAG}) |
| 278 | endif() | 278 | endif() |
| 279 | if(${prefix}_ADDITIONAL_BINARY_EXE) | ||
| 280 | install(PROGRAMS ${${prefix}_ADDITIONAL_BINARY_EXE} DESTINATION ${target} | ||
| 281 | COMPONENT ${target}-${${prefix}_VERSION}-${PLATFORM_TAG}) | ||
| 282 | endif() | ||
| 283 | if(${prefix}_ADDITIONAL_BINARY_PARTS) | ||
| 284 | install(FILES ${${prefix}_ADDITIONAL_BINARY_PARTS} DESTINATION ${target} | ||
| 285 | COMPONENT ${target}-${${prefix}_VERSION}-${PLATFORM_TAG}) | ||
| 286 | endif() | ||
| 287 | if(${prefix}_ADDITIONAL_BINARY_DIRS) | ||
| 288 | install(DIRECTORY ${${prefix}_ADDITIONAL_BINARY_DIRS} DESTINATION ${target} USE_SOURCE_PERMISSIONS | ||
| 289 | COMPONENT ${target}-${${prefix}_VERSION}-${PLATFORM_TAG}) | ||
| 290 | endif() | ||
| 279 | else() # NOT WIN32 | 291 | else() # NOT WIN32 |
| 280 | if(NOT CPACK_PACKAGE_DIRECTORY) | 292 | if(NOT CPACK_PACKAGE_DIRECTORY) |
| 281 | set(CPACK_PACKAGE_DIRECTORY ${CMAKE_BINARY_DIR}) | 293 | set(CPACK_PACKAGE_DIRECTORY ${CMAKE_BINARY_DIR}) |
| @@ -296,6 +308,18 @@ macro (build_addon target prefix libs) | |||
| 296 | install(FILES ${${prefix}_ADDITIONAL_BINARY} DESTINATION ${target} | 308 | install(FILES ${${prefix}_ADDITIONAL_BINARY} DESTINATION ${target} |
| 297 | COMPONENT ${target}-${${prefix}_VERSION}-${PLATFORM_TAG}) | 309 | COMPONENT ${target}-${${prefix}_VERSION}-${PLATFORM_TAG}) |
| 298 | endif() | 310 | endif() |
| 311 | if(${prefix}_ADDITIONAL_BINARY_EXE) | ||
| 312 | install(PROGRAMS ${${prefix}_ADDITIONAL_BINARY_EXE} DESTINATION ${target} | ||
| 313 | COMPONENT ${target}-${${prefix}_VERSION}-${PLATFORM_TAG}) | ||
| 314 | endif() | ||
| 315 | if(${prefix}_ADDITIONAL_BINARY_PARTS) | ||
| 316 | install(FILES ${${prefix}_ADDITIONAL_BINARY_PARTS} DESTINATION ${target} | ||
| 317 | COMPONENT ${target}-${${prefix}_VERSION}-${PLATFORM_TAG}) | ||
| 318 | endif() | ||
| 319 | if(${prefix}_ADDITIONAL_BINARY_DIRS) | ||
| 320 | install(DIRECTORY ${${prefix}_ADDITIONAL_BINARY_DIRS} DESTINATION ${target} USE_SOURCE_PERMISSIONS | ||
| 321 | COMPONENT ${target}-${${prefix}_VERSION}-${PLATFORM_TAG}) | ||
| 322 | endif() | ||
| 299 | endif() | 323 | endif() |
| 300 | add_cpack_workaround(${target} ${${prefix}_VERSION} ${ext}) | 324 | add_cpack_workaround(${target} ${${prefix}_VERSION} ${ext}) |
| 301 | else() | 325 | else() |
| @@ -339,6 +363,15 @@ macro (build_addon target prefix libs) | |||
| 339 | if(${prefix}_ADDITIONAL_BINARY) | 363 | if(${prefix}_ADDITIONAL_BINARY) |
| 340 | install(FILES ${${prefix}_ADDITIONAL_BINARY} DESTINATION ${CMAKE_INSTALL_LIBDIR}/addons/${target}) | 364 | install(FILES ${${prefix}_ADDITIONAL_BINARY} DESTINATION ${CMAKE_INSTALL_LIBDIR}/addons/${target}) |
| 341 | endif() | 365 | endif() |
| 366 | if(${prefix}_ADDITIONAL_BINARY_EXE) | ||
| 367 | install(PROGRAMS ${${prefix}_ADDITIONAL_BINARY_EXE} DESTINATION ${CMAKE_INSTALL_LIBDIR}/addons/${target}) | ||
| 368 | endif() | ||
| 369 | if(${prefix}_ADDITIONAL_BINARY_PARTS) | ||
| 370 | install(FILES ${${prefix}_ADDITIONAL_BINARY_PARTS} DESTINATION ${CMAKE_INSTALL_LIBDIR}/addons/${target}) | ||
| 371 | endif() | ||
| 372 | if(${prefix}_ADDITIONAL_BINARY_DIRS) | ||
| 373 | install(DIRECTORY ${${prefix}_ADDITIONAL_BINARY_DIRS} DESTINATION ${CMAKE_INSTALL_LIBDIR}/addons/${target} USE_SOURCE_PERMISSIONS) | ||
| 374 | endif() | ||
| 342 | endif() | 375 | endif() |
| 343 | if(${APP_NAME_UC}_BUILD_DIR) | 376 | if(${APP_NAME_UC}_BUILD_DIR) |
| 344 | file(GLOB_RECURSE files ${CMAKE_CURRENT_SOURCE_DIR}/${target}/*) | 377 | file(GLOB_RECURSE files ${CMAKE_CURRENT_SOURCE_DIR}/${target}/*) |
diff --git a/cmake/scripts/common/AddonHelpers.dox b/cmake/scripts/common/AddonHelpers.dox new file mode 100644 index 0000000..d3acec0 --- /dev/null +++ b/cmake/scripts/common/AddonHelpers.dox | |||
| @@ -0,0 +1,59 @@ | |||
| 1 | /*! | ||
| 2 | \addtogroup cpp_cmake | ||
| 3 | |||
| 4 | Kodi which uses it as a library for its binary addons has a special build | ||
| 5 | system for this. | ||
| 6 | |||
| 7 | To implement this, a CMake macro brought by Kodi is used, this is | ||
| 8 | "build_addon (...)". This processes various definitions passed by the addon to | ||
| 9 | process the construction. | ||
| 10 | |||
| 11 | |||
| 12 | -------------------------------------------------------------------------------- | ||
| 13 | |||
| 14 | <b>Here a minmal example of the for addon used CMakeLists.txt:</b> | ||
| 15 | |||
| 16 | ~~~~~~~~~~~~~{.cmake} | ||
| 17 | cmake_minimum_required(VERSION 3.5) | ||
| 18 | project(example.addon) | ||
| 19 | |||
| 20 | set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}) | ||
| 21 | |||
| 22 | find_package(Kodi REQUIRED) | ||
| 23 | |||
| 24 | include_directories(${KODI_INCLUDE_DIR} | ||
| 25 | |||
| 26 | set(DEPLIBS ) # Here empty | ||
| 27 | set(EXAMPLE_SOURCES src/main.cpp) | ||
| 28 | set(EXAMPLE_HEADERS src/main.h) | ||
| 29 | |||
| 30 | build_addon((example.addon EXAMPLE DEPLIBS) | ||
| 31 | |||
| 32 | include(CPack) | ||
| 33 | ~~~~~~~~~~~~~ | ||
| 34 | |||
| 35 | |||
| 36 | -------------------------------------------------------------------------------- | ||
| 37 | |||
| 38 | This is a list of special variables that can be passed to the macro. | ||
| 39 | The parts defined with "*" must be given the second name given to the macro. | ||
| 40 | |||
| 41 | Here to define the necessary creation and installation files on addon CMakeLists.txt: | ||
| 42 | | Name | Description | ||
| 43 | |-----------------------------|------------------------------------------------- | ||
| 44 | | *_SOURCES | List of source code files to be complicated. | ||
| 45 | | *_HEADERS | List of used source code header files. | ||
| 46 | | *_CUSTOM_BINARY | For special cases where an already created library from an external source is inserted, the <b>"* _SOURCES"</b> and <b>"* _HEADERS"</b> are unused in this case.<br>This is currently used primarily on game addons. | ||
| 47 | | *_CUSTOM_DATA | To add additional required data from a folder, which are stored in the shared folder of the addon.<br>With a "/" at the end of the content given to the folder is used, without the folder itself. | ||
| 48 | | *_ADDITIONAL_BINARY | In case the additional library has to be installed for the addon, the path or CMake name can be given here. | ||
| 49 | | *_ADDITIONAL_BINARY_EXE | In case you need to addon an additional application you can give the path or CMake name, it will be in the same folder as the addon library.<br>The mode bits are set there as EXE. | ||
| 50 | | *_ADDITIONAL_BINARY_DIRS | To add complete folders additionally to folders containing the addon library.<br>With a "/" at the end of the content given to the folder is used, without the folder itself. | ||
| 51 | |||
| 52 | External creation Options, given by `-D...`: | ||
| 53 | | Name | Description | ||
| 54 | |-----------------------------|------------------------------------------------- | ||
| 55 | | PACKAGE_ZIP | To create a package as a ZIP file. This is also used to install locally addon together.<br>Default is OFF. | ||
| 56 | | PACKAGE_TGZ | To create a package as a TGZ file.<br>Default is OFF. | ||
| 57 | | BUILD_SHARED_LIBS | To define if addon library is shared or static.<br>Default is ON to have shared. | ||
| 58 | | USE_LTO | Use link time optimization.<br>Default is OFF. | ||
| 59 | */ | ||
diff --git a/cmake/scripts/common/ArchSetup.cmake b/cmake/scripts/common/ArchSetup.cmake index 07ce6d4..2e1eb12 100644 --- a/cmake/scripts/common/ArchSetup.cmake +++ b/cmake/scripts/common/ArchSetup.cmake | |||
| @@ -18,24 +18,7 @@ include(CheckCXXSourceCompiles) | |||
| 18 | include(CheckSymbolExists) | 18 | include(CheckSymbolExists) |
| 19 | include(CheckFunctionExists) | 19 | include(CheckFunctionExists) |
| 20 | include(CheckIncludeFile) | 20 | include(CheckIncludeFile) |
| 21 | 21 | include(CheckTypeSize) | |
| 22 | # Macro to check if a given type exists in a given header | ||
| 23 | # Arguments: | ||
| 24 | # header the header to check | ||
| 25 | # type the type to check for existence | ||
| 26 | # var the compiler definition to set if type exists | ||
| 27 | # On return: | ||
| 28 | # If type was found, the definition is added to SYSTEM_DEFINES | ||
| 29 | macro(check_type header type var) | ||
| 30 | check_cxx_source_compiles("#include <${header}> | ||
| 31 | int main() | ||
| 32 | { | ||
| 33 | ${type} s; | ||
| 34 | }" ${var}) | ||
| 35 | if(${var}) | ||
| 36 | list(APPEND SYSTEM_DEFINES -D${var}=1) | ||
| 37 | endif() | ||
| 38 | endmacro() | ||
| 39 | 22 | ||
| 40 | # Macro to check if a given builtin function exists | 23 | # Macro to check if a given builtin function exists |
| 41 | # Arguments: | 24 | # Arguments: |
| @@ -95,17 +78,12 @@ endif() | |||
| 95 | include(${CMAKE_SOURCE_DIR}/cmake/scripts/${CORE_SYSTEM_NAME}/ArchSetup.cmake) | 78 | include(${CMAKE_SOURCE_DIR}/cmake/scripts/${CORE_SYSTEM_NAME}/ArchSetup.cmake) |
| 96 | 79 | ||
| 97 | message(STATUS "Core system type: ${CORE_SYSTEM_NAME}") | 80 | message(STATUS "Core system type: ${CORE_SYSTEM_NAME}") |
| 98 | message(STATUS "Platform: ${PLATFORM}") | 81 | message(STATUS "Platform: ${CORE_PLATFORM_NAME}") |
| 99 | message(STATUS "CPU: ${CPU}, ARCH: ${ARCH}") | 82 | message(STATUS "CPU: ${CPU}, ARCH: ${ARCH}") |
| 100 | message(STATUS "Cross-Compiling: ${CMAKE_CROSSCOMPILING}") | 83 | message(STATUS "Cross-Compiling: ${CMAKE_CROSSCOMPILING}") |
| 101 | message(STATUS "Execute build artefacts on host: ${CORE_HOST_IS_TARGET}") | 84 | message(STATUS "Execute build artefacts on host: ${CORE_HOST_IS_TARGET}") |
| 102 | message(STATUS "Depends based build: ${KODI_DEPENDSBUILD}") | 85 | message(STATUS "Depends based build: ${KODI_DEPENDSBUILD}") |
| 103 | 86 | ||
| 104 | check_type(string std::u16string HAVE_STD__U16_STRING) | ||
| 105 | check_type(string std::u32string HAVE_STD__U32_STRING) | ||
| 106 | check_type(string char16_t HAVE_CHAR16_T) | ||
| 107 | check_type(string char32_t HAVE_CHAR32_T) | ||
| 108 | check_type(stdint.h uint_least16_t HAVE_STDINT_H) | ||
| 109 | check_symbol_exists(posix_fadvise fcntl.h HAVE_POSIX_FADVISE) | 87 | check_symbol_exists(posix_fadvise fcntl.h HAVE_POSIX_FADVISE) |
| 110 | check_symbol_exists(PRIdMAX inttypes.h HAVE_INTTYPES_H) | 88 | check_symbol_exists(PRIdMAX inttypes.h HAVE_INTTYPES_H) |
| 111 | check_builtin("long* temp=0; long ret=__sync_add_and_fetch(temp, 1)" HAS_BUILTIN_SYNC_ADD_AND_FETCH) | 89 | check_builtin("long* temp=0; long ret=__sync_add_and_fetch(temp, 1)" HAS_BUILTIN_SYNC_ADD_AND_FETCH) |
diff --git a/cmake/scripts/common/CheckTargetPlatform.cmake b/cmake/scripts/common/CheckTargetPlatform.cmake index 526e4bd..d776085 100644 --- a/cmake/scripts/common/CheckTargetPlatform.cmake +++ b/cmake/scripts/common/CheckTargetPlatform.cmake | |||
| @@ -29,7 +29,10 @@ function(check_target_platform dir target_platform build) | |||
| 29 | string(SUBSTRING ${platform} 1 ${platform_length} platform) | 29 | string(SUBSTRING ${platform} 1 ${platform_length} platform) |
| 30 | 30 | ||
| 31 | # check if the current platform does not match the extracted platform | 31 | # check if the current platform does not match the extracted platform |
| 32 | if(NOT ${platform} STREQUAL ${target_platform}) | 32 | if(${platform} STREQUAL ${target_platform}) |
| 33 | set(${build} FALSE) | ||
| 34 | break() | ||
| 35 | elseif(NOT ${platform} STREQUAL ${target_platform}) | ||
| 33 | set(${build} TRUE) | 36 | set(${build} TRUE) |
| 34 | endif() | 37 | endif() |
| 35 | endif() | 38 | endif() |
diff --git a/cmake/scripts/common/CompilerSettings.cmake b/cmake/scripts/common/CompilerSettings.cmake new file mode 100644 index 0000000..b4e7e89 --- /dev/null +++ b/cmake/scripts/common/CompilerSettings.cmake | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | # Languages and global compiler settings | ||
| 2 | if(NOT DEFINED CMAKE_CXX_STANDARD OR CMAKE_CXX_STANDARD LESS 14) | ||
| 3 | set(CMAKE_CXX_STANDARD 14) | ||
| 4 | endif() | ||
| 5 | set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
| 6 | set(CMAKE_CXX_EXTENSIONS OFF) | ||
| 7 | set(CMAKE_ASM_FLAGS "${CMAKE_C_FLAGS} -x assembler-with-cpp") | ||
diff --git a/cmake/scripts/common/GenerateVersionedFiles.cmake b/cmake/scripts/common/GenerateVersionedFiles.cmake index 1d324db..d54b524 100644 --- a/cmake/scripts/common/GenerateVersionedFiles.cmake +++ b/cmake/scripts/common/GenerateVersionedFiles.cmake | |||
| @@ -24,9 +24,6 @@ foreach(loop_var ${ADDON_XML_IN_FILE}) | |||
| 24 | string(REPLACE ${CORE_SOURCE_DIR} ${CMAKE_BINARY_DIR} dest_dir ${source_dir}) | 24 | string(REPLACE ${CORE_SOURCE_DIR} ${CMAKE_BINARY_DIR} dest_dir ${source_dir}) |
| 25 | file(MAKE_DIRECTORY ${dest_dir}) | 25 | file(MAKE_DIRECTORY ${dest_dir}) |
| 26 | 26 | ||
| 27 | # copy everything except addon.xml.in to build folder | ||
| 28 | file(COPY "${source_dir}" DESTINATION "${CMAKE_BINARY_DIR}/addons" REGEX ".xml.in" EXCLUDE) | ||
| 29 | |||
| 30 | configure_file(${source_dir}/addon.xml.in ${dest_dir}/addon.xml @ONLY) | 27 | configure_file(${source_dir}/addon.xml.in ${dest_dir}/addon.xml @ONLY) |
| 31 | 28 | ||
| 32 | unset(source_dir) | 29 | unset(source_dir) |
diff --git a/cmake/scripts/common/HandleDepends.cmake b/cmake/scripts/common/HandleDepends.cmake index 40e382b..7cacd25 100644 --- a/cmake/scripts/common/HandleDepends.cmake +++ b/cmake/scripts/common/HandleDepends.cmake | |||
| @@ -68,8 +68,8 @@ function(add_addon_depends addon searchpath) | |||
| 68 | -DCORE_SYSTEM_NAME=${CORE_SYSTEM_NAME} | 68 | -DCORE_SYSTEM_NAME=${CORE_SYSTEM_NAME} |
| 69 | -DENABLE_STATIC=1 | 69 | -DENABLE_STATIC=1 |
| 70 | -DBUILD_SHARED_LIBS=0) | 70 | -DBUILD_SHARED_LIBS=0) |
| 71 | # windows store args | 71 | # windows args |
| 72 | if (CMAKE_SYSTEM_NAME STREQUAL WindowsStore) | 72 | if (CMAKE_SYSTEM_NAME STREQUAL WindowsStore OR CMAKE_SYSTEM_NAME STREQUAL Windows) |
| 73 | list(APPEND BUILD_ARGS -DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME} | 73 | list(APPEND BUILD_ARGS -DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME} |
| 74 | -DCMAKE_SYSTEM_VERSION=${CMAKE_SYSTEM_VERSION}) | 74 | -DCMAKE_SYSTEM_VERSION=${CMAKE_SYSTEM_VERSION}) |
| 75 | endif() | 75 | endif() |
| @@ -78,8 +78,10 @@ function(add_addon_depends addon searchpath) | |||
| 78 | # make sure we create strings, not lists | 78 | # make sure we create strings, not lists |
| 79 | set(TMP_C_FLAGS "${CMAKE_C_FLAGS} ${ARCH_DEFINES}") | 79 | set(TMP_C_FLAGS "${CMAKE_C_FLAGS} ${ARCH_DEFINES}") |
| 80 | set(TMP_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ARCH_DEFINES}") | 80 | set(TMP_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ARCH_DEFINES}") |
| 81 | set(TMP_EXE_LINKER_FLAGS "-L${OUTPUT_DIR}/lib ${CMAKE_EXE_LINKER_FLAGS}") | ||
| 81 | list(APPEND BUILD_ARGS -DCMAKE_C_FLAGS=${TMP_C_FLAGS} | 82 | list(APPEND BUILD_ARGS -DCMAKE_C_FLAGS=${TMP_C_FLAGS} |
| 82 | -DCMAKE_CXX_FLAGS=${TMP_CXX_FLAGS}) | 83 | -DCMAKE_CXX_FLAGS=${TMP_CXX_FLAGS} |
| 84 | -DCMAKE_EXE_LINKER_FLAGS=${TMP_EXE_LINKER_FLAGS}) | ||
| 83 | endif() | 85 | endif() |
| 84 | 86 | ||
| 85 | if(CMAKE_TOOLCHAIN_FILE) | 87 | if(CMAKE_TOOLCHAIN_FILE) |
| @@ -88,6 +90,17 @@ function(add_addon_depends addon searchpath) | |||
| 88 | message(${BUILD_ARGS}) | 90 | message(${BUILD_ARGS}) |
| 89 | endif() | 91 | endif() |
| 90 | 92 | ||
| 93 | # used for addons where need special folders to store there content (if | ||
| 94 | # not set the addon define it byself). | ||
| 95 | # e.g. Google Chromium addon where his git bring: | ||
| 96 | # - "unable to create file" ... "Filename too long" | ||
| 97 | # see also WARNING by Windows on: https://bitbucket.org/chromiumembedded/cef/wiki/MasterBuildQuickStart | ||
| 98 | if(THIRD_PARTY_PATH) | ||
| 99 | message(STATUS "Third party lib path specified") | ||
| 100 | message(STATUS ${THIRD_PARTY_PATH}) | ||
| 101 | list(APPEND BUILD_ARGS -DTHIRD_PARTY_PATH=${THIRD_PARTY_PATH}) | ||
| 102 | endif() | ||
| 103 | |||
| 91 | set(PATCH_COMMAND) | 104 | set(PATCH_COMMAND) |
| 92 | 105 | ||
| 93 | # if there's a CMakeLists.txt use it to prepare the build | 106 | # if there's a CMakeLists.txt use it to prepare the build |
| @@ -215,7 +228,6 @@ function(add_addon_depends addon searchpath) | |||
| 215 | -DOUTPUT_DIR=${OUTPUT_DIR} | 228 | -DOUTPUT_DIR=${OUTPUT_DIR} |
| 216 | -DCMAKE_PREFIX_PATH=${OUTPUT_DIR} | 229 | -DCMAKE_PREFIX_PATH=${OUTPUT_DIR} |
| 217 | -DCMAKE_INSTALL_PREFIX=${OUTPUT_DIR} | 230 | -DCMAKE_INSTALL_PREFIX=${OUTPUT_DIR} |
| 218 | -DCMAKE_EXE_LINKER_FLAGS=-L${OUTPUT_DIR}/lib | ||
| 219 | -DCMAKE_INCLUDE_PATH=${OUTPUT_DIR}/include) | 231 | -DCMAKE_INCLUDE_PATH=${OUTPUT_DIR}/include) |
| 220 | endif() | 232 | endif() |
| 221 | 233 | ||
diff --git a/cmake/scripts/common/Macros.cmake b/cmake/scripts/common/Macros.cmake index eefd7c8..f7327e3 100644 --- a/cmake/scripts/common/Macros.cmake +++ b/cmake/scripts/common/Macros.cmake | |||
| @@ -111,26 +111,6 @@ function(core_add_test_library name) | |||
| 111 | endforeach() | 111 | endforeach() |
| 112 | endfunction() | 112 | endfunction() |
| 113 | 113 | ||
| 114 | # Add an addon callback library | ||
| 115 | # Arguments: | ||
| 116 | # name name of the library to add | ||
| 117 | # Implicit arguments: | ||
| 118 | # SOURCES the sources of the library | ||
| 119 | # HEADERS the headers of the library (only for IDE support) | ||
| 120 | # OTHERS other library related files (only for IDE support) | ||
| 121 | # On return: | ||
| 122 | # Library target is defined and added to LIBRARY_FILES | ||
| 123 | function(core_add_addon_library name) | ||
| 124 | get_filename_component(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} NAME) | ||
| 125 | list(APPEND SOURCES lib${name}.cpp) | ||
| 126 | core_add_shared_library(${name} OUTPUT_DIRECTORY addons/${DIRECTORY}) | ||
| 127 | set_target_properties(${name} PROPERTIES FOLDER addons) | ||
| 128 | target_include_directories(${name} PRIVATE | ||
| 129 | ${CMAKE_CURRENT_SOURCE_DIR} | ||
| 130 | ${CMAKE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi | ||
| 131 | ${CMAKE_SOURCE_DIR}/xbmc) | ||
| 132 | endfunction() | ||
| 133 | |||
| 134 | # Add an dl-loaded shared library | 114 | # Add an dl-loaded shared library |
| 135 | # Arguments: | 115 | # Arguments: |
| 136 | # name name of the library to add | 116 | # name name of the library to add |
| @@ -386,25 +366,6 @@ function(core_require_dep) | |||
| 386 | endforeach() | 366 | endforeach() |
| 387 | endfunction() | 367 | endfunction() |
| 388 | 368 | ||
| 389 | # add required dyloaded dependencies of main application | ||
| 390 | # Arguments: | ||
| 391 | # dep_list One or many dependency specifications (see split_dependency_specification) | ||
| 392 | # for syntax). The dependency name is used uppercased as variable prefix. | ||
| 393 | # On return: | ||
| 394 | # dependency added to ${SYSTEM_INCLUDES}, ${dep}_SONAME is set up | ||
| 395 | function(core_require_dyload_dep) | ||
| 396 | foreach(depspec ${ARGN}) | ||
| 397 | split_dependency_specification(${depspec} dep version) | ||
| 398 | find_package_with_ver(${dep} ${version} REQUIRED) | ||
| 399 | string(TOUPPER ${dep} depup) | ||
| 400 | list(APPEND SYSTEM_INCLUDES ${${depup}_INCLUDE_DIRS}) | ||
| 401 | list(APPEND DEP_DEFINES ${${depup}_DEFINITIONS}) | ||
| 402 | find_soname(${depup} REQUIRED) | ||
| 403 | export_dep() | ||
| 404 | set(${depup}_SONAME ${${depup}_SONAME} PARENT_SCOPE) | ||
| 405 | endforeach() | ||
| 406 | endfunction() | ||
| 407 | |||
| 408 | # helper macro for optional deps | 369 | # helper macro for optional deps |
| 409 | macro(setup_enable_switch) | 370 | macro(setup_enable_switch) |
| 410 | string(TOUPPER ${dep} depup) | 371 | string(TOUPPER ${dep} depup) |
| @@ -450,39 +411,6 @@ function(core_optional_dep) | |||
| 450 | set(final_message ${final_message} PARENT_SCOPE) | 411 | set(final_message ${final_message} PARENT_SCOPE) |
| 451 | endfunction() | 412 | endfunction() |
| 452 | 413 | ||
| 453 | # add optional dyloaded dependencies of main application | ||
| 454 | # Arguments: | ||
| 455 | # dep_list One or many dependency specifications (see split_dependency_specification) | ||
| 456 | # for syntax). The dependency name is used uppercased as variable prefix. | ||
| 457 | # On return: | ||
| 458 | # dependency optionally added to ${SYSTEM_INCLUDES}, ${DEP_DEFINES}, ${dep}_SONAME is set up | ||
| 459 | function(core_optional_dyload_dep) | ||
| 460 | foreach(depspec ${ARGN}) | ||
| 461 | set(_required False) | ||
| 462 | split_dependency_specification(${depspec} dep version) | ||
| 463 | setup_enable_switch() | ||
| 464 | if(${enable_switch} STREQUAL AUTO) | ||
| 465 | find_package_with_ver(${dep} ${version}) | ||
| 466 | elseif(${${enable_switch}}) | ||
| 467 | find_package_with_ver(${dep} ${version} REQUIRED) | ||
| 468 | set(_required True) | ||
| 469 | endif() | ||
| 470 | |||
| 471 | if(${depup}_FOUND) | ||
| 472 | list(APPEND SYSTEM_INCLUDES ${${depup}_INCLUDE_DIRS}) | ||
| 473 | find_soname(${depup} REQUIRED) | ||
| 474 | list(APPEND DEP_DEFINES ${${depup}_DEFINITIONS}) | ||
| 475 | set(final_message ${final_message} "${depup} enabled: Yes" PARENT_SCOPE) | ||
| 476 | export_dep() | ||
| 477 | set(${depup}_SONAME ${${depup}_SONAME} PARENT_SCOPE) | ||
| 478 | elseif(_required) | ||
| 479 | message(FATAL_ERROR "${depup} enabled but not found") | ||
| 480 | else() | ||
| 481 | set(final_message ${final_message} "${depup} enabled: No" PARENT_SCOPE) | ||
| 482 | endif() | ||
| 483 | endforeach() | ||
| 484 | endfunction() | ||
| 485 | |||
| 486 | function(core_file_read_filtered result filepattern) | 414 | function(core_file_read_filtered result filepattern) |
| 487 | # Reads STRINGS from text files | 415 | # Reads STRINGS from text files |
| 488 | # with comments filtered out | 416 | # with comments filtered out |
diff --git a/cmake/scripts/common/PrepareEnv.cmake b/cmake/scripts/common/PrepareEnv.cmake index 753dca1..559788f 100644 --- a/cmake/scripts/common/PrepareEnv.cmake +++ b/cmake/scripts/common/PrepareEnv.cmake | |||
| @@ -34,6 +34,14 @@ endif() | |||
| 34 | 34 | ||
| 35 | set(PLATFORM_TAG ${CORE_SYSTEM_NAME}) | 35 | set(PLATFORM_TAG ${CORE_SYSTEM_NAME}) |
| 36 | 36 | ||
| 37 | # The CPU variable is given either by ./tools/depends or by the | ||
| 38 | # ./cmake/scripts/common/ArchSetup.cmake (which refers to the Kodi building | ||
| 39 | # itself). However, this file is only used by addons, so CPU can not always | ||
| 40 | # be defined, so in this case, if empty, the base CPU will be used. | ||
| 41 | if(NOT CPU) | ||
| 42 | set(CPU ${CMAKE_SYSTEM_PROCESSOR}) | ||
| 43 | endif() | ||
| 44 | |||
| 37 | if(CORE_SYSTEM_NAME STREQUAL android) | 45 | if(CORE_SYSTEM_NAME STREQUAL android) |
| 38 | if (CPU MATCHES "v7a") | 46 | if (CPU MATCHES "v7a") |
| 39 | set(PLATFORM_TAG ${PLATFORM_TAG}-armv7) | 47 | set(PLATFORM_TAG ${PLATFORM_TAG}-armv7) |
| @@ -41,13 +49,14 @@ if(CORE_SYSTEM_NAME STREQUAL android) | |||
| 41 | set(PLATFORM_TAG ${PLATFORM_TAG}-aarch64) | 49 | set(PLATFORM_TAG ${PLATFORM_TAG}-aarch64) |
| 42 | elseif (CPU MATCHES "i686") | 50 | elseif (CPU MATCHES "i686") |
| 43 | set(PLATFORM_TAG ${PLATFORM_TAG}-i686) | 51 | set(PLATFORM_TAG ${PLATFORM_TAG}-i686) |
| 52 | elseif (CPU MATCHES "x86_64") | ||
| 53 | set(PLATFORM_TAG ${PLATFORM_TAG}-x86_64) | ||
| 44 | else() | 54 | else() |
| 45 | message(FATAL_ERROR "Unsupported architecture") | 55 | message(FATAL_ERROR "Unsupported architecture") |
| 46 | endif() | 56 | endif() |
| 47 | elseif(CORE_SYSTEM_NAME STREQUAL ios) | 57 | elseif(CORE_SYSTEM_NAME STREQUAL darwin_embedded) |
| 48 | if (CPU MATCHES armv7) | 58 | set(PLATFORM_TAG ${CORE_PLATFORM_NAME}) |
| 49 | set(PLATFORM_TAG ${PLATFORM_TAG}-armv7) | 59 | if (CPU MATCHES arm64) |
| 50 | elseif (CPU MATCHES arm64) | ||
| 51 | set(PLATFORM_TAG ${PLATFORM_TAG}-aarch64) | 60 | set(PLATFORM_TAG ${PLATFORM_TAG}-aarch64) |
| 52 | else() | 61 | else() |
| 53 | message(FATAL_ERROR "Unsupported architecture") | 62 | message(FATAL_ERROR "Unsupported architecture") |
diff --git a/cmake/scripts/darwin/Macros.cmake b/cmake/scripts/darwin/Macros.cmake new file mode 100644 index 0000000..9a805c4 --- /dev/null +++ b/cmake/scripts/darwin/Macros.cmake | |||
| @@ -0,0 +1,8 @@ | |||
| 1 | macro(enable_arc) | ||
| 2 | if(CMAKE_GENERATOR STREQUAL Xcode) | ||
| 3 | set(CMAKE_XCODE_ATTRIBUTE_CLANG_ENABLE_OBJC_ARC YES) | ||
| 4 | else() | ||
| 5 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fobjc-arc") | ||
| 6 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fobjc-arc") | ||
| 7 | endif() | ||
| 8 | endmacro() | ||
diff --git a/cmake/scripts/ios/ArchSetup.cmake b/cmake/scripts/darwin_embedded/ArchSetup.cmake index b6c626f..7160da9 100644 --- a/cmake/scripts/ios/ArchSetup.cmake +++ b/cmake/scripts/darwin_embedded/ArchSetup.cmake | |||
| @@ -1,33 +1,33 @@ | |||
| 1 | if(NOT CMAKE_TOOLCHAIN_FILE) | 1 | if(NOT CMAKE_TOOLCHAIN_FILE) |
| 2 | message(FATAL_ERROR "CMAKE_TOOLCHAIN_FILE required for ios. See ${CMAKE_SOURCE_DIR}/cmake/README.md") | 2 | message(FATAL_ERROR "CMAKE_TOOLCHAIN_FILE required for ios/tvos. See ${CMAKE_SOURCE_DIR}/cmake/README.md") |
| 3 | endif() | 3 | endif() |
| 4 | 4 | ||
| 5 | set(CORE_MAIN_SOURCE ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/XBMCApplication.mm) | 5 | set(CORE_MAIN_SOURCE ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/${CORE_PLATFORM_NAME_LC}/XBMCApplication.mm) |
| 6 | set(PLATFORM_BUNDLE_INFO_PLIST ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/${CORE_PLATFORM_NAME_LC}/Info.plist.in) | ||
| 6 | 7 | ||
| 7 | set(ARCH_DEFINES -D_LINUX -DTARGET_POSIX -DTARGET_DARWIN -DTARGET_DARWIN_IOS) | 8 | set(ARCH_DEFINES -DTARGET_POSIX -DTARGET_DARWIN -DTARGET_DARWIN_EMBEDDED) |
| 9 | if(CORE_PLATFORM_NAME_LC STREQUAL tvos) | ||
| 10 | list(APPEND ARCH_DEFINES -DTARGET_DARWIN_TVOS) | ||
| 11 | else() | ||
| 12 | list(APPEND ARCH_DEFINES -DTARGET_DARWIN_IOS) | ||
| 13 | endif() | ||
| 8 | set(SYSTEM_DEFINES -D_REENTRANT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE | 14 | set(SYSTEM_DEFINES -D_REENTRANT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE |
| 9 | -D__STDC_CONSTANT_MACROS) | 15 | -D__STDC_CONSTANT_MACROS -DHAS_IOS_NETWORK -DHAS_ZEROCONF) |
| 10 | set(PLATFORM_DIR platform/linux) | 16 | set(PLATFORM_DIR platform/darwin) |
| 17 | set(PLATFORMDEFS_DIR platform/posix) | ||
| 11 | set(CMAKE_SYSTEM_NAME Darwin) | 18 | set(CMAKE_SYSTEM_NAME Darwin) |
| 12 | if(WITH_ARCH) | 19 | if(WITH_ARCH) |
| 13 | set(ARCH ${WITH_ARCH}) | 20 | set(ARCH ${WITH_ARCH}) |
| 14 | else() | 21 | else() |
| 15 | if(CPU STREQUAL armv7) | 22 | if(CPU STREQUAL arm64) |
| 16 | set(CMAKE_OSX_ARCHITECTURES ${CPU}) | ||
| 17 | set(ARCH arm) | ||
| 18 | set(NEON True) | ||
| 19 | elseif(CPU STREQUAL arm64) | ||
| 20 | set(CMAKE_OSX_ARCHITECTURES ${CPU}) | ||
| 21 | set(ARCH aarch64) | 23 | set(ARCH aarch64) |
| 22 | set(NEON True) | ||
| 23 | else() | 24 | else() |
| 24 | message(SEND_ERROR "Unknown CPU: ${CPU}") | 25 | message(SEND_ERROR "Unknown CPU: ${CPU}") |
| 25 | endif() | 26 | endif() |
| 27 | set(CMAKE_OSX_ARCHITECTURES ${CPU}) | ||
| 28 | set(NEON True) | ||
| 26 | endif() | 29 | endif() |
| 27 | 30 | ||
| 28 | # Additional SYSTEM_DEFINES | ||
| 29 | list(APPEND SYSTEM_DEFINES -DHAS_LINUX_NETWORK -DHAS_ZEROCONF) | ||
| 30 | |||
| 31 | list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${NATIVEPREFIX}) | 31 | list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${NATIVEPREFIX}) |
| 32 | 32 | ||
| 33 | list(APPEND DEPLIBS "-framework CoreFoundation" "-framework CoreVideo" | 33 | list(APPEND DEPLIBS "-framework CoreFoundation" "-framework CoreVideo" |
| @@ -36,24 +36,28 @@ list(APPEND DEPLIBS "-framework CoreFoundation" "-framework CoreVideo" | |||
| 36 | "-framework CFNetwork" "-framework CoreGraphics" | 36 | "-framework CFNetwork" "-framework CoreGraphics" |
| 37 | "-framework Foundation" "-framework UIKit" | 37 | "-framework Foundation" "-framework UIKit" |
| 38 | "-framework CoreMedia" "-framework AVFoundation" | 38 | "-framework CoreMedia" "-framework AVFoundation" |
| 39 | "-framework VideoToolbox") | 39 | "-framework VideoToolbox" "-lresolv" "-ObjC" |
| 40 | "-framework AVKit" "-framework GameController") | ||
| 40 | 41 | ||
| 41 | set(ENABLE_OPTICAL OFF CACHE BOOL "" FORCE) | 42 | set(ENABLE_OPTICAL OFF CACHE BOOL "" FORCE) |
| 42 | 43 | ||
| 43 | set(CMAKE_XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET "9.0") | 44 | # AppleTV already has built-in AirPlay support |
| 44 | set(CMAKE_XCODE_ATTRIBUTE_TARGETED_DEVICE_FAMILY "1,2") | 45 | if(CORE_PLATFORM_NAME_LC STREQUAL tvos) |
| 45 | 46 | set(ENABLE_AIRTUNES OFF CACHE BOOL "" FORCE) | |
| 47 | endif() | ||
| 46 | set(CMAKE_XCODE_ATTRIBUTE_INLINES_ARE_PRIVATE_EXTERN OFF) | 48 | set(CMAKE_XCODE_ATTRIBUTE_INLINES_ARE_PRIVATE_EXTERN OFF) |
| 47 | set(CMAKE_XCODE_ATTRIBUTE_GCC_SYMBOLS_PRIVATE_EXTERN OFF) | 49 | set(CMAKE_XCODE_ATTRIBUTE_GCC_SYMBOLS_PRIVATE_EXTERN OFF) |
| 48 | set(CMAKE_XCODE_ATTRIBUTE_COPY_PHASE_STRIP OFF) | 50 | set(CMAKE_XCODE_ATTRIBUTE_COPY_PHASE_STRIP OFF) |
| 49 | 51 | ||
| 52 | include(cmake/scripts/darwin/Macros.cmake) | ||
| 53 | enable_arc() | ||
| 54 | |||
| 50 | # Xcode strips dead code by default which breaks wrapping | 55 | # Xcode strips dead code by default which breaks wrapping |
| 51 | set(CMAKE_XCODE_ATTRIBUTE_DEAD_CODE_STRIPPING OFF) | 56 | set(CMAKE_XCODE_ATTRIBUTE_DEAD_CODE_STRIPPING OFF) |
| 52 | 57 | ||
| 53 | # Unify output directories for iOS packaging scripts | 58 | option(ENABLE_XCODE_ADDONBUILD "Enable Xcode automatic addon building?" OFF) |
| 54 | if(NOT CMAKE_GENERATOR MATCHES Xcode) | 59 | |
| 55 | set(CORE_BUILD_CONFIG "${CORE_BUILD_CONFIG}-iphoneos") | 60 | # Unify output directories for iOS/tvOS packaging scripts |
| 56 | endif() | ||
| 57 | set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CORE_BUILD_DIR}/${CORE_BUILD_CONFIG}) | 61 | set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CORE_BUILD_DIR}/${CORE_BUILD_CONFIG}) |
| 58 | foreach(OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES}) | 62 | foreach(OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES}) |
| 59 | string(TOUPPER ${OUTPUTCONFIG} OUTPUTCONFIG) | 63 | string(TOUPPER ${OUTPUTCONFIG} OUTPUTCONFIG) |
diff --git a/cmake/scripts/darwin_embedded/ExtraTargets.cmake b/cmake/scripts/darwin_embedded/ExtraTargets.cmake new file mode 100644 index 0000000..2b9980a --- /dev/null +++ b/cmake/scripts/darwin_embedded/ExtraTargets.cmake | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | if(CORE_PLATFORM_NAME_LC STREQUAL tvos) | ||
| 2 | # top shelf extension | ||
| 3 | set(TOPSHELF_EXTENSION_NAME "${APP_NAME_LC}-topshelf") | ||
| 4 | set(TOPSHELF_BUNDLE_EXTENSION appex) | ||
| 5 | set(TOPSHELF_DIR "${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/tvos/TopShelf") | ||
| 6 | # same path as the output Info.plist, taken from cmGlobalXCodeGenerator::ComputeInfoPListLocation() | ||
| 7 | set(ENTITLEMENTS_OUT_PATH "${CMAKE_BINARY_DIR}/CMakeFiles/${TOPSHELF_EXTENSION_NAME}.dir/TopShelf.entitlements") | ||
| 8 | |||
| 9 | set(SOURCES | ||
| 10 | ${TOPSHELF_DIR}/ServiceProvider.m | ||
| 11 | ${TOPSHELF_DIR}/../tvosShared.m) | ||
| 12 | set(HEADERS | ||
| 13 | ${TOPSHELF_DIR}/ServiceProvider.h | ||
| 14 | ${TOPSHELF_DIR}/../tvosShared.h) | ||
| 15 | add_executable(${TOPSHELF_EXTENSION_NAME} MACOSX_BUNDLE ${SOURCES} ${HEADERS}) | ||
| 16 | |||
| 17 | configure_file(${TOPSHELF_DIR}/TopShelf.entitlements.in ${ENTITLEMENTS_OUT_PATH} @ONLY) | ||
| 18 | set_target_properties(${TOPSHELF_EXTENSION_NAME} PROPERTIES BUNDLE_EXTENSION ${TOPSHELF_BUNDLE_EXTENSION} | ||
| 19 | MACOSX_BUNDLE_INFO_PLIST ${TOPSHELF_DIR}/Info.plist.in | ||
| 20 | XCODE_PRODUCT_TYPE com.apple.product-type.tv-app-extension | ||
| 21 | XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS ${ENTITLEMENTS_OUT_PATH}) | ||
| 22 | target_link_libraries(${TOPSHELF_EXTENSION_NAME} "-framework TVServices" "-framework Foundation") | ||
| 23 | |||
| 24 | add_dependencies(${APP_NAME_LC} ${TOPSHELF_EXTENSION_NAME}) | ||
| 25 | endif() | ||
diff --git a/cmake/scripts/darwin_embedded/Install.cmake b/cmake/scripts/darwin_embedded/Install.cmake new file mode 100644 index 0000000..af18277 --- /dev/null +++ b/cmake/scripts/darwin_embedded/Install.cmake | |||
| @@ -0,0 +1,135 @@ | |||
| 1 | # IOS/TVOS packaging | ||
| 2 | if(CORE_PLATFORM_NAME_LC STREQUAL tvos) | ||
| 3 | # asset catalog | ||
| 4 | set(ASSET_CATALOG "${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/tvos/Assets.xcassets") | ||
| 5 | set(ASSET_CATALOG_ASSETS Assets) | ||
| 6 | set(ASSET_CATALOG_LAUNCH_IMAGE LaunchImage) | ||
| 7 | |||
| 8 | message("generating missing asset catalog images...") | ||
| 9 | execute_process(COMMAND ${CMAKE_SOURCE_DIR}/tools/darwin/Support/GenerateMissingImages-tvos.py "${ASSET_CATALOG}" ${ASSET_CATALOG_ASSETS} ${ASSET_CATALOG_LAUNCH_IMAGE}) | ||
| 10 | |||
| 11 | target_sources(${APP_NAME_LC} PRIVATE "${ASSET_CATALOG}") | ||
| 12 | set_source_files_properties("${ASSET_CATALOG}" PROPERTIES MACOSX_PACKAGE_LOCATION "Resources") # adds to Copy Bundle Resources build phase | ||
| 13 | |||
| 14 | # entitlements | ||
| 15 | set(ENTITLEMENTS_OUT_PATH "${CMAKE_BINARY_DIR}/CMakeFiles/${APP_NAME_LC}.dir/Kodi.entitlements") | ||
| 16 | configure_file(${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/tvos/Kodi.entitlements.in ${ENTITLEMENTS_OUT_PATH} @ONLY) | ||
| 17 | |||
| 18 | set_target_properties(${APP_NAME_LC} PROPERTIES XCODE_ATTRIBUTE_ASSETCATALOG_COMPILER_APPICON_NAME ${ASSET_CATALOG_ASSETS} | ||
| 19 | XCODE_ATTRIBUTE_ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME ${ASSET_CATALOG_LAUNCH_IMAGE} | ||
| 20 | XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS ${ENTITLEMENTS_OUT_PATH}) | ||
| 21 | |||
| 22 | else() | ||
| 23 | set(BUNDLE_RESOURCES ${CMAKE_SOURCE_DIR}/media/splash.jpg | ||
| 24 | ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon29x29.png | ||
| 25 | ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon29x29@2x.png | ||
| 26 | ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon40x40.png | ||
| 27 | ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon40x40@2x.png | ||
| 28 | ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon50x50.png | ||
| 29 | ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon50x50@2x.png | ||
| 30 | ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon57x57.png | ||
| 31 | ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon57x57@2x.png | ||
| 32 | ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon60x60.png | ||
| 33 | ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon60x60@2x.png | ||
| 34 | ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon72x72.png | ||
| 35 | ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon72x72@2x.png | ||
| 36 | ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon76x76.png | ||
| 37 | ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon76x76@2x.png) | ||
| 38 | |||
| 39 | target_sources(${APP_NAME_LC} PRIVATE ${BUNDLE_RESOURCES}) | ||
| 40 | foreach(file IN LISTS BUNDLE_RESOURCES) | ||
| 41 | set_source_files_properties(${file} PROPERTIES MACOSX_PACKAGE_LOCATION .) | ||
| 42 | endforeach() | ||
| 43 | |||
| 44 | target_sources(${APP_NAME_LC} PRIVATE ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchScreen.storyboard) | ||
| 45 | set_source_files_properties(${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchScreen.storyboard PROPERTIES MACOSX_PACKAGE_LOCATION "Resources") | ||
| 46 | |||
| 47 | endif() | ||
| 48 | |||
| 49 | # setup code signing | ||
| 50 | # dev team ID / identity (certificate) | ||
| 51 | set(DEVELOPMENT_TEAM "" CACHE STRING "Development Team") | ||
| 52 | set(CODE_SIGN_IDENTITY $<IF:$<BOOL:${DEVELOPMENT_TEAM}>,iPhone\ Developer,> CACHE STRING "Code Sign Identity") | ||
| 53 | |||
| 54 | # app provisioning profile | ||
| 55 | set(CODE_SIGN_STYLE_APP Automatic) | ||
| 56 | set(PROVISIONING_PROFILE_APP "" CACHE STRING "Provisioning profile name for the Kodi app") | ||
| 57 | if(PROVISIONING_PROFILE_APP) | ||
| 58 | set(CODE_SIGN_STYLE_APP Manual) | ||
| 59 | endif() | ||
| 60 | |||
| 61 | # top shelf provisioning profile | ||
| 62 | if(CORE_PLATFORM_NAME_LC STREQUAL tvos) | ||
| 63 | set(CODE_SIGN_STYLE_TOPSHELF Automatic) | ||
| 64 | set(PROVISIONING_PROFILE_TOPSHELF "" CACHE STRING "Provisioning profile name for the Top Shelf") | ||
| 65 | if(PROVISIONING_PROFILE_TOPSHELF) | ||
| 66 | set(CODE_SIGN_STYLE_TOPSHELF Manual) | ||
| 67 | endif() | ||
| 68 | set_target_properties(${TOPSHELF_EXTENSION_NAME} PROPERTIES XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "${CODE_SIGN_IDENTITY}" | ||
| 69 | XCODE_ATTRIBUTE_CODE_SIGN_STYLE ${CODE_SIGN_STYLE_TOPSHELF} | ||
| 70 | XCODE_ATTRIBUTE_DEVELOPMENT_TEAM "${DEVELOPMENT_TEAM}" | ||
| 71 | XCODE_ATTRIBUTE_PROVISIONING_PROFILE_SPECIFIER "${PROVISIONING_PROFILE_TOPSHELF}") | ||
| 72 | # copy extension inside PlugIns dir of the app bundle | ||
| 73 | add_custom_command(TARGET ${APP_NAME_LC} POST_BUILD | ||
| 74 | COMMAND ${CMAKE_COMMAND} ARGS -E copy_directory $<TARGET_BUNDLE_DIR:${TOPSHELF_EXTENSION_NAME}> | ||
| 75 | $<TARGET_BUNDLE_DIR:${APP_NAME_LC}>/PlugIns/${TOPSHELF_EXTENSION_NAME}.${TOPSHELF_BUNDLE_EXTENSION} | ||
| 76 | MAIN_DEPENDENCY ${TOPSHELF_EXTENSION_NAME}) | ||
| 77 | endif() | ||
| 78 | set_target_properties(${APP_NAME_LC} PROPERTIES XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "${CODE_SIGN_IDENTITY}" | ||
| 79 | XCODE_ATTRIBUTE_CODE_SIGN_STYLE ${CODE_SIGN_STYLE_APP} | ||
| 80 | XCODE_ATTRIBUTE_DEVELOPMENT_TEAM "${DEVELOPMENT_TEAM}" | ||
| 81 | XCODE_ATTRIBUTE_PROVISIONING_PROFILE_SPECIFIER "${PROVISIONING_PROFILE_APP}") | ||
| 82 | |||
| 83 | # Create xcode target that allows to build binary-addons. | ||
| 84 | if(ADDONS_TO_BUILD) | ||
| 85 | set(_addons "ADDONS=${ADDONS_TO_BUILD}") | ||
| 86 | endif() | ||
| 87 | add_custom_target(binary-addons | ||
| 88 | COMMAND $(MAKE) -C ${CMAKE_SOURCE_DIR}/tools/depends/target/binary-addons clean | ||
| 89 | COMMAND $(MAKE) -C ${CMAKE_SOURCE_DIR}/tools/depends/target/binary-addons VERBOSE=1 V=99 | ||
| 90 | INSTALL_PREFIX="${CMAKE_BINARY_DIR}/addons" CROSS_COMPILING=yes ${_addons}) | ||
| 91 | if(ENABLE_XCODE_ADDONBUILD) | ||
| 92 | add_dependencies(${APP_NAME_LC} binary-addons) | ||
| 93 | endif() | ||
| 94 | unset(_addons) | ||
| 95 | |||
| 96 | add_custom_command(TARGET ${APP_NAME_LC} POST_BUILD | ||
| 97 | # TODO: Remove in sync with CopyRootFiles-darwin_embedded expecting the ".bin" file | ||
| 98 | COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:${APP_NAME_LC}> | ||
| 99 | $<TARGET_FILE_DIR:${APP_NAME_LC}>/${APP_NAME}.bin | ||
| 100 | |||
| 101 | COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/DllPaths_generated.h | ||
| 102 | ${CMAKE_BINARY_DIR}/xbmc/DllPaths_generated.h | ||
| 103 | COMMAND "ACTION=build" | ||
| 104 | "APP_NAME=${APP_NAME}" | ||
| 105 | "XBMC_DEPENDS=${DEPENDS_PATH}" | ||
| 106 | ${CMAKE_SOURCE_DIR}/tools/darwin/Support/CopyRootFiles-darwin_embedded.command | ||
| 107 | COMMAND "XBMC_DEPENDS=${DEPENDS_PATH}" | ||
| 108 | "PYTHON_VERSION=${PYTHON_VERSION}" | ||
| 109 | ${CMAKE_SOURCE_DIR}/tools/darwin/Support/copyframeworks-darwin_embedded.command | ||
| 110 | COMMAND ${CMAKE_SOURCE_DIR}/tools/darwin/Support/copyframeworks-dylibs2frameworks.command | ||
| 111 | COMMAND "XBMC_DEPENDS=${DEPENDS_PATH}" | ||
| 112 | "NATIVEPREFIX=${NATIVEPREFIX}" | ||
| 113 | ${CMAKE_SOURCE_DIR}/tools/darwin/Support/Codesign.command | ||
| 114 | ) | ||
| 115 | |||
| 116 | if(CORE_PLATFORM_NAME_LC STREQUAL tvos) | ||
| 117 | add_custom_command(TARGET ${APP_NAME_LC} POST_BUILD | ||
| 118 | COMMAND ${CMAKE_COMMAND} -E copy_directory ${DEPENDS_PATH}/share/${APP_NAME_LC} $<TARGET_FILE_DIR:${APP_NAME_LC}>/AppData/AppHome | ||
| 119 | ) | ||
| 120 | endif() | ||
| 121 | |||
| 122 | set(DEPENDS_ROOT_FOR_XCODE ${NATIVEPREFIX}/..) | ||
| 123 | configure_file(${CMAKE_SOURCE_DIR}/tools/darwin/packaging/darwin_embedded/mkdeb-darwin_embedded.sh.in | ||
| 124 | ${CMAKE_BINARY_DIR}/tools/darwin/packaging/darwin_embedded/mkdeb-darwin_embedded.sh @ONLY) | ||
| 125 | |||
| 126 | if(CORE_PLATFORM_NAME_LC STREQUAL ios) | ||
| 127 | configure_file(${CMAKE_SOURCE_DIR}/tools/darwin/packaging/darwin_embedded/migrate_to_kodi.sh.in | ||
| 128 | ${CMAKE_BINARY_DIR}/tools/darwin/packaging/darwin_embedded/migrate_to_kodi.sh @ONLY) | ||
| 129 | endif() | ||
| 130 | |||
| 131 | add_custom_target(deb | ||
| 132 | COMMAND sh ./mkdeb-darwin_embedded.sh ${CORE_BUILD_CONFIG} | ||
| 133 | WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/tools/darwin/packaging/darwin_embedded) | ||
| 134 | add_dependencies(deb ${APP_NAME_LC}) | ||
| 135 | |||
diff --git a/cmake/scripts/darwin_embedded/Macros.cmake b/cmake/scripts/darwin_embedded/Macros.cmake new file mode 100644 index 0000000..91f2d86 --- /dev/null +++ b/cmake/scripts/darwin_embedded/Macros.cmake | |||
| @@ -0,0 +1,118 @@ | |||
| 1 | function(core_link_library lib wraplib) | ||
| 2 | if(CMAKE_GENERATOR MATCHES "Unix Makefiles" OR CMAKE_GENERATOR STREQUAL Ninja) | ||
| 3 | set(wrapper_obj cores/dll-loader/exports/CMakeFiles/wrapper.dir/wrapper.c.o) | ||
| 4 | elseif(CMAKE_GENERATOR MATCHES "Xcode") | ||
| 5 | set(wrapper_obj cores/dll-loader/exports/kodi.build/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/wrapper.build/Objects-$(CURRENT_VARIANT)/$(CURRENT_ARCH)/wrapper.o) | ||
| 6 | else() | ||
| 7 | message(FATAL_ERROR "Unsupported generator in core_link_library") | ||
| 8 | endif() | ||
| 9 | |||
| 10 | set(export -bundle -undefined dynamic_lookup | ||
| 11 | -Wl,-alias_list,${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/cores/dll-loader/exports/wrapper.def | ||
| 12 | ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/${wrapper_obj}) | ||
| 13 | set(extension ${CMAKE_SHARED_MODULE_SUFFIX}) | ||
| 14 | set(check_arg "") | ||
| 15 | if(TARGET ${lib}) | ||
| 16 | set(target ${lib}) | ||
| 17 | set(link_lib $<TARGET_FILE:${lib}>) | ||
| 18 | set(check_arg ${ARGV2}) | ||
| 19 | set(data_arg ${ARGV3}) | ||
| 20 | |||
| 21 | # iOS: EFFECTIVE_PLATFORM_NAME is not resolved | ||
| 22 | # http://public.kitware.com/pipermail/cmake/2016-March/063049.html | ||
| 23 | if(CORE_SYSTEM_NAME STREQUAL darwin_embedded) | ||
| 24 | get_target_property(dir ${lib} BINARY_DIR) | ||
| 25 | set(link_lib ${dir}/${CORE_BUILD_CONFIG}/${CMAKE_STATIC_LIBRARY_PREFIX}${lib}${CMAKE_STATIC_LIBRARY_SUFFIX}) | ||
| 26 | endif() | ||
| 27 | else() | ||
| 28 | set(target ${ARGV2}) | ||
| 29 | set(link_lib ${lib}) | ||
| 30 | set(check_arg ${ARGV3}) | ||
| 31 | set(data_arg ${ARGV4}) | ||
| 32 | endif() | ||
| 33 | if(check_arg STREQUAL export) | ||
| 34 | set(export ${export} | ||
| 35 | -Wl,--version-script=${ARGV3}) | ||
| 36 | elseif(check_arg STREQUAL extras) | ||
| 37 | foreach(arg ${data_arg}) | ||
| 38 | list(APPEND export ${arg}) | ||
| 39 | endforeach() | ||
| 40 | elseif(check_arg STREQUAL archives) | ||
| 41 | set(extra_libs ${data_arg}) | ||
| 42 | endif() | ||
| 43 | get_filename_component(dir ${wraplib} DIRECTORY) | ||
| 44 | |||
| 45 | # We can't simply pass the linker flags to the args section of the custom command | ||
| 46 | # because cmake will add quotes around it (and the linker will fail due to those). | ||
| 47 | # We need to do this handstand first ... | ||
| 48 | string(REPLACE " " ";" CUSTOM_COMMAND_ARGS_LDFLAGS ${CMAKE_SHARED_LINKER_FLAGS}) | ||
| 49 | |||
| 50 | add_custom_command(OUTPUT ${wraplib}-${ARCH}${extension} | ||
| 51 | COMMAND ${CMAKE_COMMAND} -E make_directory ${dir} | ||
| 52 | COMMAND ${CMAKE_C_COMPILER} | ||
| 53 | ARGS ${CUSTOM_COMMAND_ARGS_LDFLAGS} ${export} -Wl,-force_load ${link_lib} ${extra_libs} | ||
| 54 | -o ${CMAKE_BINARY_DIR}/${wraplib}-${ARCH}${extension} | ||
| 55 | DEPENDS ${target} wrapper.def wrapper | ||
| 56 | VERBATIM) | ||
| 57 | |||
| 58 | get_filename_component(libname ${wraplib} NAME_WE) | ||
| 59 | add_custom_target(wrap_${libname} ALL DEPENDS ${wraplib}-${ARCH}${extension}) | ||
| 60 | set_target_properties(wrap_${libname} PROPERTIES FOLDER lib/wrapped) | ||
| 61 | add_dependencies(${APP_NAME_LC}-libraries wrap_${libname}) | ||
| 62 | |||
| 63 | set(LIBRARY_FILES ${LIBRARY_FILES} ${CMAKE_BINARY_DIR}/${wraplib}-${ARCH}${extension} CACHE STRING "" FORCE) | ||
| 64 | endfunction() | ||
| 65 | |||
| 66 | function(find_soname lib) | ||
| 67 | cmake_parse_arguments(arg "REQUIRED" "" "" ${ARGN}) | ||
| 68 | |||
| 69 | string(TOLOWER ${lib} liblow) | ||
| 70 | if(${lib}_LDFLAGS) | ||
| 71 | set(link_lib "${${lib}_LDFLAGS}") | ||
| 72 | else() | ||
| 73 | set(link_lib "${${lib}_LIBRARIES}") | ||
| 74 | endif() | ||
| 75 | |||
| 76 | execute_process(COMMAND ${CMAKE_C_COMPILER} -print-search-dirs | ||
| 77 | COMMAND fgrep libraries: | ||
| 78 | COMMAND sed "s/[^=]*=\\(.*\\)/\\1/" | ||
| 79 | COMMAND sed "s/:/ /g" | ||
| 80 | ERROR_QUIET | ||
| 81 | OUTPUT_VARIABLE cc_lib_path | ||
| 82 | OUTPUT_STRIP_TRAILING_WHITESPACE) | ||
| 83 | execute_process(COMMAND echo ${link_lib} | ||
| 84 | COMMAND sed "s/-L[ ]*//g" | ||
| 85 | COMMAND sed "s/-l[^ ]*//g" | ||
| 86 | ERROR_QUIET | ||
| 87 | OUTPUT_VARIABLE env_lib_path | ||
| 88 | OUTPUT_STRIP_TRAILING_WHITESPACE) | ||
| 89 | |||
| 90 | foreach(path ${cc_lib_path} ${env_lib_path}) | ||
| 91 | if(IS_DIRECTORY ${path}) | ||
| 92 | execute_process(COMMAND ls -- ${path}/lib${liblow}.dylib | ||
| 93 | ERROR_QUIET | ||
| 94 | OUTPUT_VARIABLE lib_file | ||
| 95 | OUTPUT_STRIP_TRAILING_WHITESPACE) | ||
| 96 | else() | ||
| 97 | set(lib_file ${path}) | ||
| 98 | endif() | ||
| 99 | if(lib_file) | ||
| 100 | # we want the path/name that is embedded in the dylib | ||
| 101 | execute_process(COMMAND otool -L ${lib_file} | ||
| 102 | COMMAND grep -v lib${liblow}.dylib | ||
| 103 | COMMAND grep ${liblow} | ||
| 104 | COMMAND awk "{V=1; print $V}" | ||
| 105 | ERROR_QUIET | ||
| 106 | OUTPUT_VARIABLE filename | ||
| 107 | OUTPUT_STRIP_TRAILING_WHITESPACE) | ||
| 108 | get_filename_component(${lib}_SONAME "${filename}" NAME) | ||
| 109 | if(VERBOSE) | ||
| 110 | message(STATUS "${lib} soname: ${${lib}_SONAME}") | ||
| 111 | endif() | ||
| 112 | endif() | ||
| 113 | endforeach() | ||
| 114 | if(arg_REQUIRED AND NOT ${lib}_SONAME) | ||
| 115 | message(FATAL_ERROR "Could not find dynamically loadable library ${lib}") | ||
| 116 | endif() | ||
| 117 | set(${lib}_SONAME ${${lib}_SONAME} PARENT_SCOPE) | ||
| 118 | endfunction() | ||
diff --git a/cmake/scripts/darwin_embedded/PathSetup.cmake b/cmake/scripts/darwin_embedded/PathSetup.cmake new file mode 100644 index 0000000..efaca0b --- /dev/null +++ b/cmake/scripts/darwin_embedded/PathSetup.cmake | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | set(BUNDLE_IDENTIFIER_DESC "Bundle ID") | ||
| 2 | if(CORE_PLATFORM_NAME_LC STREQUAL tvos) | ||
| 3 | string(CONCAT BUNDLE_IDENTIFIER_DESC "${BUNDLE_IDENTIFIER_DESC}" " (app, top shelf, group ID)") | ||
| 4 | endif() | ||
| 5 | set(PLATFORM_BUNDLE_IDENTIFIER "${APP_PACKAGE}-${CORE_PLATFORM_NAME_LC}" CACHE STRING "${BUNDLE_IDENTIFIER_DESC}") | ||
| 6 | list(APPEND final_message "Bundle ID: ${PLATFORM_BUNDLE_IDENTIFIER}") | ||
| 7 | include(cmake/scripts/osx/PathSetup.cmake) | ||
diff --git a/cmake/scripts/freebsd/ArchSetup.cmake b/cmake/scripts/freebsd/ArchSetup.cmake index 3d5599c..7da6c51 100644 --- a/cmake/scripts/freebsd/ArchSetup.cmake +++ b/cmake/scripts/freebsd/ArchSetup.cmake | |||
| @@ -1,7 +1,8 @@ | |||
| 1 | set(ARCH_DEFINES -D_LINUX -DTARGET_POSIX -DTARGET_FREEBSD) | 1 | set(ARCH_DEFINES -DTARGET_POSIX -DTARGET_FREEBSD) |
| 2 | set(SYSTEM_DEFINES -D__STDC_CONSTANT_MACROS -D_LARGEFILE64_SOURCE | 2 | set(SYSTEM_DEFINES -D__STDC_CONSTANT_MACROS -D_LARGEFILE64_SOURCE |
| 3 | -D_FILE_OFFSET_BITS=64) | 3 | -D_FILE_OFFSET_BITS=64 -DHAS_OSS) |
| 4 | set(PLATFORM_DIR platform/linux) | 4 | set(PLATFORM_DIR platform/linux) |
| 5 | set(PLATFORMDEFS_DIR platform/posix) | ||
| 5 | set(SYSTEM_LDFLAGS -L/usr/local/lib) | 6 | set(SYSTEM_LDFLAGS -L/usr/local/lib) |
| 6 | if(WITH_ARCH) | 7 | if(WITH_ARCH) |
| 7 | set(ARCH ${WITH_ARCH}) | 8 | set(ARCH ${WITH_ARCH}) |
| @@ -30,4 +31,4 @@ if(NOT ENABLE_ALSA) | |||
| 30 | endif() | 31 | endif() |
| 31 | 32 | ||
| 32 | # Additional SYSTEM_DEFINES | 33 | # Additional SYSTEM_DEFINES |
| 33 | list(APPEND SYSTEM_DEFINES -DHAS_LINUX_NETWORK) | 34 | list(APPEND SYSTEM_DEFINES -DHAS_POSIX_NETWORK -DHAS_FREEBSD_NETWORK) |
diff --git a/cmake/scripts/ios/Install.cmake b/cmake/scripts/ios/Install.cmake deleted file mode 100644 index 7668e7c..0000000 --- a/cmake/scripts/ios/Install.cmake +++ /dev/null | |||
| @@ -1,99 +0,0 @@ | |||
| 1 | # IOS packaging | ||
| 2 | |||
| 3 | set(BUNDLE_RESOURCES ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-1100-Landscape-2436h@3x.png | ||
| 4 | ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-1100-Portrait-2436h@3x.png | ||
| 5 | ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-1200-Landscape-1792h@2x.png | ||
| 6 | ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-1200-Portrait-2224h@2x.png | ||
| 7 | ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-1200-Landscape-2224h@2x.png | ||
| 8 | ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-1200-Portrait-2388h@2x.png | ||
| 9 | ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-1200-Landscape-2388h@2x.png | ||
| 10 | ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-1200-Landscape-2688h@3x.png | ||
| 11 | ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-1200-Portrait-1792h@2x.png | ||
| 12 | ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-1200-Portrait-2688h@3x.png | ||
| 13 | ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-568h@2x.png | ||
| 14 | ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-700-568h@2x.png | ||
| 15 | ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-700-Landscape@2x~ipad.png | ||
| 16 | ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-700-Portrait@2x~ipad.png | ||
| 17 | ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-700@2x.png | ||
| 18 | ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-800-667h@2x.png | ||
| 19 | ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-800-Landscape-736h@3x.png | ||
| 20 | ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-800-Portrait-736h@3x.png | ||
| 21 | ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-Landscape@2x~ipad.png | ||
| 22 | ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-Portrait@2x~ipad.png | ||
| 23 | ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage@2x.png | ||
| 24 | ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon29x29.png | ||
| 25 | ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon29x29@2x.png | ||
| 26 | ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon40x40.png | ||
| 27 | ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon40x40@2x.png | ||
| 28 | ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon50x50.png | ||
| 29 | ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon50x50@2x.png | ||
| 30 | ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon57x57.png | ||
| 31 | ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon57x57@2x.png | ||
| 32 | ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon60x60.png | ||
| 33 | ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon60x60@2x.png | ||
| 34 | ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon72x72.png | ||
| 35 | ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon72x72@2x.png | ||
| 36 | ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon76x76.png | ||
| 37 | ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon76x76@2x.png) | ||
| 38 | |||
| 39 | target_sources(${APP_NAME_LC} PRIVATE ${BUNDLE_RESOURCES}) | ||
| 40 | foreach(file IN LISTS BUNDLE_RESOURCES) | ||
| 41 | set_source_files_properties(${file} PROPERTIES MACOSX_PACKAGE_LOCATION .) | ||
| 42 | endforeach() | ||
| 43 | |||
| 44 | target_sources(${APP_NAME_LC} PRIVATE ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/English.lproj/InfoPlist.strings) | ||
| 45 | set_source_files_properties(${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/English.lproj/InfoPlist.strings PROPERTIES MACOSX_PACKAGE_LOCATION "./English.lproj") | ||
| 46 | |||
| 47 | # Options for code signing propagated as env vars to Codesign.command via Xcode | ||
| 48 | set(IOS_CODE_SIGN_IDENTITY "" CACHE STRING "Code Sign Identity") | ||
| 49 | if(IOS_CODE_SIGN_IDENTITY) | ||
| 50 | set_target_properties(${APP_NAME_LC} PROPERTIES XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED TRUE | ||
| 51 | XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY ${IOS_CODE_SIGN_IDENTITY}) | ||
| 52 | endif() | ||
| 53 | |||
| 54 | add_custom_command(TARGET ${APP_NAME_LC} POST_BUILD | ||
| 55 | # TODO: Remove in sync with CopyRootFiles-ios expecting the ".bin" file | ||
| 56 | COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:${APP_NAME_LC}> | ||
| 57 | $<TARGET_FILE_DIR:${APP_NAME_LC}>/${APP_NAME}.bin | ||
| 58 | |||
| 59 | COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/DllPaths_generated.h | ||
| 60 | ${CMAKE_BINARY_DIR}/xbmc/DllPaths_generated.h | ||
| 61 | COMMAND "ACTION=build" | ||
| 62 | "TARGET_BUILD_DIR=$<TARGET_FILE_DIR:${APP_NAME_LC}>/.." | ||
| 63 | "TARGET_NAME=${APP_NAME}.app" | ||
| 64 | "APP_NAME=${APP_NAME}" | ||
| 65 | "PRODUCT_NAME=${APP_NAME}" | ||
| 66 | "WRAPPER_EXTENSION=app" | ||
| 67 | "SRCROOT=${CMAKE_BINARY_DIR}" | ||
| 68 | ${CMAKE_SOURCE_DIR}/tools/darwin/Support/CopyRootFiles-ios.command | ||
| 69 | COMMAND "XBMC_DEPENDS=${DEPENDS_PATH}" | ||
| 70 | "TARGET_BUILD_DIR=$<TARGET_FILE_DIR:${APP_NAME_LC}>/.." | ||
| 71 | "TARGET_NAME=${APP_NAME}.app" | ||
| 72 | "APP_NAME=${APP_NAME}" | ||
| 73 | "PRODUCT_NAME=${APP_NAME}" | ||
| 74 | "FULL_PRODUCT_NAME=${APP_NAME}.app" | ||
| 75 | "WRAPPER_EXTENSION=app" | ||
| 76 | "SRCROOT=${CMAKE_BINARY_DIR}" | ||
| 77 | ${CMAKE_SOURCE_DIR}/tools/darwin/Support/copyframeworks-ios.command | ||
| 78 | COMMAND "XBMC_DEPENDS=${DEPENDS_PATH}" | ||
| 79 | "NATIVEPREFIX=${NATIVEPREFIX}" | ||
| 80 | "PLATFORM_NAME=${PLATFORM}" | ||
| 81 | "CODESIGNING_FOLDER_PATH=$<TARGET_FILE_DIR:${APP_NAME_LC}>" | ||
| 82 | "BUILT_PRODUCTS_DIR=$<TARGET_FILE_DIR:${APP_NAME_LC}>/.." | ||
| 83 | "WRAPPER_NAME=${APP_NAME}.app" | ||
| 84 | "APP_NAME=${APP_NAME}" | ||
| 85 | "CURRENT_ARCH=${ARCH}" | ||
| 86 | ${CMAKE_SOURCE_DIR}/tools/darwin/Support/Codesign.command | ||
| 87 | ) | ||
| 88 | |||
| 89 | set(DEPENDS_ROOT_FOR_XCODE ${NATIVEPREFIX}/..) | ||
| 90 | configure_file(${CMAKE_SOURCE_DIR}/tools/darwin/packaging/ios/mkdeb-ios.sh.in | ||
| 91 | ${CMAKE_BINARY_DIR}/tools/darwin/packaging/ios/mkdeb-ios.sh @ONLY) | ||
| 92 | configure_file(${CMAKE_SOURCE_DIR}/tools/darwin/packaging/migrate_to_kodi_ios.sh.in | ||
| 93 | ${CMAKE_BINARY_DIR}/tools/darwin/packaging/migrate_to_kodi_ios.sh @ONLY) | ||
| 94 | |||
| 95 | add_custom_target(deb | ||
| 96 | COMMAND sh ./mkdeb-ios.sh ${CORE_BUILD_CONFIG} | ||
| 97 | WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/tools/darwin/packaging/ios) | ||
| 98 | add_dependencies(deb ${APP_NAME_LC}) | ||
| 99 | |||
diff --git a/cmake/scripts/ios/Macros.cmake b/cmake/scripts/ios/Macros.cmake deleted file mode 120000 index 54c1b28..0000000 --- a/cmake/scripts/ios/Macros.cmake +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | ../osx/Macros.cmake \ No newline at end of file | ||
diff --git a/cmake/scripts/ios/PathSetup.cmake b/cmake/scripts/ios/PathSetup.cmake deleted file mode 120000 index d7f25b2..0000000 --- a/cmake/scripts/ios/PathSetup.cmake +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | ../osx/PathSetup.cmake \ No newline at end of file | ||
diff --git a/cmake/scripts/linux/ArchSetup.cmake b/cmake/scripts/linux/ArchSetup.cmake index 602ef3d..04fc6e3 100644 --- a/cmake/scripts/linux/ArchSetup.cmake +++ b/cmake/scripts/linux/ArchSetup.cmake | |||
| @@ -1,8 +1,8 @@ | |||
| 1 | # we always want to use GNU features if available, so set _GNU_SOURCE | 1 | # we always want to use GNU features if available, so set _GNU_SOURCE |
| 2 | set(ARCH_DEFINES -D_LINUX -DTARGET_POSIX -DTARGET_LINUX -D_GNU_SOURCE) | 2 | set(ARCH_DEFINES -DTARGET_POSIX -DTARGET_LINUX -D_GNU_SOURCE) |
| 3 | set(SYSTEM_DEFINES -D__STDC_CONSTANT_MACROS -D_FILE_DEFINED | 3 | set(SYSTEM_DEFINES -D__STDC_CONSTANT_MACROS -D_FILE_OFFSET_BITS=64) |
| 4 | -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64) | ||
| 5 | set(PLATFORM_DIR platform/linux) | 4 | set(PLATFORM_DIR platform/linux) |
| 5 | set(PLATFORMDEFS_DIR platform/posix) | ||
| 6 | set(CMAKE_SYSTEM_NAME Linux) | 6 | set(CMAKE_SYSTEM_NAME Linux) |
| 7 | if(WITH_ARCH) | 7 | if(WITH_ARCH) |
| 8 | set(ARCH ${WITH_ARCH}) | 8 | set(ARCH ${WITH_ARCH}) |
| @@ -84,10 +84,27 @@ endif() | |||
| 84 | include(LDGOLD) | 84 | include(LDGOLD) |
| 85 | 85 | ||
| 86 | include(CheckIncludeFiles) | 86 | include(CheckIncludeFiles) |
| 87 | check_include_files("linux/memfd.h" HAVE_LINUX_MEMFD) | 87 | check_include_files("linux/udmabuf.h" HAVE_LINUX_UDMABUF) |
| 88 | if(HAVE_LINUX_MEMFD) | 88 | if(HAVE_LINUX_UDMABUF) |
| 89 | list(APPEND ARCH_DEFINES "-DHAVE_LINUX_MEMFD=1") | 89 | list(APPEND ARCH_DEFINES "-DHAVE_LINUX_UDMABUF=1") |
| 90 | else() | ||
| 91 | message(STATUS "include/linux/udmabuf.h not found") | ||
| 92 | endif() | ||
| 93 | |||
| 94 | check_include_files("linux/dma-heap.h" HAVE_LINUX_DMA_HEAP) | ||
| 95 | if(HAVE_LINUX_DMA_HEAP) | ||
| 96 | list(APPEND ARCH_DEFINES "-DHAVE_LINUX_DMA_HEAP=1") | ||
| 97 | else() | ||
| 98 | message(STATUS "include/linux/dma-heap.h not found") | ||
| 99 | endif() | ||
| 100 | |||
| 101 | check_include_files("linux/dma-buf.h" HAVE_LINUX_DMA_BUF) | ||
| 102 | if(HAVE_LINUX_DMA_BUF) | ||
| 103 | list(APPEND ARCH_DEFINES "-DHAVE_LINUX_DMA_BUF=1") | ||
| 104 | else() | ||
| 105 | message(STATUS "include/linux/dma-buf.h not found") | ||
| 90 | endif() | 106 | endif() |
| 107 | |||
| 91 | include(CheckSymbolExists) | 108 | include(CheckSymbolExists) |
| 92 | set(CMAKE_REQUIRED_DEFINITIONS "-D_GNU_SOURCE") | 109 | set(CMAKE_REQUIRED_DEFINITIONS "-D_GNU_SOURCE") |
| 93 | check_symbol_exists("mkostemp" "stdlib.h" HAVE_MKOSTEMP) | 110 | check_symbol_exists("mkostemp" "stdlib.h" HAVE_MKOSTEMP) |
| @@ -96,8 +113,17 @@ if(HAVE_MKOSTEMP) | |||
| 96 | list(APPEND ARCH_DEFINES "-DHAVE_MKOSTEMP=1") | 113 | list(APPEND ARCH_DEFINES "-DHAVE_MKOSTEMP=1") |
| 97 | endif() | 114 | endif() |
| 98 | 115 | ||
| 116 | set(CMAKE_REQUIRED_DEFINITIONS "-D_GNU_SOURCE") | ||
| 117 | check_symbol_exists("memfd_create" "sys/mman.h" HAVE_LINUX_MEMFD) | ||
| 118 | set(CMAKE_REQUIRED_DEFINITIONS "") | ||
| 119 | if(HAVE_LINUX_MEMFD) | ||
| 120 | list(APPEND ARCH_DEFINES "-DHAVE_LINUX_MEMFD=1") | ||
| 121 | else() | ||
| 122 | message(STATUS "memfd_create() not found") | ||
| 123 | endif() | ||
| 124 | |||
| 99 | # Additional SYSTEM_DEFINES | 125 | # Additional SYSTEM_DEFINES |
| 100 | list(APPEND SYSTEM_DEFINES -DHAS_LINUX_NETWORK) | 126 | list(APPEND SYSTEM_DEFINES -DHAS_POSIX_NETWORK -DHAS_LINUX_NETWORK) |
| 101 | 127 | ||
| 102 | # Code Coverage | 128 | # Code Coverage |
| 103 | if(CMAKE_BUILD_TYPE STREQUAL Coverage) | 129 | if(CMAKE_BUILD_TYPE STREQUAL Coverage) |
diff --git a/cmake/scripts/osx/ArchSetup.cmake b/cmake/scripts/osx/ArchSetup.cmake index 74f2ed4..7d8f58b 100644 --- a/cmake/scripts/osx/ArchSetup.cmake +++ b/cmake/scripts/osx/ArchSetup.cmake | |||
| @@ -6,10 +6,11 @@ set(CORE_MAIN_SOURCE ${CMAKE_SOURCE_DIR}/xbmc/platform/posix/main.cpp | |||
| 6 | ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/osx/SDLMain.mm | 6 | ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/osx/SDLMain.mm |
| 7 | ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/osx/SDLMain.h) | 7 | ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/osx/SDLMain.h) |
| 8 | 8 | ||
| 9 | set(ARCH_DEFINES -D_LINUX -DTARGET_POSIX -DTARGET_DARWIN -DTARGET_DARWIN_OSX) | 9 | set(ARCH_DEFINES -DTARGET_POSIX -DTARGET_DARWIN -DTARGET_DARWIN_OSX) |
| 10 | set(SYSTEM_DEFINES -D_REENTRANT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE | 10 | set(SYSTEM_DEFINES -D_REENTRANT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE |
| 11 | -D__STDC_CONSTANT_MACROS) | 11 | -D__STDC_CONSTANT_MACROS) |
| 12 | set(PLATFORM_DIR platform/linux) | 12 | set(PLATFORM_DIR platform/darwin) |
| 13 | set(PLATFORMDEFS_DIR platform/posix) | ||
| 13 | set(CMAKE_SYSTEM_NAME Darwin) | 14 | set(CMAKE_SYSTEM_NAME Darwin) |
| 14 | if(WITH_ARCH) | 15 | if(WITH_ARCH) |
| 15 | set(ARCH ${WITH_ARCH}) | 16 | set(ARCH ${WITH_ARCH}) |
| @@ -23,7 +24,7 @@ else() | |||
| 23 | endif() | 24 | endif() |
| 24 | 25 | ||
| 25 | # Additional SYSTEM_DEFINES | 26 | # Additional SYSTEM_DEFINES |
| 26 | list(APPEND SYSTEM_DEFINES -DHAS_LINUX_NETWORK -DHAS_SDL -DHAS_ZEROCONF) | 27 | list(APPEND SYSTEM_DEFINES -DHAS_POSIX_NETWORK -DHAS_OSX_NETWORK -DHAS_SDL -DHAS_ZEROCONF) |
| 27 | 28 | ||
| 28 | list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${NATIVEPREFIX}) | 29 | list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${NATIVEPREFIX}) |
| 29 | 30 | ||
| @@ -32,7 +33,10 @@ list(APPEND DEPLIBS "-framework DiskArbitration" "-framework IOKit" | |||
| 32 | "-framework ApplicationServices" "-framework AppKit" | 33 | "-framework ApplicationServices" "-framework AppKit" |
| 33 | "-framework CoreAudio" "-framework AudioToolbox" | 34 | "-framework CoreAudio" "-framework AudioToolbox" |
| 34 | "-framework CoreGraphics" "-framework CoreMedia" | 35 | "-framework CoreGraphics" "-framework CoreMedia" |
| 35 | "-framework VideoToolbox") | 36 | "-framework VideoToolbox" "-framework Security") |
| 36 | 37 | ||
| 37 | set(CMAKE_OSX_DEPLOYMENT_TARGET 10.9) | 38 | set(CMAKE_OSX_DEPLOYMENT_TARGET 10.13) |
| 38 | set(CMAKE_XCODE_ATTRIBUTE_CLANG_LINK_OBJC_RUNTIME OFF) | 39 | set(CMAKE_XCODE_ATTRIBUTE_CLANG_LINK_OBJC_RUNTIME OFF) |
| 40 | |||
| 41 | include(cmake/scripts/darwin/Macros.cmake) | ||
| 42 | enable_arc() | ||
diff --git a/cmake/scripts/osx/Install.cmake b/cmake/scripts/osx/Install.cmake index 77c771c..aca31b4 100644 --- a/cmake/scripts/osx/Install.cmake +++ b/cmake/scripts/osx/Install.cmake | |||
| @@ -22,6 +22,7 @@ add_custom_target(bundle | |||
| 22 | "APP_NAME=${APP_NAME}" | 22 | "APP_NAME=${APP_NAME}" |
| 23 | "FULL_PRODUCT_NAME=${APP_NAME}.app" | 23 | "FULL_PRODUCT_NAME=${APP_NAME}.app" |
| 24 | "SRCROOT=${CMAKE_BINARY_DIR}" | 24 | "SRCROOT=${CMAKE_BINARY_DIR}" |
| 25 | "PYTHON_VERSION=${PYTHON_VERSION}" | ||
| 25 | ${CMAKE_SOURCE_DIR}/tools/darwin/Support/copyframeworks-osx.command) | 26 | ${CMAKE_SOURCE_DIR}/tools/darwin/Support/copyframeworks-osx.command) |
| 26 | set_target_properties(bundle PROPERTIES FOLDER "Build Utilities") | 27 | set_target_properties(bundle PROPERTIES FOLDER "Build Utilities") |
| 27 | add_dependencies(bundle ${APP_NAME_LC}) | 28 | add_dependencies(bundle ${APP_NAME_LC}) |
diff --git a/cmake/scripts/osx/Macros.cmake b/cmake/scripts/osx/Macros.cmake index 52f87d1..251cc79 100644 --- a/cmake/scripts/osx/Macros.cmake +++ b/cmake/scripts/osx/Macros.cmake | |||
| @@ -20,7 +20,7 @@ function(core_link_library lib wraplib) | |||
| 20 | 20 | ||
| 21 | # iOS: EFFECTIVE_PLATFORM_NAME is not resolved | 21 | # iOS: EFFECTIVE_PLATFORM_NAME is not resolved |
| 22 | # http://public.kitware.com/pipermail/cmake/2016-March/063049.html | 22 | # http://public.kitware.com/pipermail/cmake/2016-March/063049.html |
| 23 | if(CORE_SYSTEM_NAME STREQUAL ios AND CMAKE_GENERATOR STREQUAL Xcode) | 23 | if(CORE_SYSTEM_NAME STREQUAL darwin_embedded) |
| 24 | get_target_property(dir ${lib} BINARY_DIR) | 24 | get_target_property(dir ${lib} BINARY_DIR) |
| 25 | set(link_lib ${dir}/${CORE_BUILD_CONFIG}/${CMAKE_STATIC_LIBRARY_PREFIX}${lib}${CMAKE_STATIC_LIBRARY_SUFFIX}) | 25 | set(link_lib ${dir}/${CORE_BUILD_CONFIG}/${CMAKE_STATIC_LIBRARY_PREFIX}${lib}${CMAKE_STATIC_LIBRARY_SUFFIX}) |
| 26 | endif() | 26 | endif() |
diff --git a/cmake/scripts/windows/ArchSetup.cmake b/cmake/scripts/windows/ArchSetup.cmake index 032632c..f3628f2 100644 --- a/cmake/scripts/windows/ArchSetup.cmake +++ b/cmake/scripts/windows/ArchSetup.cmake | |||
| @@ -35,7 +35,6 @@ set(MINGW_LIBS_DIR ${CMAKE_SOURCE_DIR}/${DEPS_FOLDER_RELATIVE}/mingwlibs/${ARCH} | |||
| 35 | list(APPEND CMAKE_PREFIX_PATH ${MINGW_LIBS_DIR}) | 35 | list(APPEND CMAKE_PREFIX_PATH ${MINGW_LIBS_DIR}) |
| 36 | list(APPEND CMAKE_LIBRARY_PATH ${MINGW_LIBS_DIR}/bin) | 36 | list(APPEND CMAKE_LIBRARY_PATH ${MINGW_LIBS_DIR}/bin) |
| 37 | list(APPEND CMAKE_PREFIX_PATH ${DEPENDENCIES_DIR}) | 37 | list(APPEND CMAKE_PREFIX_PATH ${DEPENDENCIES_DIR}) |
| 38 | set(PYTHON_INCLUDE_DIR ${DEPENDENCIES_DIR}/include/python) | ||
| 39 | 38 | ||
| 40 | # -------- Compiler options --------- | 39 | # -------- Compiler options --------- |
| 41 | 40 | ||
| @@ -46,12 +45,9 @@ set(SYSTEM_DEFINES -DWIN32_LEAN_AND_MEAN -DNOMINMAX -DHAS_DX -D__STDC_CONSTANT_M | |||
| 46 | -DPLT_HTTP_DEFAULT_USER_AGENT="UPnP/1.0 DLNADOC/1.50 Kodi" | 45 | -DPLT_HTTP_DEFAULT_USER_AGENT="UPnP/1.0 DLNADOC/1.50 Kodi" |
| 47 | -DPLT_HTTP_DEFAULT_SERVER="UPnP/1.0 DLNADOC/1.50 Kodi" | 46 | -DPLT_HTTP_DEFAULT_SERVER="UPnP/1.0 DLNADOC/1.50 Kodi" |
| 48 | -DUNICODE -D_UNICODE | 47 | -DUNICODE -D_UNICODE |
| 48 | -DFRIBIDI_STATIC | ||
| 49 | $<$<CONFIG:Debug>:-DD3D_DEBUG_INFO>) | 49 | $<$<CONFIG:Debug>:-DD3D_DEBUG_INFO>) |
| 50 | 50 | ||
| 51 | if(${ARCH} STREQUAL win32) | ||
| 52 | list(APPEND SYSTEM_DEFINES $<$<CONFIG:Debug>:-D_ITERATOR_DEBUG_LEVEL=0>) | ||
| 53 | endif() | ||
| 54 | |||
| 55 | # Additional SYSTEM_DEFINES | 51 | # Additional SYSTEM_DEFINES |
| 56 | list(APPEND SYSTEM_DEFINES -DHAS_WIN32_NETWORK -DHAS_FILESYSTEM_SMB) | 52 | list(APPEND SYSTEM_DEFINES -DHAS_WIN32_NETWORK -DHAS_FILESYSTEM_SMB) |
| 57 | 53 | ||
| @@ -74,7 +70,8 @@ link_directories(${DEPENDENCIES_DIR}/lib) | |||
| 74 | 70 | ||
| 75 | # Additional libraries | 71 | # Additional libraries |
| 76 | list(APPEND DEPLIBS bcrypt.lib d3d11.lib DInput8.lib DSound.lib winmm.lib Mpr.lib Iphlpapi.lib WS2_32.lib | 72 | list(APPEND DEPLIBS bcrypt.lib d3d11.lib DInput8.lib DSound.lib winmm.lib Mpr.lib Iphlpapi.lib WS2_32.lib |
| 77 | PowrProf.lib setupapi.lib Shlwapi.lib dwmapi.lib dxguid.lib DelayImp.lib) | 73 | PowrProf.lib setupapi.lib Shlwapi.lib dwmapi.lib dxguid.lib DelayImp.lib version.lib |
| 74 | crypt32.lib Mfplat.lib Mfuuid.lib Strmiids.lib) | ||
| 78 | 75 | ||
| 79 | # NODEFAULTLIB option | 76 | # NODEFAULTLIB option |
| 80 | set(_nodefaultlibs_RELEASE libcmt) | 77 | set(_nodefaultlibs_RELEASE libcmt) |
| @@ -87,7 +84,7 @@ foreach(_lib ${_nodefaultlibs_DEBUG}) | |||
| 87 | endforeach() | 84 | endforeach() |
| 88 | 85 | ||
| 89 | # DELAYLOAD option | 86 | # DELAYLOAD option |
| 90 | set(_delayloadlibs zlib.dll libmysql.dll libxslt.dll dnssd.dll dwmapi.dll sqlite3.dll | 87 | set(_delayloadlibs zlib.dll libmariadb.dll libxslt.dll dnssd.dll dwmapi.dll sqlite3.dll |
| 91 | d3dcompiler_47.dll) | 88 | d3dcompiler_47.dll) |
| 92 | foreach(_lib ${_delayloadlibs}) | 89 | foreach(_lib ${_delayloadlibs}) |
| 93 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /DELAYLOAD:\"${_lib}\"") | 90 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /DELAYLOAD:\"${_lib}\"") |
diff --git a/cmake/scripts/windowsstore/ArchSetup.cmake b/cmake/scripts/windowsstore/ArchSetup.cmake index 2e6d7cb..ad55a01 100644 --- a/cmake/scripts/windowsstore/ArchSetup.cmake +++ b/cmake/scripts/windowsstore/ArchSetup.cmake | |||
| @@ -53,8 +53,6 @@ list(APPEND CMAKE_PREFIX_PATH ${MINGW_LIBS_DIR}) | |||
| 53 | list(APPEND CMAKE_LIBRARY_PATH ${MINGW_LIBS_DIR}/bin) | 53 | list(APPEND CMAKE_LIBRARY_PATH ${MINGW_LIBS_DIR}/bin) |
| 54 | # dependencies | 54 | # dependencies |
| 55 | list(APPEND CMAKE_PREFIX_PATH ${DEPENDENCIES_DIR}) | 55 | list(APPEND CMAKE_PREFIX_PATH ${DEPENDENCIES_DIR}) |
| 56 | # for python | ||
| 57 | set(PYTHON_INCLUDE_DIR ${DEPENDENCIES_DIR}/include/python) | ||
| 58 | 56 | ||
| 59 | 57 | ||
| 60 | # -------- Compiler options --------- | 58 | # -------- Compiler options --------- |
| @@ -64,22 +62,24 @@ add_options(CXX ALL_BUILDS "/wd\"4146\"") | |||
| 64 | add_options(CXX ALL_BUILDS "/wd\"4251\"") | 62 | add_options(CXX ALL_BUILDS "/wd\"4251\"") |
| 65 | add_options(CXX ALL_BUILDS "/wd\"4668\"") | 63 | add_options(CXX ALL_BUILDS "/wd\"4668\"") |
| 66 | add_options(CXX ALL_BUILDS "/wd\"5033\"") | 64 | add_options(CXX ALL_BUILDS "/wd\"5033\"") |
| 67 | set(ARCH_DEFINES -D_WINDOWS -DTARGET_WINDOWS -DTARGET_WINDOWS_STORE -DXBMC_EXPORT -DMS_UWP) | 65 | set(ARCH_DEFINES -D_WINDOWS -DTARGET_WINDOWS -DTARGET_WINDOWS_STORE -DXBMC_EXPORT -DMS_UWP -DMS_STORE) |
| 68 | if(NOT SDK_TARGET_ARCH STREQUAL arm) | 66 | if(NOT SDK_TARGET_ARCH STREQUAL arm) |
| 69 | list(APPEND ARCH_DEFINES -D__SSE__ -D__SSE2__) | 67 | list(APPEND ARCH_DEFINES -D__SSE__ -D__SSE2__) |
| 70 | endif() | 68 | endif() |
| 71 | set(SYSTEM_DEFINES -DWIN32_LEAN_AND_MEAN -DNOMINMAX -DHAS_DX -D__STDC_CONSTANT_MACROS | 69 | set(SYSTEM_DEFINES -DWIN32_LEAN_AND_MEAN -DNOMINMAX -DHAS_DX -D__STDC_CONSTANT_MACROS |
| 72 | -DFMT_HEADER_ONLY -DTAGLIB_STATIC -DNPT_CONFIG_ENABLE_LOGGING | 70 | -DTAGLIB_STATIC -DNPT_CONFIG_ENABLE_LOGGING |
| 73 | -DPLT_HTTP_DEFAULT_USER_AGENT="UPnP/1.0 DLNADOC/1.50 Kodi" | 71 | -DPLT_HTTP_DEFAULT_USER_AGENT="UPnP/1.0 DLNADOC/1.50 Kodi" |
| 74 | -DPLT_HTTP_DEFAULT_SERVER="UPnP/1.0 DLNADOC/1.50 Kodi" | 72 | -DPLT_HTTP_DEFAULT_SERVER="UPnP/1.0 DLNADOC/1.50 Kodi" |
| 75 | -DUNICODE -D_UNICODE | 73 | -DUNICODE -D_UNICODE |
| 74 | -DFRIBIDI_STATIC | ||
| 76 | $<$<CONFIG:Debug>:-DD3D_DEBUG_INFO>) | 75 | $<$<CONFIG:Debug>:-DD3D_DEBUG_INFO>) |
| 77 | 76 | ||
| 78 | # Additional SYSTEM_DEFINES | 77 | # Additional SYSTEM_DEFINES |
| 79 | list(APPEND SYSTEM_DEFINES -DHAS_WIN10_NETWORK) | 78 | list(APPEND SYSTEM_DEFINES -DHAS_WIN10_NETWORK) |
| 80 | 79 | ||
| 81 | # The /MP option enables /FS by default. | 80 | # The /MP option enables /FS by default. |
| 82 | set(CMAKE_CXX_FLAGS "/MP ${CMAKE_CXX_FLAGS} /EHsc /await /std:c++latest") | 81 | set(CMAKE_CXX_FLAGS "/MP ${CMAKE_CXX_FLAGS} /EHsc /await") |
| 82 | set(CMAKE_CXX_STANDARD 17) | ||
| 83 | # Google Test needs to use shared version of runtime libraries | 83 | # Google Test needs to use shared version of runtime libraries |
| 84 | set(gtest_force_shared_crt ON CACHE STRING "" FORCE) | 84 | set(gtest_force_shared_crt ON CACHE STRING "" FORCE) |
| 85 | 85 | ||
| @@ -91,7 +91,8 @@ set(gtest_force_shared_crt ON CACHE STRING "" FORCE) | |||
| 91 | link_directories(${MINGW_LIBS_DIR}/lib | 91 | link_directories(${MINGW_LIBS_DIR}/lib |
| 92 | ${DEPENDENCIES_DIR}/lib) | 92 | ${DEPENDENCIES_DIR}/lib) |
| 93 | 93 | ||
| 94 | list(APPEND DEPLIBS bcrypt.lib d3d11.lib WS2_32.lib dxguid.lib dloadhelper.lib WindowsApp.lib) | 94 | list(APPEND DEPLIBS bcrypt.lib d3d11.lib WS2_32.lib dxguid.lib dloadhelper.lib WindowsApp.lib |
| 95 | Mfplat.lib Mfuuid.lib Strmiids.lib) | ||
| 95 | 96 | ||
| 96 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /WINMD:NO") | 97 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /WINMD:NO") |
| 97 | set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /NODEFAULTLIB:msvcrt /DEBUG:FASTLINK /OPT:NOREF /OPT:NOICF") | 98 | set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /NODEFAULTLIB:msvcrt /DEBUG:FASTLINK /OPT:NOREF /OPT:NOICF") |
diff --git a/cmake/scripts/windowsstore/Macros.cmake b/cmake/scripts/windowsstore/Macros.cmake index de89c62..c8cb960 100644 --- a/cmake/scripts/windowsstore/Macros.cmake +++ b/cmake/scripts/windowsstore/Macros.cmake | |||
| @@ -112,7 +112,7 @@ endmacro() | |||
| 112 | 112 | ||
| 113 | macro(winstore_append_props target) | 113 | macro(winstore_append_props target) |
| 114 | # exclude debug dlls from packaging | 114 | # exclude debug dlls from packaging |
| 115 | set(DEBUG_DLLS zlibd.dll freetyped.dll sqlite3d.dll) | 115 | set(DEBUG_DLLS zlibd.dll) |
| 116 | foreach(_dll ${DEBUG_DLLS}) | 116 | foreach(_dll ${DEBUG_DLLS}) |
| 117 | if (DEBUG_DLLS_EXCLUDE) | 117 | if (DEBUG_DLLS_EXCLUDE) |
| 118 | list(APPEND DEBUG_DLLS_EXCLUDE "\;$(BuildRootPath)/dlls/${_dll}") | 118 | list(APPEND DEBUG_DLLS_EXCLUDE "\;$(BuildRootPath)/dlls/${_dll}") |
diff --git a/cmake/treedata/android/subdirs.txt b/cmake/treedata/android/subdirs.txt index 335c331..0c4cf88 100644 --- a/cmake/treedata/android/subdirs.txt +++ b/cmake/treedata/android/subdirs.txt | |||
| @@ -3,6 +3,7 @@ xbmc/cores/VideoPlayer/Process/android cores/VideoPlayer/Process/android | |||
| 3 | xbmc/input/touch input/touch | 3 | xbmc/input/touch input/touch |
| 4 | xbmc/input/touch/generic input/touch/generic | 4 | xbmc/input/touch/generic input/touch/generic |
| 5 | xbmc/media/decoderfilter media/decoderfilter | 5 | xbmc/media/decoderfilter media/decoderfilter |
| 6 | xbmc/platform/android platform/android | ||
| 6 | xbmc/platform/android/activity platform/android/activity | 7 | xbmc/platform/android/activity platform/android/activity |
| 7 | xbmc/platform/android/bionic_supplement platform/android/bionicsupplement | 8 | xbmc/platform/android/bionic_supplement platform/android/bionicsupplement |
| 8 | xbmc/platform/android/filesystem platform/android/filesystem | 9 | xbmc/platform/android/filesystem platform/android/filesystem |
| @@ -12,7 +13,7 @@ xbmc/platform/android/network platform/android/network | |||
| 12 | xbmc/platform/android/peripherals platform/android/peripherals | 13 | xbmc/platform/android/peripherals platform/android/peripherals |
| 13 | xbmc/platform/android/powermanagement platform/android/powermanagement | 14 | xbmc/platform/android/powermanagement platform/android/powermanagement |
| 14 | xbmc/platform/android/storage platform/android/storage | 15 | xbmc/platform/android/storage platform/android/storage |
| 15 | xbmc/platform/linux platform/linux | 16 | xbmc/platform/android/utils platform/android/utils |
| 16 | xbmc/platform/linux/peripherals platform/linux/peripherals | 17 | xbmc/platform/linux/peripherals platform/linux/peripherals |
| 17 | xbmc/platform/posix platform/posix | 18 | xbmc/platform/posix platform/posix |
| 18 | xbmc/platform/posix/filesystem platform/posix/filesystem | 19 | xbmc/platform/posix/filesystem platform/posix/filesystem |
diff --git a/cmake/treedata/common/gbm/gbm.txt b/cmake/treedata/common/gbm/gbm.txt new file mode 100644 index 0000000..113c47b --- /dev/null +++ b/cmake/treedata/common/gbm/gbm.txt | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | xbmc/cores/RetroPlayer/process/gbm cores/RetroPlayer/process/gbm | ||
| 2 | xbmc/cores/VideoPlayer/Process/gbm cores/VideoPlayer/Process/gbm | ||
| 3 | xbmc/windowing/gbm windowing/gbm | ||
diff --git a/cmake/treedata/common/pvr.txt b/cmake/treedata/common/pvr.txt index decdabb..74e766f 100644 --- a/cmake/treedata/common/pvr.txt +++ b/cmake/treedata/common/pvr.txt | |||
| @@ -1,8 +1,12 @@ | |||
| 1 | xbmc/pvr pvr | 1 | xbmc/pvr pvr |
| 2 | xbmc/pvr/addons pvr/addons | 2 | xbmc/pvr/addons pvr/addons |
| 3 | xbmc/pvr/channels pvr/channels | 3 | xbmc/pvr/channels pvr/channels |
| 4 | xbmc/pvr/dialogs pvr/dialogs | 4 | xbmc/pvr/dialogs pvr/dialogs |
| 5 | xbmc/pvr/epg pvr/epg | 5 | xbmc/pvr/epg pvr/epg |
| 6 | xbmc/pvr/recordings pvr/recordings | 6 | xbmc/pvr/filesystem pvr/filesystem |
| 7 | xbmc/pvr/timers pvr/timers | 7 | xbmc/pvr/guilib pvr/guilib |
| 8 | xbmc/pvr/windows pvr/windows | 8 | xbmc/pvr/guilib/guiinfo pvr/guilib/guiinfo |
| 9 | xbmc/pvr/recordings pvr/recordings | ||
| 10 | xbmc/pvr/settings pvr/settings | ||
| 11 | xbmc/pvr/timers pvr/timers | ||
| 12 | xbmc/pvr/windows pvr/windows | ||
diff --git a/cmake/treedata/common/rbpi/rbpi.txt b/cmake/treedata/common/rbpi/rbpi.txt new file mode 100644 index 0000000..dc268e7 --- /dev/null +++ b/cmake/treedata/common/rbpi/rbpi.txt | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | xbmc/cores/omxplayer cores/omxplayer | ||
| 2 | xbmc/windowing/rpi windowing/rpi | ||
diff --git a/cmake/treedata/common/subdirs.txt b/cmake/treedata/common/subdirs.txt index 083e8ef..8131113 100644 --- a/cmake/treedata/common/subdirs.txt +++ b/cmake/treedata/common/subdirs.txt | |||
| @@ -1,16 +1,21 @@ | |||
| 1 | xbmc xbmc | 1 | xbmc xbmc |
| 2 | xbmc/addons addons | 2 | xbmc/addons addons |
| 3 | xbmc/addons/addoninfo addons_addoninfo | ||
| 3 | xbmc/addons/binary-addons addons_binary-addons | 4 | xbmc/addons/binary-addons addons_binary-addons |
| 4 | xbmc/addons/interfaces addons_interfaces | 5 | xbmc/addons/interfaces addons_interfaces |
| 5 | xbmc/addons/interfaces/Addon addons_interfaces_addon | 6 | xbmc/addons/interfaces/gui addons_interfaces_gui |
| 6 | xbmc/addons/interfaces/GUI addons_interfaces_gui | 7 | xbmc/addons/interfaces/gui/controls addons_interfaces_gui_controls |
| 7 | xbmc/addons/interfaces/GUI/controls addons_interfaces_gui_controls | 8 | xbmc/addons/interfaces/gui/dialogs addons_interfaces_gui_dialogs |
| 8 | xbmc/addons/interfaces/GUI/dialogs addons_interfaces_gui_dialogs | ||
| 9 | xbmc/addons/kodi-addon-dev-kit/include/kodi addons_kodi-addon-dev-kit_include_kodi | 9 | xbmc/addons/kodi-addon-dev-kit/include/kodi addons_kodi-addon-dev-kit_include_kodi |
| 10 | xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance addons_kodi-addon-dev-kit_include_kodi_addon-instance | 10 | xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance addons_kodi-addon-dev-kit_include_kodi_addon-instance |
| 11 | xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/pvr addons_kodi-addon-dev-kit_include_kodi_addon-instance_pvr | ||
| 12 | xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api addons_kodi-addon-dev-kit_include_kodi_c-api | ||
| 13 | xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/addon-instance addons_kodi-addon-dev-kit_include_kodi_c-api_addon-instance | ||
| 14 | xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/addon-instance/pvr addons_kodi-addon-dev-kit_include_kodi_c-api_addon-instance_pvr | ||
| 11 | xbmc/addons/kodi-addon-dev-kit/include/kodi/gui addons_kodi-addon-dev-kit_include_kodi_gui | 15 | xbmc/addons/kodi-addon-dev-kit/include/kodi/gui addons_kodi-addon-dev-kit_include_kodi_gui |
| 12 | xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls addons_kodi-addon-dev-kit_include_kodi_gui_controls | 16 | xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls addons_kodi-addon-dev-kit_include_kodi_gui_controls |
| 13 | xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs addons_kodi-addon-dev-kit_include_kodi_gui_dialogs | 17 | xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs addons_kodi-addon-dev-kit_include_kodi_gui_dialogs |
| 18 | xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/gl addons_kodi-addon-dev-kit_include_kodi_gui_gl | ||
| 14 | xbmc/addons/kodi-addon-dev-kit/include/kodi/tools addons_kodi-addon-dev-kit_include_kodi_tools | 19 | xbmc/addons/kodi-addon-dev-kit/include/kodi/tools addons_kodi-addon-dev-kit_include_kodi_tools |
| 15 | xbmc/addons/settings addons_settings | 20 | xbmc/addons/settings addons_settings |
| 16 | xbmc/commons commons | 21 | xbmc/commons commons |
diff --git a/cmake/treedata/common/tests.txt b/cmake/treedata/common/tests.txt index 415eae6..9573812 100644 --- a/cmake/treedata/common/tests.txt +++ b/cmake/treedata/common/tests.txt | |||
| @@ -5,6 +5,7 @@ xbmc/interfaces/python/test test/python | |||
| 5 | xbmc/music/tags/test test/music_tags | 5 | xbmc/music/tags/test test/music_tags |
| 6 | xbmc/network/test test/network | 6 | xbmc/network/test test/network |
| 7 | xbmc/playlists/test test/playlists | 7 | xbmc/playlists/test test/playlists |
| 8 | xbmc/pvr/channels/test test/pvrchannels | ||
| 8 | xbmc/test test | 9 | xbmc/test test |
| 9 | xbmc/threads/test test/threads | 10 | xbmc/threads/test test/threads |
| 10 | xbmc/utils/test test/utils | 11 | xbmc/utils/test test/utils |
diff --git a/cmake/treedata/common/videoplayer.txt b/cmake/treedata/common/videoplayer.txt index ce6a757..8110f08 100644 --- a/cmake/treedata/common/videoplayer.txt +++ b/cmake/treedata/common/videoplayer.txt | |||
| @@ -1,4 +1,5 @@ | |||
| 1 | xbmc/cores/VideoPlayer cores/VideoPlayer | 1 | xbmc/cores/VideoPlayer cores/VideoPlayer |
| 2 | xbmc/cores/VideoPlayer/Buffers cores/VideoPlayer/Buffers | ||
| 2 | xbmc/cores/VideoPlayer/DVDCodecs cores/VideoPlayer/codecs | 3 | xbmc/cores/VideoPlayer/DVDCodecs cores/VideoPlayer/codecs |
| 3 | xbmc/cores/VideoPlayer/DVDCodecs/Audio cores/VideoPlayer/codecs/audio | 4 | xbmc/cores/VideoPlayer/DVDCodecs/Audio cores/VideoPlayer/codecs/audio |
| 4 | xbmc/cores/VideoPlayer/DVDCodecs/Overlay cores/VideoPlayer/codecs/overlay | 5 | xbmc/cores/VideoPlayer/DVDCodecs/Overlay cores/VideoPlayer/codecs/overlay |
diff --git a/cmake/treedata/optional/common/wayland.txt b/cmake/treedata/common/wayland/wayland.txt index f8f77a6..bbbb14e 100644 --- a/cmake/treedata/optional/common/wayland.txt +++ b/cmake/treedata/common/wayland/wayland.txt | |||
| @@ -1,3 +1,3 @@ | |||
| 1 | xbmc/cores/RetroPlayer/process/wayland cores/RetroPlayer/process/wayland # WAYLANDPP | 1 | xbmc/cores/RetroPlayer/process/wayland cores/RetroPlayer/process/wayland |
| 2 | xbmc/cores/VideoPlayer/Process/wayland cores/VideoPlayer/Process/wayland # WAYLANDPP | 2 | xbmc/cores/VideoPlayer/Process/wayland cores/VideoPlayer/Process/wayland |
| 3 | xbmc/windowing/wayland windowing/wayland # WAYLANDPP | 3 | xbmc/windowing/wayland windowing/wayland |
diff --git a/cmake/treedata/optional/common/X.txt b/cmake/treedata/common/x11/X.txt index a250537..548c9dd 100644 --- a/cmake/treedata/optional/common/X.txt +++ b/cmake/treedata/common/x11/X.txt | |||
| @@ -1,3 +1,3 @@ | |||
| 1 | xbmc/cores/RetroPlayer/process/X11 cores/RetroPlayer/process/X11 # X | 1 | xbmc/cores/RetroPlayer/process/X11 cores/RetroPlayer/process/X11 |
| 2 | xbmc/cores/VideoPlayer/Process/X11 cores/VideoPlayer/Process/X11 # X | 2 | xbmc/cores/VideoPlayer/Process/X11 cores/VideoPlayer/Process/X11 |
| 3 | xbmc/windowing/X11 windowing/X11 # X | 3 | xbmc/windowing/X11 windowing/X11 |
diff --git a/cmake/treedata/darwin_embedded/ios/ios.txt b/cmake/treedata/darwin_embedded/ios/ios.txt new file mode 100644 index 0000000..f5d13e3 --- /dev/null +++ b/cmake/treedata/darwin_embedded/ios/ios.txt | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | xbmc/platform/darwin/ios platform/ios | ||
| 2 | xbmc/windowing/ios windowing/ios | ||
diff --git a/cmake/treedata/ios/subdirs.txt b/cmake/treedata/darwin_embedded/subdirs.txt index a3a03be..718c5c5 100644 --- a/cmake/treedata/ios/subdirs.txt +++ b/cmake/treedata/darwin_embedded/subdirs.txt | |||
| @@ -3,13 +3,12 @@ xbmc/cores/VideoPlayer/Process/ios cores/VideoPlayer/Process/ios | |||
| 3 | xbmc/input/touch input/touch | 3 | xbmc/input/touch input/touch |
| 4 | xbmc/input/touch/generic input/touch/generic | 4 | xbmc/input/touch/generic input/touch/generic |
| 5 | xbmc/platform/darwin platform/darwin | 5 | xbmc/platform/darwin platform/darwin |
| 6 | xbmc/platform/darwin/ios platform/ios | ||
| 7 | xbmc/platform/darwin/ios-common platform/ios-common | 6 | xbmc/platform/darwin/ios-common platform/ios-common |
| 7 | xbmc/platform/darwin/ios-common/network platform/ios-common/network | ||
| 8 | xbmc/platform/darwin/ios-common/peripherals platform/ios-common/peripherals | ||
| 9 | xbmc/platform/darwin/ios-common/storage platform/ios-common/storage | ||
| 8 | xbmc/platform/darwin/network platform/darwin/network | 10 | xbmc/platform/darwin/network platform/darwin/network |
| 9 | xbmc/platform/darwin/storage platform/storage | 11 | xbmc/platform/darwin/utils platform/darwin/utils |
| 10 | xbmc/platform/linux platform/linux | ||
| 11 | xbmc/platform/linux/network platform/linux/network | ||
| 12 | xbmc/platform/posix posix | 12 | xbmc/platform/posix posix |
| 13 | xbmc/platform/posix/filesystem platform/posix/filesystem | 13 | xbmc/platform/posix/filesystem platform/posix/filesystem |
| 14 | xbmc/platform/posix/utils platform/posix/utils | 14 | xbmc/platform/posix/utils platform/posix/utils |
| 15 | xbmc/windowing/ios windowing/ios | ||
diff --git a/cmake/treedata/darwin_embedded/tvos/tvos.txt b/cmake/treedata/darwin_embedded/tvos/tvos.txt new file mode 100755 index 0000000..1335e66 --- /dev/null +++ b/cmake/treedata/darwin_embedded/tvos/tvos.txt | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | xbmc/platform/darwin/tvos platform/tvos | ||
| 2 | xbmc/platform/darwin/tvos/filesystem platform/darwin/tvos/filesystem | ||
| 3 | xbmc/platform/darwin/tvos/input platform/darwin/tvos/input | ||
| 4 | xbmc/platform/darwin/tvos/powermanagement platform/darwin/tvos/powermanagement | ||
| 5 | xbmc/windowing/tvos windowing/tvos | ||
diff --git a/cmake/treedata/freebsd/subdirs.txt b/cmake/treedata/freebsd/subdirs.txt index fd8ed5f..79e3462 100644 --- a/cmake/treedata/freebsd/subdirs.txt +++ b/cmake/treedata/freebsd/subdirs.txt | |||
| @@ -3,13 +3,14 @@ xbmc/cores/VideoPlayer/Process/rbpi cores/VideoPlayer/Process/rbpi | |||
| 3 | xbmc/input/touch input/touch | 3 | xbmc/input/touch input/touch |
| 4 | xbmc/input/touch/generic input/touch/generic | 4 | xbmc/input/touch/generic input/touch/generic |
| 5 | xbmc/platform/freebsd platform/freebsd | 5 | xbmc/platform/freebsd platform/freebsd |
| 6 | xbmc/platform/linux platform/linux | 6 | xbmc/platform/freebsd/network platform/freebsd/network |
| 7 | xbmc/platform/linux/input platform/linux/input | 7 | xbmc/platform/linux/input platform/linux/input |
| 8 | xbmc/platform/linux/network platform/linux/network | ||
| 9 | xbmc/platform/linux/peripherals platform/linux/peripherals | 8 | xbmc/platform/linux/peripherals platform/linux/peripherals |
| 10 | xbmc/platform/linux/powermanagement platform/linux/powermanagement | 9 | xbmc/platform/linux/powermanagement platform/linux/powermanagement |
| 10 | xbmc/platform/linux/sse4 platform/linux/sse4 | ||
| 11 | xbmc/platform/linux/storage platform/linux/storage | 11 | xbmc/platform/linux/storage platform/linux/storage |
| 12 | xbmc/platform/posix platform/posix | 12 | xbmc/platform/posix platform/posix |
| 13 | xbmc/platform/posix/filesystem platform/posix/filesystem | 13 | xbmc/platform/posix/filesystem platform/posix/filesystem |
| 14 | xbmc/platform/posix/network platform/posix/network | ||
| 14 | xbmc/platform/posix/utils platform/posix/utils | 15 | xbmc/platform/posix/utils platform/posix/utils |
| 15 | xbmc/windowing/linux windowing/linux | 16 | xbmc/windowing/linux windowing/linux |
diff --git a/cmake/treedata/linux/subdirs.txt b/cmake/treedata/linux/subdirs.txt index 7619e2e..51a7cbd 100644 --- a/cmake/treedata/linux/subdirs.txt +++ b/cmake/treedata/linux/subdirs.txt | |||
| @@ -7,8 +7,10 @@ xbmc/platform/linux/input platform/linux/input | |||
| 7 | xbmc/platform/linux/network platform/linux/network | 7 | xbmc/platform/linux/network platform/linux/network |
| 8 | xbmc/platform/linux/peripherals platform/linux/peripherals | 8 | xbmc/platform/linux/peripherals platform/linux/peripherals |
| 9 | xbmc/platform/linux/powermanagement platform/linux/powermanagement | 9 | xbmc/platform/linux/powermanagement platform/linux/powermanagement |
| 10 | xbmc/platform/linux/sse4 platform/linux/sse4 | ||
| 10 | xbmc/platform/linux/storage platform/linux/storage | 11 | xbmc/platform/linux/storage platform/linux/storage |
| 11 | xbmc/platform/posix platform/posix | 12 | xbmc/platform/posix platform/posix |
| 12 | xbmc/platform/posix/filesystem platform/posix/filesystem | 13 | xbmc/platform/posix/filesystem platform/posix/filesystem |
| 14 | xbmc/platform/posix/network platform/posix/network | ||
| 13 | xbmc/platform/posix/utils platform/posix/utils | 15 | xbmc/platform/posix/utils platform/posix/utils |
| 14 | xbmc/windowing/linux windowing/linux | 16 | xbmc/windowing/linux windowing/linux |
diff --git a/cmake/treedata/linux/tests.txt b/cmake/treedata/linux/tests.txt new file mode 100644 index 0000000..3f3a3e3 --- /dev/null +++ b/cmake/treedata/linux/tests.txt | |||
| @@ -0,0 +1 @@ | |||
| xbmc/platform/linux/test platform/linux/test | |||
diff --git a/cmake/treedata/optional/common/aml.txt b/cmake/treedata/optional/common/aml.txt deleted file mode 100644 index 09bf2db..0000000 --- a/cmake/treedata/optional/common/aml.txt +++ /dev/null | |||
| @@ -1,2 +0,0 @@ | |||
| 1 | xbmc/cores/RetroPlayer/process/amlogic cores/RetroPlayer/process/amlogic # AML | ||
| 2 | xbmc/windowing/amlogic windowing/amlogic # AML | ||
diff --git a/cmake/treedata/optional/common/avahi.txt b/cmake/treedata/optional/common/avahi.txt new file mode 100644 index 0000000..41b82b9 --- /dev/null +++ b/cmake/treedata/optional/common/avahi.txt | |||
| @@ -0,0 +1 @@ | |||
| xbmc/platform/linux/network/zeroconf platform/linux/network/zeroconf # AVAHI | |||
diff --git a/cmake/treedata/optional/common/gbm.txt b/cmake/treedata/optional/common/gbm.txt deleted file mode 100644 index 5d898d4..0000000 --- a/cmake/treedata/optional/common/gbm.txt +++ /dev/null | |||
| @@ -1,2 +0,0 @@ | |||
| 1 | xbmc/cores/RetroPlayer/process/gbm cores/RetroPlayer/process/gbm # GBM | ||
| 2 | xbmc/windowing/gbm windowing/gbm # GBM | ||
diff --git a/cmake/treedata/osx/subdirs.txt b/cmake/treedata/osx/subdirs.txt index 943c366..fa28aa0 100644 --- a/cmake/treedata/osx/subdirs.txt +++ b/cmake/treedata/osx/subdirs.txt | |||
| @@ -3,12 +3,13 @@ xbmc/cores/VideoPlayer/Process/osx cores/VideoPlayer/Process/osx | |||
| 3 | xbmc/platform/darwin platform/darwin | 3 | xbmc/platform/darwin platform/darwin |
| 4 | xbmc/platform/darwin/network platform/darwin/network | 4 | xbmc/platform/darwin/network platform/darwin/network |
| 5 | xbmc/platform/darwin/osx platform/osx | 5 | xbmc/platform/darwin/osx platform/osx |
| 6 | xbmc/platform/darwin/osx/network platform/darwin/osx/network | ||
| 6 | xbmc/platform/darwin/osx/peripherals platform/osx/peripherals | 7 | xbmc/platform/darwin/osx/peripherals platform/osx/peripherals |
| 7 | xbmc/platform/darwin/osx/powermanagement platform/darwin/osx/powermanagement | 8 | xbmc/platform/darwin/osx/powermanagement platform/darwin/osx/powermanagement |
| 8 | xbmc/platform/darwin/storage platform/storage | 9 | xbmc/platform/darwin/osx/storage platform/osx/storage |
| 9 | xbmc/platform/linux platform/linux | 10 | xbmc/platform/darwin/utils platform/darwin/utils |
| 10 | xbmc/platform/linux/network platform/linux/network | ||
| 11 | xbmc/platform/posix posix | 11 | xbmc/platform/posix posix |
| 12 | xbmc/platform/posix/filesystem platform/posix/filesystem | 12 | xbmc/platform/posix/filesystem platform/posix/filesystem |
| 13 | xbmc/platform/posix/network platform/posix/network | ||
| 13 | xbmc/platform/posix/utils platform/posix/utils | 14 | xbmc/platform/posix/utils platform/posix/utils |
| 14 | xbmc/windowing/osx windowing/osx | 15 | xbmc/windowing/osx windowing/osx |
diff --git a/cmake/treedata/windows/subdirs.txt b/cmake/treedata/windows/subdirs.txt index 0078758..c633977 100644 --- a/cmake/treedata/windows/subdirs.txt +++ b/cmake/treedata/windows/subdirs.txt | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | xbmc/cores/RetroPlayer/process/windows cores/RetroPlayer/process/windows | 1 | xbmc/cores/RetroPlayer/process/windows cores/RetroPlayer/process/windows |
| 2 | xbmc/cores/RetroPlayer/rendering/VideoShaders/windows cores/RetroPlayer/rendering/VideoShaders/windows | 2 | xbmc/cores/RetroPlayer/rendering/VideoShaders/windows cores/RetroPlayer/rendering/VideoShaders/windows |
| 3 | xbmc/cores/VideoPlayer/Process/windows cores/VideoPlayer/Process/windows | 3 | xbmc/cores/VideoPlayer/Process/windows cores/VideoPlayer/Process/windows |
| 4 | xbmc/cores/VideoPlayer/VideoRenderers/windows cores/VideoPlayer/VideoRenderers/windows | ||
| 4 | xbmc/input/touch input/touch | 5 | xbmc/input/touch input/touch |
| 5 | xbmc/input/touch/generic input/touch/generic | 6 | xbmc/input/touch/generic input/touch/generic |
| 6 | xbmc/network/mdns network/mdns | 7 | xbmc/network/mdns network/mdns |
diff --git a/cmake/treedata/windowsstore/subdirs.txt b/cmake/treedata/windowsstore/subdirs.txt index 0644fd2..da42566 100644 --- a/cmake/treedata/windowsstore/subdirs.txt +++ b/cmake/treedata/windowsstore/subdirs.txt | |||
| @@ -1,4 +1,5 @@ | |||
| 1 | xbmc/cores/VideoPlayer/Process/windows cores/VideoPlayer/Process/windows | 1 | xbmc/cores/VideoPlayer/Process/windows cores/VideoPlayer/Process/windows |
| 2 | xbmc/cores/VideoPlayer/VideoRenderers/windows cores/VideoPlayer/VideoRenderers/windows | ||
| 2 | xbmc/input/touch input/touch | 3 | xbmc/input/touch input/touch |
| 3 | xbmc/input/touch/generic input/touch/generic | 4 | xbmc/input/touch/generic input/touch/generic |
| 4 | xbmc/network/mdns network/mdns | 5 | xbmc/network/mdns network/mdns |
