diff options
| author | manuel <manuel@mausz.at> | 2018-01-01 13:40:09 +0100 |
|---|---|---|
| committer | manuel <manuel@mausz.at> | 2018-01-01 13:40:09 +0100 |
| commit | 4830f27a40323fe859dc166337a2b861877b7121 (patch) | |
| tree | 39e9f712a5415ec0026c3914f4bf600b2f679287 /cmake | |
| parent | 0afb1d4d51973cf52973617c92236d851a039d31 (diff) | |
| download | kodi-pvr-build-4830f27a40323fe859dc166337a2b861877b7121.tar.gz kodi-pvr-build-4830f27a40323fe859dc166337a2b861877b7121.tar.bz2 kodi-pvr-build-4830f27a40323fe859dc166337a2b861877b7121.zip | |
sync with upstream
Diffstat (limited to 'cmake')
93 files changed, 1274 insertions, 377 deletions
diff --git a/cmake/README.md b/cmake/README.md index 81c0517..0848f2d 100644 --- a/cmake/README.md +++ b/cmake/README.md | |||
| @@ -119,12 +119,30 @@ cmake -G "Visual Studio 14" <KODI_SRC> | |||
| 119 | cmake --build . --config "Debug" # or: Build solution with Visual Studio | 119 | cmake --build . --config "Debug" # or: Build solution with Visual Studio |
| 120 | Debug\kodi.exe | 120 | Debug\kodi.exe |
| 121 | ``` | 121 | ``` |
| 122 | |||
| 123 | Building on a x64 cpu can be improved, if you're on a cmake version > 3.8: | ||
| 124 | ``` | ||
| 125 | cmake -G "Visual Studio 14" -T host=x64 <KODI_SRC> | ||
| 126 | cmake --build . --config "Debug" # or: Build solution with Visual Studio | ||
| 127 | Debug\kodi.exe | ||
| 128 | ``` | ||
| 129 | This will choose the x64 toolset, as windows uses the x32 toolset by default. | ||
| 130 | |||
| 122 | #### Build for x64 | 131 | #### Build for x64 |
| 123 | ``` | 132 | ``` |
| 124 | cmake -G "Visual Studio 14 Win64" <KODI_SRC> | 133 | cmake -G "Visual Studio 14 Win64" <KODI_SRC> |
| 125 | cmake --build . --config "Debug" # or: Build solution with Visual Studio | 134 | cmake --build . --config "Debug" # or: Build solution with Visual Studio |
| 126 | Debug\kodi.exe | 135 | Debug\kodi.exe |
| 127 | ``` | 136 | ``` |
| 137 | |||
| 138 | Building on a x64 cpu can be improved, if you're on a cmake version > 3.8: | ||
| 139 | ``` | ||
| 140 | cmake -G "Visual Studio 14 Win64" -T host=x64 <KODI_SRC> | ||
| 141 | cmake --build . --config "Debug" # or: Build solution with Visual Studio | ||
| 142 | Debug\kodi.exe | ||
| 143 | ``` | ||
| 144 | This will choose the x64 toolset, as windows uses the x32 toolset by default. | ||
| 145 | |||
| 128 | You can always check ``cmake --help` to see which generators are available and how to call those. | 146 | You can always check ``cmake --help` to see which generators are available and how to call those. |
| 129 | 147 | ||
| 130 | #### Windows installer generation | 148 | #### Windows installer generation |
diff --git a/cmake/addons/CMakeLists.txt b/cmake/addons/CMakeLists.txt index a6ea149..fd1d448 100644 --- a/cmake/addons/CMakeLists.txt +++ b/cmake/addons/CMakeLists.txt | |||
| @@ -75,6 +75,11 @@ if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT OR NOT CMAKE_INSTALL_PREFIX) | |||
| 75 | endif() | 75 | endif() |
| 76 | list(APPEND CMAKE_PREFIX_PATH ${CMAKE_INSTALL_PREFIX}) | 76 | list(APPEND CMAKE_PREFIX_PATH ${CMAKE_INSTALL_PREFIX}) |
| 77 | 77 | ||
| 78 | if (CMAKE_SYSTEM_NAME STREQUAL WindowsStore) | ||
| 79 | set(BUILD_ARGS_ext -DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME} | ||
| 80 | -DCMAKE_SYSTEM_VERSION=${CMAKE_SYSTEM_VERSION}) | ||
| 81 | endif() | ||
| 82 | |||
| 78 | set(BUILD_ARGS -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} | 83 | set(BUILD_ARGS -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} |
| 79 | -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> | 84 | -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> |
| 80 | -DPACKAGE_CONFIG_PATH=${ADDON_DEPENDS_PATH}/lib/pkgconfig | 85 | -DPACKAGE_CONFIG_PATH=${ADDON_DEPENDS_PATH}/lib/pkgconfig |
| @@ -86,7 +91,8 @@ set(BUILD_ARGS -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} | |||
| 86 | -DCORE_SYSTEM_NAME=${CORE_SYSTEM_NAME} | 91 | -DCORE_SYSTEM_NAME=${CORE_SYSTEM_NAME} |
| 87 | -DBUILD_SHARED_LIBS=1 | 92 | -DBUILD_SHARED_LIBS=1 |
| 88 | -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} | 93 | -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} |
| 89 | -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}) | 94 | -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS} |
| 95 | ${BUILD_ARGS_ext}) | ||
| 90 | 96 | ||
| 91 | if(MSVC) | 97 | if(MSVC) |
| 92 | # move cmake specific targets to a CMakePredefinedTargets folder in Visual Studio | 98 | # move cmake specific targets to a CMakePredefinedTargets folder in Visual Studio |
diff --git a/cmake/addons/depends/windowsstore/CMakeLists.txt b/cmake/addons/depends/windowsstore/CMakeLists.txt new file mode 100644 index 0000000..c8739c0 --- /dev/null +++ b/cmake/addons/depends/windowsstore/CMakeLists.txt | |||
| @@ -0,0 +1,52 @@ | |||
| 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 new file mode 100644 index 0000000..9a3adbb --- /dev/null +++ b/cmake/addons/depends/windowsstore/Install.cmake | |||
| @@ -0,0 +1,24 @@ | |||
| 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 new file mode 100644 index 0000000..67dc594 --- /dev/null +++ b/cmake/addons/depends/windowsstore/README | |||
| @@ -0,0 +1,19 @@ | |||
| 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 new file mode 100644 index 0000000..db6f782 --- /dev/null +++ b/cmake/addons/depends/windowsstore/p8-platform/p8-platform.txt | |||
| @@ -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 new file mode 100644 index 0000000..a0c70d6 --- /dev/null +++ b/cmake/addons/depends/windowsstore/prebuilt/README | |||
| @@ -0,0 +1,21 @@ | |||
| 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/installdata/windows/addons.txt b/cmake/installdata/windows/addons.txt index 92bf9b3..a3bdd44 100644 --- a/cmake/installdata/windows/addons.txt +++ b/cmake/installdata/windows/addons.txt | |||
| @@ -1 +1,3 @@ | |||
| 1 | addons/repository.pvr-win32.xbmc.org/* | 1 | addons/repository.pvr-win32.xbmc.org/* |
| 2 | project/BuildDependencies/${ARCH}/addons/script.module.pil KEEP_DIR_STRUCTURE addons | ||
| 3 | project/BuildDependencies/${ARCH}/addons/script.module.pycryptodome KEEP_DIR_STRUCTURE addons | ||
diff --git a/cmake/installdata/windows/dlls.txt b/cmake/installdata/windows/dlls.txt index 25c6500..c17bd76 100644 --- a/cmake/installdata/windows/dlls.txt +++ b/cmake/installdata/windows/dlls.txt | |||
| @@ -1,4 +1,3 @@ | |||
| 1 | system/*.dll . | ||
| 2 | project/BuildDependencies/${ARCH}/bin/libbluray*.jar . | 1 | project/BuildDependencies/${ARCH}/bin/libbluray*.jar . |
| 3 | project/BuildDependencies/${ARCH}/bin/*.dll . | 2 | project/BuildDependencies/${ARCH}/bin/*.dll . |
| 4 | project/BuildDependencies/mingwlibs/${ARCH}/bin/*.dll . | 3 | project/BuildDependencies/mingwlibs/${ARCH}/bin/*.dll . |
diff --git a/cmake/installdata/windowsstore/addons.txt b/cmake/installdata/windowsstore/addons.txt new file mode 100644 index 0000000..4b8678b --- /dev/null +++ b/cmake/installdata/windowsstore/addons.txt | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | addons/repository.pvr-win32.xbmc.org/* | ||
| 2 | project/BuildDependencies/win10-${ARCH}/addons/* | ||
| 3 | system/addon-manifest-uwp.xml \ No newline at end of file | ||
diff --git a/cmake/installdata/windowsstore/dlls.txt b/cmake/installdata/windowsstore/dlls.txt new file mode 100644 index 0000000..a927b3d --- /dev/null +++ b/cmake/installdata/windowsstore/dlls.txt | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | project/BuildDependencies/win10-${ARCH}/bin/*.dll dlls | ||
| 2 | project/BuildDependencies/mingwlibs/win10-${ARCH}/bin/*.dll dlls | ||
diff --git a/cmake/installdata/windowsstore/irss.txt b/cmake/installdata/windowsstore/irss.txt new file mode 100644 index 0000000..6fd8d48 --- /dev/null +++ b/cmake/installdata/windowsstore/irss.txt | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | system/IRSSmap.xml | ||
| 2 | system/X10-Lola-IRSSmap.xml | ||
diff --git a/cmake/installdata/windowsstore/python.txt b/cmake/installdata/windowsstore/python.txt new file mode 100644 index 0000000..db57ebc --- /dev/null +++ b/cmake/installdata/windowsstore/python.txt | |||
| @@ -0,0 +1 @@ | |||
| project/BuildDependencies/win10-${ARCH}/bin/Python KEEP_DIR_STRUCTURE system \ No newline at end of file | |||
diff --git a/cmake/modules/FindAlsa.cmake b/cmake/modules/FindAlsa.cmake index c99f509..bed4faa 100644 --- a/cmake/modules/FindAlsa.cmake +++ b/cmake/modules/FindAlsa.cmake | |||
| @@ -33,7 +33,7 @@ find_package_handle_standard_args(Alsa | |||
| 33 | if(ALSA_FOUND) | 33 | if(ALSA_FOUND) |
| 34 | set(ALSA_INCLUDE_DIRS "") # Don't want these added as 'timer.h' is a dangerous file | 34 | set(ALSA_INCLUDE_DIRS "") # Don't want these added as 'timer.h' is a dangerous file |
| 35 | set(ALSA_LIBRARIES ${ALSA_LIBRARY}) | 35 | set(ALSA_LIBRARIES ${ALSA_LIBRARY}) |
| 36 | set(ALSA_DEFINITIONS -DHAVE_ALSA=1 -DUSE_ALSA=1) | 36 | set(ALSA_DEFINITIONS -DHAS_ALSA=1) |
| 37 | 37 | ||
| 38 | if(NOT TARGET ALSA::ALSA) | 38 | if(NOT TARGET ALSA::ALSA) |
| 39 | add_library(ALSA::ALSA UNKNOWN IMPORTED) | 39 | add_library(ALSA::ALSA UNKNOWN IMPORTED) |
diff --git a/cmake/modules/FindAvahi.cmake b/cmake/modules/FindAvahi.cmake index 77c3e4d..068b292 100644 --- a/cmake/modules/FindAvahi.cmake +++ b/cmake/modules/FindAvahi.cmake | |||
| @@ -40,21 +40,21 @@ if(AVAHI_FOUND) | |||
| 40 | ${AVAHI_COMMON_INCLUDE_DIR}) | 40 | ${AVAHI_COMMON_INCLUDE_DIR}) |
| 41 | set(AVAHI_LIBRARIES ${AVAHI_CLIENT_LIBRARY} | 41 | set(AVAHI_LIBRARIES ${AVAHI_CLIENT_LIBRARY} |
| 42 | ${AVAHI_COMMON_LIBRARY}) | 42 | ${AVAHI_COMMON_LIBRARY}) |
| 43 | set(AVAHI_DEFINITIONS -DHAVE_LIBAVAHI_CLIENT=1 -DHAVE_LIBAVAHI_COMMON=1) | 43 | set(AVAHI_DEFINITIONS -DHAS_AVAHI=1 -DHAS_ZEROCONF=1) |
| 44 | 44 | ||
| 45 | if(NOT TARGET Avahi::Avahi) | 45 | if(NOT TARGET Avahi::Avahi) |
| 46 | add_library(Avahi::Avahi UNKNOWN IMPORTED) | 46 | add_library(Avahi::Avahi UNKNOWN IMPORTED) |
| 47 | set_target_properties(Avahi::Avahi PROPERTIES | 47 | set_target_properties(Avahi::Avahi PROPERTIES |
| 48 | IMPORTED_LOCATION "${AVAHI_CLIENT_LIBRARY}" | 48 | IMPORTED_LOCATION "${AVAHI_CLIENT_LIBRARY}" |
| 49 | INTERFACE_INCLUDE_DIRECTORIES "${AVAHI_CLIENT_INCLUDE_DIR}" | 49 | INTERFACE_INCLUDE_DIRECTORIES "${AVAHI_CLIENT_INCLUDE_DIR}" |
| 50 | INTERFACE_COMPILE_DEFINITIONS HAVE_LIBAVAHI_CLIENT=1) | 50 | INTERFACE_COMPILE_DEFINITIONS HAS_AVAHI=1) |
| 51 | endif() | 51 | endif() |
| 52 | if(NOT TARGET Avahi::AvahiCommon) | 52 | if(NOT TARGET Avahi::AvahiCommon) |
| 53 | add_library(Avahi::AvahiCommon UNKNOWN IMPORTED) | 53 | add_library(Avahi::AvahiCommon UNKNOWN IMPORTED) |
| 54 | set_target_properties(Avahi::AvahiCommon PROPERTIES | 54 | set_target_properties(Avahi::AvahiCommon PROPERTIES |
| 55 | IMPORTED_LOCATION "${AVAHI_COMMON_LIBRARY}" | 55 | IMPORTED_LOCATION "${AVAHI_COMMON_LIBRARY}" |
| 56 | INTERFACE_INCLUDE_DIRECTORIES "${AVAHI_COMMON_INCLUDE_DIR}" | 56 | INTERFACE_INCLUDE_DIRECTORIES "${AVAHI_COMMON_INCLUDE_DIR}" |
| 57 | INTERFACE_COMPILE_DEFINITIONS HAVE_LIBAVAHI_COMMON=1 | 57 | INTERFACE_COMPILE_DEFINITIONS HAS_AVAHI=1 |
| 58 | INTERFACE_LINK_LIBRARIES Avahi::Avahi) | 58 | INTERFACE_LINK_LIBRARIES Avahi::Avahi) |
| 59 | endif() | 59 | endif() |
| 60 | endif() | 60 | endif() |
diff --git a/cmake/modules/FindBluray.cmake b/cmake/modules/FindBluray.cmake index 010fdf1..3c29f54 100644 --- a/cmake/modules/FindBluray.cmake +++ b/cmake/modules/FindBluray.cmake | |||
| @@ -50,6 +50,11 @@ if(BLURAY_FOUND) | |||
| 50 | set(BLURAY_INCLUDE_DIRS ${BLURAY_INCLUDE_DIR}) | 50 | set(BLURAY_INCLUDE_DIRS ${BLURAY_INCLUDE_DIR}) |
| 51 | set(BLURAY_DEFINITIONS -DHAVE_LIBBLURAY=1) | 51 | set(BLURAY_DEFINITIONS -DHAVE_LIBBLURAY=1) |
| 52 | 52 | ||
| 53 | # todo: improve syntax | ||
| 54 | if (NOT CORE_PLATFORM_NAME_LC STREQUAL windowsstore) | ||
| 55 | list(APPEND BLURAY_DEFINITIONS -DHAVE_LIBBLURAY_BDJ=1) | ||
| 56 | endif() | ||
| 57 | |||
| 53 | if(NOT TARGET Bluray::Bluray) | 58 | if(NOT TARGET Bluray::Bluray) |
| 54 | add_library(Bluray::Bluray UNKNOWN IMPORTED) | 59 | add_library(Bluray::Bluray UNKNOWN IMPORTED) |
| 55 | if(BLURAY_LIBRARY) | 60 | if(BLURAY_LIBRARY) |
diff --git a/cmake/modules/FindCurl.cmake b/cmake/modules/FindCurl.cmake index ed4d81f..d0759a6 100644 --- a/cmake/modules/FindCurl.cmake +++ b/cmake/modules/FindCurl.cmake | |||
| @@ -20,7 +20,7 @@ endif() | |||
| 20 | 20 | ||
| 21 | find_path(CURL_INCLUDE_DIR NAMES curl/curl.h | 21 | find_path(CURL_INCLUDE_DIR NAMES curl/curl.h |
| 22 | PATHS ${PC_CURL_INCLUDEDIR}) | 22 | PATHS ${PC_CURL_INCLUDEDIR}) |
| 23 | find_library(CURL_LIBRARY NAMES curl libcurl | 23 | find_library(CURL_LIBRARY NAMES curl libcurl libcurl_imp |
| 24 | PATHS ${PC_CURL_LIBDIR}) | 24 | PATHS ${PC_CURL_LIBDIR}) |
| 25 | 25 | ||
| 26 | set(CURL_VERSION ${PC_CURL_VERSION}) | 26 | set(CURL_VERSION ${PC_CURL_VERSION}) |
diff --git a/cmake/modules/FindD3DX11Effects.cmake b/cmake/modules/FindD3DX11Effects.cmake index 3fdf7d7..9b1eb15 100644 --- a/cmake/modules/FindD3DX11Effects.cmake +++ b/cmake/modules/FindD3DX11Effects.cmake | |||
| @@ -4,23 +4,26 @@ | |||
| 4 | # D3DCOMPILER_DLL - Path to the Direct3D Compiler | 4 | # D3DCOMPILER_DLL - Path to the Direct3D Compiler |
| 5 | # FXC - Path to the DirectX Effects Compiler (FXC) | 5 | # FXC - Path to the DirectX Effects Compiler (FXC) |
| 6 | 6 | ||
| 7 | find_file(D3DCOMPILER_DLL | 7 | if(NOT CORE_SYSTEM_NAME STREQUAL windowsstore) |
| 8 | NAMES d3dcompiler_47.dll d3dcompiler_46.dll | 8 | find_file(D3DCOMPILER_DLL |
| 9 | PATHS | 9 | NAMES d3dcompiler_47.dll d3dcompiler_46.dll |
| 10 | "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Microsoft SDKs\\Windows\\v10.0;InstallationFolder]/Redist/D3D/${SDK_TARGET_ARCH}" | 10 | PATHS |
| 11 | "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Microsoft SDKs\\Windows\\v8.1;InstallationFolder]/Redist/D3D/${SDK_TARGET_ARCH}" | 11 | "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Microsoft SDKs\\Windows\\v10.0;InstallationFolder]/Redist/D3D/${SDK_TARGET_ARCH}" |
| 12 | "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Microsoft SDKs\\Windows\\v8.0;InstallationFolder]/Redist/D3D/${SDK_TARGET_ARCH}" | 12 | "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Microsoft SDKs\\Windows\\v8.1;InstallationFolder]/Redist/D3D/${SDK_TARGET_ARCH}" |
| 13 | "$ENV{WindowsSdkDir}Redist/d3d/${SDK_TARGET_ARCH}" | 13 | "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Microsoft SDKs\\Windows\\v8.0;InstallationFolder]/Redist/D3D/${SDK_TARGET_ARCH}" |
| 14 | NO_DEFAULT_PATH) | 14 | "$ENV{WindowsSdkDir}Redist/d3d/${SDK_TARGET_ARCH}" |
| 15 | if(NOT D3DCOMPILER_DLL) | 15 | NO_DEFAULT_PATH) |
| 16 | message(WARNING "Could NOT find Direct3D Compiler") | 16 | if(NOT D3DCOMPILER_DLL) |
| 17 | message(WARNING "Could NOT find Direct3D Compiler") | ||
| 18 | endif() | ||
| 19 | mark_as_advanced(D3DCOMPILER_DLL) | ||
| 20 | copy_file_to_buildtree(${D3DCOMPILER_DLL} DIRECTORY .) | ||
| 17 | endif() | 21 | endif() |
| 18 | mark_as_advanced(D3DCOMPILER_DLL) | ||
| 19 | copy_file_to_buildtree(${D3DCOMPILER_DLL} DIRECTORY .) | ||
| 20 | 22 | ||
| 21 | find_program(FXC fxc | 23 | find_program(FXC fxc |
| 22 | PATHS | 24 | PATHS |
| 23 | "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Microsoft SDKs\\Windows\\v10.0;InstallationFolder]/bin/x86" | 25 | "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Microsoft SDKs\\Windows\\v10.0;InstallationFolder]/bin/x86" |
| 26 | "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Microsoft SDKs\\Windows\\v10.0;InstallationFolder]/bin/[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Microsoft SDKs\\Windows\\v10.0;ProductVersion].0/x86" | ||
| 24 | "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Microsoft SDKs\\Windows\\v8.1;InstallationFolder]/bin/x86" | 27 | "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Microsoft SDKs\\Windows\\v8.1;InstallationFolder]/bin/x86" |
| 25 | "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Microsoft SDKs\\Windows\\v8.0;InstallationFolder]/bin/x86" | 28 | "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Microsoft SDKs\\Windows\\v8.0;InstallationFolder]/bin/x86" |
| 26 | "$ENV{WindowsSdkDir}bin/x86") | 29 | "$ENV{WindowsSdkDir}bin/x86") |
diff --git a/cmake/modules/FindDBus.cmake b/cmake/modules/FindDBus.cmake index 2d64af4..9ea4f8f 100644 --- a/cmake/modules/FindDBus.cmake +++ b/cmake/modules/FindDBus.cmake | |||
| @@ -38,14 +38,14 @@ find_package_handle_standard_args(DBus | |||
| 38 | if(DBUS_FOUND) | 38 | if(DBUS_FOUND) |
| 39 | set(DBUS_LIBRARIES ${DBUS_LIBRARY}) | 39 | set(DBUS_LIBRARIES ${DBUS_LIBRARY}) |
| 40 | set(DBUS_INCLUDE_DIRS ${DBUS_INCLUDE_DIR} ${DBUS_ARCH_INCLUDE_DIR}) | 40 | set(DBUS_INCLUDE_DIRS ${DBUS_INCLUDE_DIR} ${DBUS_ARCH_INCLUDE_DIR}) |
| 41 | set(DBUS_DEFINITIONS -DHAVE_DBUS=1) | 41 | set(DBUS_DEFINITIONS -DHAS_DBUS=1) |
| 42 | 42 | ||
| 43 | if(NOT TARGET DBus::DBus) | 43 | if(NOT TARGET DBus::DBus) |
| 44 | add_library(DBus::DBus UNKNOWN IMPORTED) | 44 | add_library(DBus::DBus UNKNOWN IMPORTED) |
| 45 | set_target_properties(DBus::DBus PROPERTIES | 45 | set_target_properties(DBus::DBus PROPERTIES |
| 46 | IMPORTED_LOCATION "${DBUS_LIBRARY}" | 46 | IMPORTED_LOCATION "${DBUS_LIBRARY}" |
| 47 | INTERFACE_INCLUDE_DIRECTORIES "${DBUS_INCLUDE_DIR}" | 47 | INTERFACE_INCLUDE_DIRECTORIES "${DBUS_INCLUDE_DIR}" |
| 48 | INTERFACE_COMPILE_DEFINITIONS HAVE_DBUS=1) | 48 | INTERFACE_COMPILE_DEFINITIONS HAS_DBUS=1) |
| 49 | endif() | 49 | endif() |
| 50 | endif() | 50 | endif() |
| 51 | 51 | ||
diff --git a/cmake/modules/FindEGL.cmake b/cmake/modules/FindEGL.cmake index 93fa530..331ac39 100644 --- a/cmake/modules/FindEGL.cmake +++ b/cmake/modules/FindEGL.cmake | |||
| @@ -14,14 +14,18 @@ | |||
| 14 | # | 14 | # |
| 15 | # EGL::EGL - The EGL library | 15 | # EGL::EGL - The EGL library |
| 16 | 16 | ||
| 17 | if(CORE_PLATFORM_NAME_LC STREQUAL rbpi) | ||
| 18 | set(_brcmprefix brcm) | ||
| 19 | endif() | ||
| 20 | |||
| 17 | if(PKG_CONFIG_FOUND) | 21 | if(PKG_CONFIG_FOUND) |
| 18 | pkg_check_modules(PC_EGL egl QUIET) | 22 | pkg_check_modules(PC_EGL ${_brcmprefix}egl QUIET) |
| 19 | endif() | 23 | endif() |
| 20 | 24 | ||
| 21 | find_path(EGL_INCLUDE_DIR EGL/egl.h | 25 | find_path(EGL_INCLUDE_DIR EGL/egl.h |
| 22 | PATHS ${PC_EGL_INCLUDEDIR}) | 26 | PATHS ${PC_EGL_INCLUDEDIR}) |
| 23 | 27 | ||
| 24 | find_library(EGL_LIBRARY NAMES EGL egl | 28 | find_library(EGL_LIBRARY NAMES ${_brcmprefix}EGL egl |
| 25 | PATHS ${PC_EGL_LIBDIR}) | 29 | PATHS ${PC_EGL_LIBDIR}) |
| 26 | 30 | ||
| 27 | set(EGL_VERSION ${PC_EGL_VERSION}) | 31 | set(EGL_VERSION ${PC_EGL_VERSION}) |
diff --git a/cmake/modules/FindFFMPEG.cmake b/cmake/modules/FindFFMPEG.cmake index 02c8d28..689cf28 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 3.3) | 36 | set(REQUIRED_FFMPEG_VERSION 3.4) |
| 37 | set(_avcodec_ver ">=57.89.100") | 37 | set(_avcodec_ver ">=57.107.100") |
| 38 | set(_avfilter_ver ">=6.82.100") | 38 | set(_avfilter_ver ">=6.107.100") |
| 39 | set(_avformat_ver ">=57.71.100") | 39 | set(_avformat_ver ">=57.83.100") |
| 40 | set(_avutil_ver ">=55.58.100") | 40 | set(_avutil_ver ">=55.78.100") |
| 41 | set(_swscale_ver ">=4.6.100") | 41 | set(_swscale_ver ">=4.8.100") |
| 42 | set(_swresample_ver ">=2.7.100") | 42 | set(_swresample_ver ">=2.9.100") |
| 43 | set(_postproc_ver ">=54.5.100") | 43 | set(_postproc_ver ">=54.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, |
| @@ -266,7 +266,7 @@ if(NOT FFMPEG_FOUND) | |||
| 266 | 266 | ||
| 267 | file(WRITE ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/ffmpeg/ffmpeg-link-wrapper | 267 | file(WRITE ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/ffmpeg/ffmpeg-link-wrapper |
| 268 | "#!/bin/bash | 268 | "#!/bin/bash |
| 269 | if [[ $@ == *${APP_NAME_LC}.bin* || $@ == *${APP_NAME_LC}.so* || $@ == *${APP_NAME_LC}-test* ]] | 269 | if [[ $@ == *${APP_NAME_LC}.bin* || $@ == *${APP_NAME_LC}${APP_BINARY_SUFFIX}* || $@ == *${APP_NAME_LC}.so* || $@ == *${APP_NAME_LC}-test* ]] |
| 270 | then | 270 | then |
| 271 | avformat=`PKG_CONFIG_PATH=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/lib/pkgconfig ${PKG_CONFIG_EXECUTABLE} --libs --static libavcodec` | 271 | avformat=`PKG_CONFIG_PATH=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/lib/pkgconfig ${PKG_CONFIG_EXECUTABLE} --libs --static libavcodec` |
| 272 | avcodec=`PKG_CONFIG_PATH=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/lib/pkgconfig ${PKG_CONFIG_EXECUTABLE} --libs --static libavformat` | 272 | avcodec=`PKG_CONFIG_PATH=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/lib/pkgconfig ${PKG_CONFIG_EXECUTABLE} --libs --static libavformat` |
diff --git a/cmake/modules/FindFmt.cmake b/cmake/modules/FindFmt.cmake index 5473ed5..5e47509 100644 --- a/cmake/modules/FindFmt.cmake +++ b/cmake/modules/FindFmt.cmake | |||
| @@ -12,6 +12,50 @@ | |||
| 12 | # | 12 | # |
| 13 | # Fmt::Fmt - The Fmt library | 13 | # Fmt::Fmt - The Fmt library |
| 14 | 14 | ||
| 15 | if(ENABLE_INTERNAL_FMT) | ||
| 16 | include(ExternalProject) | ||
| 17 | file(STRINGS ${CMAKE_SOURCE_DIR}/tools/depends/target/libfmt/Makefile VER REGEX "^[ ]*VERSION[ ]*=.+$") | ||
| 18 | string(REGEX REPLACE "^[ ]*VERSION[ ]*=[ ]*" "" FMT_VERSION "${VER}") | ||
| 19 | |||
| 20 | # allow user to override the download URL with a local tarball | ||
| 21 | # needed for offline build envs | ||
| 22 | if(FMT_URL) | ||
| 23 | get_filename_component(FMT_URL "${FMT_URL}" ABSOLUTE) | ||
| 24 | else() | ||
| 25 | set(FMT_URL http://mirrors.kodi.tv/build-deps/sources/fmt-${FMT_VERSION}.tar.gz) | ||
| 26 | endif() | ||
| 27 | if(VERBOSE) | ||
| 28 | message(STATUS "FMT_URL: ${FMT_URL}") | ||
| 29 | endif() | ||
| 30 | |||
| 31 | if(APPLE) | ||
| 32 | set(EXTRA_ARGS "-DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES}") | ||
| 33 | endif() | ||
| 34 | |||
| 35 | set(FMT_LIBRARY ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/lib/libfmt.a) | ||
| 36 | set(FMT_INCLUDE_DIR ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/include) | ||
| 37 | externalproject_add(fmt | ||
| 38 | URL ${FMT_URL} | ||
| 39 | DOWNLOAD_DIR ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/download | ||
| 40 | PREFIX ${CORE_BUILD_DIR}/fmt | ||
| 41 | CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR} | ||
| 42 | -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} | ||
| 43 | -DFMT_DOC=OFF | ||
| 44 | -DFMT_TEST=OFF | ||
| 45 | "${EXTRA_ARGS}" | ||
| 46 | BUILD_BYPRODUCTS ${FMT_LIBRARY}) | ||
| 47 | set_target_properties(fmt PROPERTIES FOLDER "External Projects") | ||
| 48 | |||
| 49 | include(FindPackageHandleStandardArgs) | ||
| 50 | find_package_handle_standard_args(Fmt | ||
| 51 | REQUIRED_VARS FMT_LIBRARY FMT_INCLUDE_DIR | ||
| 52 | VERSION_VAR FMT_VERSION) | ||
| 53 | |||
| 54 | set(FMT_LIBRARIES ${FMT_LIBRARY}) | ||
| 55 | set(FMT_INCLUDE_DIRS ${FMT_INCLUDE_DIR}) | ||
| 56 | |||
| 57 | else() | ||
| 58 | |||
| 15 | if(CORE_SYSTEM_NAME STREQUAL windows OR CORE_SYSTEM_NAME STREQUAL windowsstore) | 59 | if(CORE_SYSTEM_NAME STREQUAL windows OR CORE_SYSTEM_NAME STREQUAL windowsstore) |
| 16 | # TODO: fix windows fmt package to include fmt-config.cmake and fmt-config-version.cmake | 60 | # TODO: fix windows fmt package to include fmt-config.cmake and fmt-config-version.cmake |
| 17 | set(FMT_VERSION 3.0.1) | 61 | set(FMT_VERSION 3.0.1) |
| @@ -55,3 +99,5 @@ if(FMT_FOUND) | |||
| 55 | endif() | 99 | endif() |
| 56 | 100 | ||
| 57 | mark_as_advanced(FMT_INCLUDE_DIR FMT_LIBRARY) | 101 | mark_as_advanced(FMT_INCLUDE_DIR FMT_LIBRARY) |
| 102 | |||
| 103 | endif() | ||
diff --git a/cmake/modules/FindIMX.cmake b/cmake/modules/FindIMX.cmake deleted file mode 100644 index 3689579..0000000 --- a/cmake/modules/FindIMX.cmake +++ /dev/null | |||
| @@ -1,38 +0,0 @@ | |||
| 1 | #.rst: | ||
| 2 | # FindIMX | ||
| 3 | # ------- | ||
| 4 | # Finds the IMX codec | ||
| 5 | # | ||
| 6 | # This will will define the following variables:: | ||
| 7 | # | ||
| 8 | # IMX_FOUND - system has IMX | ||
| 9 | # IMX_INCLUDE_DIRS - the IMX include directory | ||
| 10 | # IMX_DEFINITIONS - the IMX definitions | ||
| 11 | # IMX_LIBRARIES - the IMX libraries | ||
| 12 | |||
| 13 | if(PKG_CONFIG_FOUND) | ||
| 14 | pkg_check_modules(IMX fslvpuwrap QUIET) | ||
| 15 | endif() | ||
| 16 | |||
| 17 | find_path(IMX_INCLUDE_DIR NAMES vpu_wrapper.h | ||
| 18 | PATH_SUFFIXES imx-mm/vpu | ||
| 19 | PATHS ${PC_IMX_INCLUDEDIR}) | ||
| 20 | |||
| 21 | find_library(FSLVPUWRAP_LIBRARY NAMES fslvpuwrap | ||
| 22 | PATHS ${PC_IMX_LIBDIR}) | ||
| 23 | find_library(VPU_LIBRARY NAMES vpu | ||
| 24 | PATHS ${PC_IMX_LIBDIR}) | ||
| 25 | find_library(G2D_LIBRARY NAMES g2d | ||
| 26 | PATHS ${PC_IMX_LIBDIR}) | ||
| 27 | |||
| 28 | include(FindPackageHandleStandardArgs) | ||
| 29 | find_package_handle_standard_args(IMX | ||
| 30 | REQUIRED_VARS IMX_INCLUDE_DIR FSLVPUWRAP_LIBRARY VPU_LIBRARY G2D_LIBRARY) | ||
| 31 | |||
| 32 | if(IMX_FOUND) | ||
| 33 | set(IMX_INCLUDE_DIRS ${IMX_INCLUDE_DIR}) | ||
| 34 | set(IMX_LIBRARIES ${FSLVPUWRAP_LIBRARY} ${VPU_LIBRARY} ${G2D_LIBRARY}) | ||
| 35 | set(IMX_DEFINITIONS -DHAS_IMXVPU=1 -DLINUX -DEGL_API_FB) | ||
| 36 | endif() | ||
| 37 | |||
| 38 | mark_as_advanced(IMX_INCLUDE_DIR FSLVPUWRAP_LIBRARY VPU_LIBRARY G2D_LIBRARY) | ||
diff --git a/cmake/modules/FindIconv.cmake b/cmake/modules/FindIconv.cmake new file mode 100644 index 0000000..8ee01fb --- /dev/null +++ b/cmake/modules/FindIconv.cmake | |||
| @@ -0,0 +1,44 @@ | |||
| 1 | #.rst: | ||
| 2 | # FindICONV | ||
| 3 | # -------- | ||
| 4 | # Finds the ICONV library | ||
| 5 | # | ||
| 6 | # This will will define the following variables:: | ||
| 7 | # | ||
| 8 | # ICONV_FOUND - system has ICONV | ||
| 9 | # ICONV_INCLUDE_DIRS - the ICONV include directory | ||
| 10 | # ICONV_LIBRARIES - the ICONV libraries | ||
| 11 | # | ||
| 12 | # and the following imported targets:: | ||
| 13 | # | ||
| 14 | # ICONV::ICONV - The ICONV library | ||
| 15 | |||
| 16 | find_path(ICONV_INCLUDE_DIR NAMES iconv.h) | ||
| 17 | |||
| 18 | find_library(ICONV_LIBRARY NAMES iconv libiconv c) | ||
| 19 | |||
| 20 | set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARY}) | ||
| 21 | check_function_exists(iconv HAVE_ICONV_FUNCTION) | ||
| 22 | if(NOT HAVE_ICONV_FUNCTION) | ||
| 23 | check_function_exists(libiconv HAVE_LIBICONV_FUNCTION2) | ||
| 24 | set(HAVE_ICONV_FUNCTION ${HAVE_LIBICONV_FUNCTION2}) | ||
| 25 | unset(HAVE_LIBICONV_FUNCTION2) | ||
| 26 | endif() | ||
| 27 | |||
| 28 | include(FindPackageHandleStandardArgs) | ||
| 29 | find_package_handle_standard_args(Iconv | ||
| 30 | REQUIRED_VARS ICONV_LIBRARY ICONV_INCLUDE_DIR HAVE_ICONV_FUNCTION) | ||
| 31 | |||
| 32 | if(ICONV_FOUND) | ||
| 33 | set(ICONV_LIBRARIES ${ICONV_LIBRARY}) | ||
| 34 | set(ICONV_INCLUDE_DIRS ${ICONV_INCLUDE_DIR}) | ||
| 35 | |||
| 36 | if(NOT TARGET ICONV::ICONV) | ||
| 37 | add_library(ICONV::ICONV UNKNOWN IMPORTED) | ||
| 38 | set_target_properties(ICONV::ICONV PROPERTIES | ||
| 39 | IMPORTED_LOCATION "${ICONV_LIBRARY}" | ||
| 40 | INTERFACE_INCLUDE_DIRECTORIES "${ICONV_INCLUDE_DIR}") | ||
| 41 | endif() | ||
| 42 | endif() | ||
| 43 | |||
| 44 | mark_as_advanced(ICONV_INCLUDE_DIR ICONV_LIBRARY HAVE_ICONV_FUNCTION) | ||
diff --git a/cmake/modules/FindJsonSchemaBuilder.cmake b/cmake/modules/FindJsonSchemaBuilder.cmake index 9a31dd5..14aa2f5 100644 --- a/cmake/modules/FindJsonSchemaBuilder.cmake +++ b/cmake/modules/FindJsonSchemaBuilder.cmake | |||
| @@ -12,7 +12,7 @@ if(NOT TARGET JsonSchemaBuilder::JsonSchemaBuilder) | |||
| 12 | add_executable(JsonSchemaBuilder::JsonSchemaBuilder IMPORTED GLOBAL) | 12 | add_executable(JsonSchemaBuilder::JsonSchemaBuilder IMPORTED GLOBAL) |
| 13 | if(CORE_SYSTEM_NAME STREQUAL windows OR CORE_SYSTEM_NAME STREQUAL windowsstore) | 13 | if(CORE_SYSTEM_NAME STREQUAL windows OR CORE_SYSTEM_NAME STREQUAL windowsstore) |
| 14 | set_target_properties(JsonSchemaBuilder::JsonSchemaBuilder PROPERTIES | 14 | set_target_properties(JsonSchemaBuilder::JsonSchemaBuilder PROPERTIES |
| 15 | IMPORTED_LOCATION "${CMAKE_SOURCE_DIR}/project/BuildDependencies/bin/json-rpc/JsonSchemaBuilder") | 15 | IMPORTED_LOCATION "${DEPENDENCIES_DIR}/bin/json-rpc/JsonSchemaBuilder") |
| 16 | else() | 16 | else() |
| 17 | set_target_properties(JsonSchemaBuilder::JsonSchemaBuilder PROPERTIES | 17 | set_target_properties(JsonSchemaBuilder::JsonSchemaBuilder PROPERTIES |
| 18 | IMPORTED_LOCATION "${NATIVEPREFIX}/bin/JsonSchemaBuilder") | 18 | IMPORTED_LOCATION "${NATIVEPREFIX}/bin/JsonSchemaBuilder") |
diff --git a/cmake/modules/FindLibDvd.cmake b/cmake/modules/FindLibDvd.cmake index 86af89c..5c72826 100644 --- a/cmake/modules/FindLibDvd.cmake +++ b/cmake/modules/FindLibDvd.cmake | |||
| @@ -1,133 +1,146 @@ | |||
| 1 | if(NOT WIN32) | 1 | if(KODI_DEPENDSBUILD) |
| 2 | if(KODI_DEPENDSBUILD) | 2 | set(_dvdlibs dvdread dvdnav) |
| 3 | set(_dvdlibs dvdread dvdnav) | 3 | set(_handlevars LIBDVD_INCLUDE_DIRS DVDREAD_LIBRARY DVDNAV_LIBRARY) |
| 4 | set(_handlevars LIBDVD_INCLUDE_DIRS DVDREAD_LIBRARY DVDNAV_LIBRARY) | 4 | if(ENABLE_DVDCSS) |
| 5 | if(ENABLE_DVDCSS) | 5 | list(APPEND _dvdlibs libdvdcss) |
| 6 | list(APPEND _dvdlibs libdvdcss) | 6 | list(APPEND _handlevars DVDCSS_LIBRARY) |
| 7 | list(APPEND _handlevars DVDCSS_LIBRARY) | 7 | endif() |
| 8 | endif() | ||
| 9 | 8 | ||
| 10 | if(PKG_CONFIG_FOUND) | 9 | if(PKG_CONFIG_FOUND) |
| 11 | pkg_check_modules(PC_DVD ${_dvdlibs} QUIET) | 10 | pkg_check_modules(PC_DVD ${_dvdlibs} QUIET) |
| 12 | endif() | 11 | endif() |
| 13 | 12 | ||
| 14 | find_path(LIBDVD_INCLUDE_DIRS dvdnav/dvdnav.h PATHS ${PC_DVD_INCLUDE_DIRS}) | 13 | find_path(LIBDVD_INCLUDE_DIRS dvdnav/dvdnav.h PATHS ${PC_DVD_INCLUDE_DIRS}) |
| 15 | find_library(DVDREAD_LIBRARY NAMES dvdread libdvdread PATHS ${PC_DVD_dvdread_LIBDIR}) | 14 | find_library(DVDREAD_LIBRARY NAMES dvdread libdvdread PATHS ${PC_DVD_dvdread_LIBDIR}) |
| 16 | find_library(DVDNAV_LIBRARY NAMES dvdnav libdvdnav PATHS ${PC_DVD_dvdnav_LIBDIR}) | 15 | find_library(DVDNAV_LIBRARY NAMES dvdnav libdvdnav PATHS ${PC_DVD_dvdnav_LIBDIR}) |
| 16 | if(ENABLE_DVDCSS) | ||
| 17 | find_library(DVDCSS_LIBRARY NAMES dvdcss libdvdcss PATHS ${PC_DVD_libdvdcss_LIBDIR}) | ||
| 18 | endif() | ||
| 19 | |||
| 20 | include(FindPackageHandleStandardArgs) | ||
| 21 | find_package_handle_standard_args(LibDvd REQUIRED_VARS ${_handlevars}) | ||
| 22 | if(LIBDVD_FOUND) | ||
| 23 | add_library(dvdnav UNKNOWN IMPORTED) | ||
| 24 | set_target_properties(dvdnav PROPERTIES | ||
| 25 | FOLDER "External Projects" | ||
| 26 | IMPORTED_LOCATION "${DVDNAV_LIBRARY}") | ||
| 27 | |||
| 28 | add_library(dvdread UNKNOWN IMPORTED) | ||
| 29 | set_target_properties(dvdread PROPERTIES | ||
| 30 | FOLDER "External Projects" | ||
| 31 | IMPORTED_LOCATION "${DVDREAD_LIBRARY}") | ||
| 32 | add_library(dvdcss UNKNOWN IMPORTED) | ||
| 33 | set_target_properties(dvdcss PROPERTIES | ||
| 34 | FOLDER "External Projects" | ||
| 35 | IMPORTED_LOCATION "${DVDCSS_LIBRARY}") | ||
| 36 | |||
| 37 | set(_linklibs ${DVDREAD_LIBRARY}) | ||
| 17 | if(ENABLE_DVDCSS) | 38 | if(ENABLE_DVDCSS) |
| 18 | find_library(DVDCSS_LIBRARY NAMES dvdcss libdvdcss PATHS ${PC_DVD_libdvdcss_LIBDIR}) | 39 | list(APPEND _linklibs ${DVDCSS_LIBRARY}) |
| 19 | endif() | 40 | endif() |
| 20 | 41 | core_link_library(${DVDNAV_LIBRARY} system/players/VideoPlayer/libdvdnav dvdnav archives "${_linklibs}") | |
| 21 | include(FindPackageHandleStandardArgs) | 42 | set(LIBDVD_LIBRARIES ${DVDNAV_LIBRARY}) |
| 22 | find_package_handle_standard_args(LibDvd REQUIRED_VARS ${_handlevars}) | 43 | mark_as_advanced(LIBDVD_INCLUDE_DIRS LIBDVD_LIBRARIES) |
| 23 | if(LIBDVD_FOUND) | 44 | endif() |
| 24 | add_library(dvdnav UNKNOWN IMPORTED) | 45 | else() |
| 25 | set_target_properties(dvdnav PROPERTIES | 46 | set(dvdlibs libdvdread libdvdnav) |
| 26 | FOLDER "External Projects" | 47 | if(ENABLE_DVDCSS) |
| 27 | IMPORTED_LOCATION "${DVDNAV_LIBRARY}") | 48 | list(APPEND dvdlibs libdvdcss) |
| 28 | 49 | endif() | |
| 29 | add_library(dvdread UNKNOWN IMPORTED) | 50 | set(DEPENDS_TARGETS_DIR ${CMAKE_SOURCE_DIR}/tools/depends/target) |
| 30 | set_target_properties(dvdread PROPERTIES | 51 | foreach(dvdlib ${dvdlibs}) |
| 31 | FOLDER "External Projects" | 52 | file(GLOB VERSION_FILE ${DEPENDS_TARGETS_DIR}/${dvdlib}/DVD*-VERSION) |
| 32 | IMPORTED_LOCATION "${DVDREAD_LIBRARY}") | 53 | file(STRINGS ${VERSION_FILE} VER) |
| 33 | add_library(dvdcss UNKNOWN IMPORTED) | 54 | string(REGEX MATCH "VERSION=[^ ]*$.*" ${dvdlib}_VER "${VER}") |
| 34 | set_target_properties(dvdcss PROPERTIES | 55 | list(GET ${dvdlib}_VER 0 ${dvdlib}_VER) |
| 35 | FOLDER "External Projects" | 56 | string(SUBSTRING "${${dvdlib}_VER}" 8 -1 ${dvdlib}_VER) |
| 36 | IMPORTED_LOCATION "${DVDCSS_LIBRARY}") | 57 | string(REGEX MATCH "BASE_URL=([^ ]*)" ${dvdlib}_BASE_URL "${VER}") |
| 37 | 58 | list(GET ${dvdlib}_BASE_URL 0 ${dvdlib}_BASE_URL) | |
| 38 | set(_linklibs ${DVDREAD_LIBRARY}) | 59 | string(SUBSTRING "${${dvdlib}_BASE_URL}" 9 -1 ${dvdlib}_BASE_URL) |
| 39 | if(ENABLE_DVDCSS) | 60 | string(TOUPPER ${dvdlib} DVDLIB) |
| 40 | list(APPEND _linklibs ${DVDCSS_LIBRARY}) | 61 | |
| 41 | endif() | 62 | # allow user to override the download URL with a local tarball |
| 42 | core_link_library(${DVDNAV_LIBRARY} system/players/VideoPlayer/libdvdnav dvdnav archives "${_linklibs}") | 63 | # needed for offline build envs |
| 43 | set(LIBDVD_LIBRARIES ${DVDNAV_LIBRARY}) | 64 | # allow upper and lowercase var name |
| 44 | mark_as_advanced(LIBDVD_INCLUDE_DIRS LIBDVD_LIBRARIES) | 65 | if(${dvdlib}_URL) |
| 66 | set(${DVDLIB}_URL ${${dvdlib}_URL}) | ||
| 45 | endif() | 67 | endif() |
| 46 | else() | 68 | if(${DVDLIB}_URL) |
| 47 | set(dvdlibs libdvdread libdvdnav) | 69 | get_filename_component(${DVDLIB}_URL "${${DVDLIB}_URL}" ABSOLUTE) |
| 48 | if(ENABLE_DVDCSS) | 70 | else() |
| 49 | list(APPEND dvdlibs libdvdcss) | 71 | set(${DVDLIB}_URL ${${dvdlib}_BASE_URL}/archive/${${dvdlib}_VER}.tar.gz) |
| 50 | endif() | 72 | endif() |
| 51 | foreach(dvdlib ${dvdlibs}) | 73 | if(VERBOSE) |
| 52 | file(GLOB VERSION_FILE ${CMAKE_SOURCE_DIR}/tools/depends/target/${dvdlib}/DVD*-VERSION) | 74 | message(STATUS "${DVDLIB}_URL: ${${DVDLIB}_URL}") |
| 53 | file(STRINGS ${VERSION_FILE} VER) | ||
| 54 | string(REGEX MATCH "VERSION=[^ ]*$.*" ${dvdlib}_VER "${VER}") | ||
| 55 | list(GET ${dvdlib}_VER 0 ${dvdlib}_VER) | ||
| 56 | string(SUBSTRING "${${dvdlib}_VER}" 8 -1 ${dvdlib}_VER) | ||
| 57 | string(REGEX MATCH "BASE_URL=([^ ]*)" ${dvdlib}_BASE_URL "${VER}") | ||
| 58 | list(GET ${dvdlib}_BASE_URL 0 ${dvdlib}_BASE_URL) | ||
| 59 | string(SUBSTRING "${${dvdlib}_BASE_URL}" 9 -1 ${dvdlib}_BASE_URL) | ||
| 60 | string(TOUPPER ${dvdlib} DVDLIB) | ||
| 61 | |||
| 62 | # allow user to override the download URL with a local tarball | ||
| 63 | # needed for offline build envs | ||
| 64 | # allow upper and lowercase var name | ||
| 65 | if(${dvdlib}_URL) | ||
| 66 | set(${DVDLIB}_URL ${${dvdlib}_URL}) | ||
| 67 | endif() | ||
| 68 | if(${DVDLIB}_URL) | ||
| 69 | get_filename_component(${DVDLIB}_URL "${${DVDLIB}_URL}" ABSOLUTE) | ||
| 70 | else() | ||
| 71 | set(${DVDLIB}_URL ${${dvdlib}_BASE_URL}/archive/${${dvdlib}_VER}.tar.gz) | ||
| 72 | endif() | ||
| 73 | if(VERBOSE) | ||
| 74 | message(STATUS "${DVDLIB}_URL: ${${DVDLIB}_URL}") | ||
| 75 | endif() | ||
| 76 | endforeach() | ||
| 77 | |||
| 78 | set(DVDREAD_CFLAGS "${DVDREAD_CFLAGS} -I${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/libdvd/include") | ||
| 79 | if(CMAKE_CROSSCOMPILING) | ||
| 80 | set(EXTRA_FLAGS "CC=${CMAKE_C_COMPILER}") | ||
| 81 | endif() | 75 | endif() |
| 76 | endforeach() | ||
| 82 | 77 | ||
| 83 | if(APPLE) | 78 | set(DVDREAD_CFLAGS "${DVDREAD_CFLAGS} -I${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/libdvd/include") |
| 84 | set(CMAKE_LD_FLAGS "-framework IOKit -framework CoreFoundation") | 79 | if(CMAKE_CROSSCOMPILING) |
| 85 | endif() | 80 | set(EXTRA_FLAGS "CC=${CMAKE_C_COMPILER}") |
| 81 | endif() | ||
| 82 | |||
| 83 | if(APPLE) | ||
| 84 | set(CMAKE_LD_FLAGS "-framework IOKit -framework CoreFoundation") | ||
| 85 | endif() | ||
| 86 | 86 | ||
| 87 | set(HOST_ARCH ${ARCH}) | 87 | set(HOST_ARCH ${ARCH}) |
| 88 | if(CORE_SYSTEM_NAME STREQUAL android) | 88 | if(CORE_SYSTEM_NAME STREQUAL android) |
| 89 | if(ARCH STREQUAL arm) | 89 | if(ARCH STREQUAL arm) |
| 90 | set(HOST_ARCH arm-linux-androideabi) | 90 | set(HOST_ARCH arm-linux-androideabi) |
| 91 | elseif(ARCH STREQUAL aarch64) | 91 | elseif(ARCH STREQUAL aarch64) |
| 92 | set(HOST_ARCH aarch64-linux-android) | 92 | set(HOST_ARCH aarch64-linux-android) |
| 93 | elseif(ARCH STREQUAL i486-linux) | 93 | elseif(ARCH STREQUAL i486-linux) |
| 94 | set(HOST_ARCH i686-linux-android) | 94 | set(HOST_ARCH i686-linux-android) |
| 95 | endif() | ||
| 96 | endif() | 95 | endif() |
| 96 | elseif(CORE_SYSTEM_NAME STREQUAL windowsstore) | ||
| 97 | set(LIBDVD_ADDITIONAL_ARGS "-DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME}" "-DCMAKE_SYSTEM_VERSION=${CMAKE_SYSTEM_VERSION}") | ||
| 98 | endif() | ||
| 97 | 99 | ||
| 98 | if(ENABLE_DVDCSS) | 100 | if(ENABLE_DVDCSS) |
| 101 | if(NOT CORE_SYSTEM_NAME MATCHES windows) | ||
| 99 | set(DVDCSS_LIBRARY ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/libdvd/lib/libdvdcss.a) | 102 | set(DVDCSS_LIBRARY ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/libdvd/lib/libdvdcss.a) |
| 100 | ExternalProject_Add(dvdcss URL ${LIBDVDCSS_URL} | 103 | ExternalProject_Add(dvdcss URL ${LIBDVDCSS_URL} |
| 101 | DOWNLOAD_NAME libdvdcss-${libdvdcss_VER}.tar.gz | 104 | DOWNLOAD_NAME libdvdcss-${libdvdcss_VER}.tar.gz |
| 102 | DOWNLOAD_DIR ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/download | 105 | DOWNLOAD_DIR ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/download |
| 103 | PREFIX ${CORE_BUILD_DIR}/libdvd | 106 | PREFIX ${CORE_BUILD_DIR}/libdvd |
| 104 | CONFIGURE_COMMAND ac_cv_path_GIT= <SOURCE_DIR>/configure | 107 | CONFIGURE_COMMAND ac_cv_path_GIT= <SOURCE_DIR>/configure |
| 105 | --target=${HOST_ARCH} | 108 | --target=${HOST_ARCH} |
| 106 | --host=${HOST_ARCH} | 109 | --host=${HOST_ARCH} |
| 107 | --disable-doc | 110 | --disable-doc |
| 108 | --enable-static | 111 | --enable-static |
| 109 | --disable-shared | 112 | --disable-shared |
| 110 | --with-pic | 113 | --with-pic |
| 111 | --prefix=<INSTALL_DIR> | 114 | --prefix=<INSTALL_DIR> |
| 112 | --libdir=<INSTALL_DIR>/lib | 115 | --libdir=<INSTALL_DIR>/lib |
| 113 | "${EXTRA_FLAGS}" | 116 | "${EXTRA_FLAGS}" |
| 114 | "CFLAGS=${CMAKE_C_FLAGS} ${DVDREAD_CFLAGS}" | 117 | "CFLAGS=${CMAKE_C_FLAGS} ${DVDREAD_CFLAGS}" |
| 115 | "LDFLAGS=${CMAKE_LD_FLAGS}" | 118 | "LDFLAGS=${CMAKE_LD_FLAGS}" |
| 116 | BUILD_BYPRODUCTS ${DVDCSS_LIBRARY}) | 119 | BUILD_BYPRODUCTS ${DVDCSS_LIBRARY}) |
| 117 | ExternalProject_Add_Step(dvdcss autoreconf | 120 | ExternalProject_Add_Step(dvdcss autoreconf |
| 118 | DEPENDEES download update patch | 121 | DEPENDEES download update patch |
| 119 | DEPENDERS configure | 122 | DEPENDERS configure |
| 120 | COMMAND PATH=${NATIVEPREFIX}/bin:$ENV{PATH} autoreconf -vif | 123 | COMMAND PATH=${NATIVEPREFIX}/bin:$ENV{PATH} autoreconf -vif |
| 121 | WORKING_DIRECTORY <SOURCE_DIR>) | 124 | WORKING_DIRECTORY <SOURCE_DIR>) |
| 122 | 125 | else() | |
| 123 | set_target_properties(dvdcss PROPERTIES FOLDER "External Projects") | 126 | ExternalProject_Add(dvdcss |
| 127 | URL ${LIBDVDCSS_URL} | ||
| 128 | DOWNLOAD_DIR ${CMAKE_SOURCE_DIR}/project/BuildDependencies/downloads | ||
| 129 | DOWNLOAD_NAME libdvdcss-${libdvdcss_VER}.tar.gz | ||
| 130 | CMAKE_ARGS | ||
| 131 | ${LIBDVD_ADDITIONAL_ARGS} | ||
| 132 | -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/libdvd | ||
| 133 | ) | ||
| 124 | endif() | 134 | endif() |
| 135 | set_target_properties(dvdcss PROPERTIES FOLDER "External Projects") | ||
| 136 | endif() | ||
| 125 | 137 | ||
| 126 | set(DVDREAD_CFLAGS "-D_XBMC -I${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/libdvd/include") | 138 | set(DVDREAD_CFLAGS "-D_XBMC -I${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/libdvd/include") |
| 127 | if(ENABLE_DVDCSS) | 139 | if(ENABLE_DVDCSS) |
| 128 | set(DVDREAD_CFLAGS "${DVDREAD_CFLAGS} -DHAVE_DVDCSS_DVDCSS_H") | 140 | set(DVDREAD_CFLAGS "${DVDREAD_CFLAGS} -DHAVE_DVDCSS_DVDCSS_H") |
| 129 | endif() | 141 | endif() |
| 130 | 142 | ||
| 143 | if(NOT CORE_SYSTEM_NAME MATCHES windows) | ||
| 131 | set(DVDREAD_LIBRARY ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/libdvd/lib/libdvdread.a) | 144 | set(DVDREAD_LIBRARY ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/libdvd/lib/libdvdread.a) |
| 132 | ExternalProject_Add(dvdread URL ${LIBDVDREAD_URL} | 145 | ExternalProject_Add(dvdread URL ${LIBDVDREAD_URL} |
| 133 | DOWNLOAD_NAME libdvdread-${libdvdread_VER}.tar.gz | 146 | DOWNLOAD_NAME libdvdread-${libdvdread_VER}.tar.gz |
| @@ -146,74 +159,90 @@ if(NOT WIN32) | |||
| 146 | "LDFLAGS=${CMAKE_LD_FLAGS}" | 159 | "LDFLAGS=${CMAKE_LD_FLAGS}" |
| 147 | BUILD_BYPRODUCTS ${DVDREAD_LIBRARY}) | 160 | BUILD_BYPRODUCTS ${DVDREAD_LIBRARY}) |
| 148 | ExternalProject_Add_Step(dvdread autoreconf | 161 | ExternalProject_Add_Step(dvdread autoreconf |
| 149 | DEPENDEES download update patch | 162 | DEPENDEES download update patch |
| 150 | DEPENDERS configure | 163 | DEPENDERS configure |
| 151 | COMMAND PATH=${NATIVEPREFIX}/bin:$ENV{PATH} autoreconf -vif | 164 | COMMAND PATH=${NATIVEPREFIX}/bin:$ENV{PATH} autoreconf -vif |
| 152 | WORKING_DIRECTORY <SOURCE_DIR>) | 165 | WORKING_DIRECTORY <SOURCE_DIR>) |
| 153 | if(ENABLE_DVDCSS) | 166 | else() |
| 154 | add_dependencies(dvdread dvdcss) | 167 | ExternalProject_Add(dvdread |
| 155 | endif() | 168 | URL ${LIBDVDREAD_URL} |
| 169 | DOWNLOAD_DIR ${CMAKE_SOURCE_DIR}/project/BuildDependencies/downloads | ||
| 170 | DOWNLOAD_NAME libdvdread-${libdvdread_VER}.tar.gz | ||
| 171 | CMAKE_ARGS | ||
| 172 | ${LIBDVD_ADDITIONAL_ARGS} | ||
| 173 | -DCMAKE_PREFIX_PATH:PATH=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/libdvd | ||
| 174 | -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/libdvd | ||
| 175 | ) | ||
| 176 | endif() | ||
| 177 | if(ENABLE_DVDCSS) | ||
| 178 | add_dependencies(dvdread dvdcss) | ||
| 179 | endif() | ||
| 156 | 180 | ||
| 157 | set_target_properties(dvdread PROPERTIES FOLDER "External Projects") | 181 | set_target_properties(dvdread PROPERTIES FOLDER "External Projects") |
| 158 | 182 | ||
| 159 | if(ENABLE_DVDCSS) | 183 | if(ENABLE_DVDCSS) |
| 160 | set(DVDNAV_LIBS -ldvdcss) | 184 | set(DVDNAV_LIBS -ldvdcss) |
| 161 | endif() | 185 | endif() |
| 162 | 186 | ||
| 187 | if(NOT CORE_SYSTEM_NAME MATCHES windows) | ||
| 163 | set(DVDNAV_LIBRARY ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/libdvd/lib/libdvdnav.a) | 188 | set(DVDNAV_LIBRARY ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/libdvd/lib/libdvdnav.a) |
| 164 | ExternalProject_Add(dvdnav URL ${LIBDVDNAV_URL} | 189 | ExternalProject_Add(dvdnav URL ${LIBDVDNAV_URL} |
| 165 | DOWNLOAD_NAME libdvdnav-${libdvdnav_VER}.tar.gz | 190 | DOWNLOAD_NAME libdvdnav-${libdvdnav_VER}.tar.gz |
| 166 | DOWNLOAD_DIR ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/download | 191 | DOWNLOAD_DIR ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/download |
| 167 | PREFIX ${CORE_BUILD_DIR}/libdvd | 192 | PREFIX ${CORE_BUILD_DIR}/libdvd |
| 168 | CONFIGURE_COMMAND ac_cv_path_GIT= <SOURCE_DIR>/configure | 193 | CONFIGURE_COMMAND ac_cv_path_GIT= <SOURCE_DIR>/configure |
| 169 | --target=${HOST_ARCH} | 194 | --target=${HOST_ARCH} |
| 170 | --host=${HOST_ARCH} | 195 | --host=${HOST_ARCH} |
| 171 | --enable-static | 196 | --enable-static |
| 172 | --disable-shared | 197 | --disable-shared |
| 173 | --with-pic | 198 | --with-pic |
| 174 | --prefix=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/libdvd | 199 | --prefix=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/libdvd |
| 175 | --libdir=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/libdvd/lib | 200 | --libdir=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/libdvd/lib |
| 176 | "${EXTRA_FLAGS}" | 201 | "${EXTRA_FLAGS}" |
| 177 | "LDFLAGS=${CMAKE_LD_FLAGS} -L${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/libdvd/lib" | 202 | "LDFLAGS=${CMAKE_LD_FLAGS} -L${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/libdvd/lib" |
| 178 | "CFLAGS=${CMAKE_C_FLAGS} ${DVDREAD_CFLAGS}" | 203 | "CFLAGS=${CMAKE_C_FLAGS} ${DVDREAD_CFLAGS}" |
| 179 | "DVDREAD_CFLAGS=${DVDREAD_CFLAGS}" | 204 | "DVDREAD_CFLAGS=${DVDREAD_CFLAGS}" |
| 180 | "DVDREAD_LIBS=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/libdvd/lib/libdvdread.la" | 205 | "DVDREAD_LIBS=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/libdvd/lib/libdvdread.la" |
| 181 | "LIBS=${DVDNAV_LIBS}" | 206 | "LIBS=${DVDNAV_LIBS}" |
| 182 | BUILD_BYPRODUCTS ${DVDNAV_LIBRARY}) | 207 | BUILD_BYPRODUCTS ${DVDNAV_LIBRARY}) |
| 183 | ExternalProject_Add_Step(dvdnav autoreconf | 208 | ExternalProject_Add_Step(dvdnav autoreconf |
| 184 | DEPENDEES download update patch | 209 | DEPENDEES download update patch |
| 185 | DEPENDERS configure | 210 | DEPENDERS configure |
| 186 | COMMAND PATH=${NATIVEPREFIX}/bin:$ENV{PATH} autoreconf -vif | 211 | COMMAND PATH=${NATIVEPREFIX}/bin:$ENV{PATH} autoreconf -vif |
| 187 | WORKING_DIRECTORY <SOURCE_DIR>) | 212 | WORKING_DIRECTORY <SOURCE_DIR>) |
| 188 | add_dependencies(dvdnav dvdread) | 213 | else() |
| 189 | set_target_properties(dvdnav PROPERTIES FOLDER "External Projects") | 214 | set(DVDNAV_LIBRARY ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/libdvd/lib/libdvdnav.lib) |
| 215 | ExternalProject_Add(dvdnav | ||
| 216 | URL ${LIBDVDNAV_URL} | ||
| 217 | DOWNLOAD_DIR ${CMAKE_SOURCE_DIR}/project/BuildDependencies/downloads | ||
| 218 | DOWNLOAD_NAME libdvdnav-${libdvdnav_VER}.tar.gz | ||
| 219 | CMAKE_ARGS | ||
| 220 | ${LIBDVD_ADDITIONAL_ARGS} | ||
| 221 | -DCMAKE_PREFIX_PATH:PATH=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/libdvd | ||
| 222 | -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/libdvd | ||
| 223 | ) | ||
| 224 | endif() | ||
| 225 | add_dependencies(dvdnav dvdread) | ||
| 226 | set_target_properties(dvdnav PROPERTIES FOLDER "External Projects") | ||
| 190 | 227 | ||
| 191 | set(_dvdlibs ${DVDREAD_LIBRARY} ${DVDCSS_LIBRARY}) | 228 | set(_dvdlibs ${DVDREAD_LIBRARY} ${DVDCSS_LIBRARY}) |
| 229 | if(NOT CORE_SYSTEM_NAME MATCHES windows) | ||
| 192 | # link a shared dvdnav library that includes the whole archives of dvdread and dvdcss as well | 230 | # link a shared dvdnav library that includes the whole archives of dvdread and dvdcss as well |
| 193 | # the quotes around _dvdlibs are on purpose, since we want to pass a list to the function that will be unpacked automatically | 231 | # the quotes around _dvdlibs are on purpose, since we want to pass a list to the function that will be unpacked automatically |
| 194 | core_link_library(${DVDNAV_LIBRARY} system/players/VideoPlayer/libdvdnav dvdnav archives "${_dvdlibs}") | 232 | core_link_library(${DVDNAV_LIBRARY} system/players/VideoPlayer/libdvdnav dvdnav archives "${_dvdlibs}") |
| 195 | 233 | else() | |
| 196 | set(LIBDVD_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/libdvd/include) | 234 | set(LIBDVD_TARGET_DIR .) |
| 197 | set(LIBDVD_LIBRARIES ${DVDNAV_LIBRARY} ${DVDREAD_LIBRARY}) | 235 | if(CORE_SYSTEM_NAME STREQUAL windowsstore) |
| 198 | if(ENABLE_DVDCSS) | 236 | set(LIBDVD_TARGET_DIR dlls) |
| 199 | list(APPEND LIBDVD_LIBRARIES ${DVDCSS_LIBRARY}) | ||
| 200 | endif() | ||
| 201 | set(LIBDVD_LIBRARIES ${LIBDVD_LIBRARIES} CACHE STRING "libdvd libraries" FORCE) | ||
| 202 | set(LIBDVD_FOUND 1 CACHE BOOL "libdvd found" FORCE) | ||
| 203 | endif() | 237 | endif() |
| 204 | else() | 238 | copy_file_to_buildtree(${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/libdvd/bin/libdvdnav.dll DIRECTORY ${LIBDVD_TARGET_DIR}) |
| 205 | # Dynamically loaded on Windows | ||
| 206 | find_path(LIBDVD_INCLUDE_DIR dvdcss/dvdcss.h) | ||
| 207 | |||
| 208 | include(FindPackageHandleStandardArgs) | ||
| 209 | find_package_handle_standard_args(LibDvd REQUIRED_VARS LIBDVD_INCLUDE_DIR) | ||
| 210 | |||
| 211 | if(LIBDVD_FOUND) | ||
| 212 | set(LIBDVD_INCLUDE_DIRS ${LIBDVD_INCLUDE_DIR}) | ||
| 213 | |||
| 214 | add_custom_target(dvdnav) | ||
| 215 | set_target_properties(dvdnav PROPERTIES FOLDER "External Projects") | ||
| 216 | endif() | 239 | endif() |
| 217 | 240 | ||
| 218 | mark_as_advanced(LIBDVD_INCLUDE_DIR) | 241 | set(LIBDVD_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/libdvd/include) |
| 219 | endif() | 242 | set(LIBDVD_LIBRARIES ${DVDNAV_LIBRARY} ${DVDREAD_LIBRARY}) |
| 243 | if(ENABLE_DVDCSS) | ||
| 244 | list(APPEND LIBDVD_LIBRARIES ${DVDCSS_LIBRARY}) | ||
| 245 | endif() | ||
| 246 | set(LIBDVD_LIBRARIES ${LIBDVD_LIBRARIES} CACHE STRING "libdvd libraries" FORCE) | ||
| 247 | set(LIBDVD_FOUND 1 CACHE BOOL "libdvd found" FORCE) | ||
| 248 | endif() \ No newline at end of file | ||
diff --git a/cmake/modules/FindMDNS.cmake b/cmake/modules/FindMDNS.cmake index c001f7b..9294708 100644 --- a/cmake/modules/FindMDNS.cmake +++ b/cmake/modules/FindMDNS.cmake | |||
| @@ -26,9 +26,9 @@ find_package_handle_standard_args(MDNS | |||
| 26 | if(MDNS_FOUND) | 26 | if(MDNS_FOUND) |
| 27 | set(MDNS_INCLUDE_DIRS ${MDNS_INCLUDE_DIR}) | 27 | set(MDNS_INCLUDE_DIRS ${MDNS_INCLUDE_DIR}) |
| 28 | set(MDNS_LIBRARIES ${MDNS_LIBRARY}) | 28 | set(MDNS_LIBRARIES ${MDNS_LIBRARY}) |
| 29 | set(MDNS_DEFINITIONS -DHAVE_LIBMDNS=1) | 29 | set(MDNS_DEFINITIONS -DHAS_MDNS=1 -DHAS_ZEROCONF=1) |
| 30 | if(MDNS_EMBEDDED_INCLUDE_DIR) | 30 | if(MDNS_EMBEDDED_INCLUDE_DIR) |
| 31 | list(APPEND MDNS_DEFINITIONS -DHAVE_LIBMDNSEMBEDDED=1) | 31 | list(APPEND MDNS_DEFINITIONS -DHAS_MDNS_EMBEDDED=1) |
| 32 | endif() | 32 | endif() |
| 33 | 33 | ||
| 34 | if(NOT TARGET MDNS::MDNS) | 34 | if(NOT TARGET MDNS::MDNS) |
| @@ -36,10 +36,10 @@ if(MDNS_FOUND) | |||
| 36 | set_target_properties(MDNS::MDNS PROPERTIES | 36 | set_target_properties(MDNS::MDNS PROPERTIES |
| 37 | IMPORTED_LOCATION "${MDNS_LIBRARY}" | 37 | IMPORTED_LOCATION "${MDNS_LIBRARY}" |
| 38 | INTERFACE_INCLUDE_DIRECTORIES "${MDNS_INCLUDE_DIR}" | 38 | INTERFACE_INCLUDE_DIRECTORIES "${MDNS_INCLUDE_DIR}" |
| 39 | INTERFACE_COMPILE_DEFINITIONS HAVE_LIBMDNS=1) | 39 | INTERFACE_COMPILE_DEFINITIONS HAS_MDNS=1) |
| 40 | if(MDNS_EMBEDDED_INCLUDE_DIR) | 40 | if(MDNS_EMBEDDED_INCLUDE_DIR) |
| 41 | set_target_properties(MDNS::MDNS PROPERTIES | 41 | set_target_properties(MDNS::MDNS PROPERTIES |
| 42 | INTERFACE_COMPILE_DEFINITIONS HAVE_LIBMDNSEMBEDDED=1) | 42 | INTERFACE_COMPILE_DEFINITIONS HAS_MDNS_EMBEDDED=1) |
| 43 | endif() | 43 | endif() |
| 44 | endif() | 44 | endif() |
| 45 | endif() | 45 | endif() |
diff --git a/cmake/modules/FindMicroHttpd.cmake b/cmake/modules/FindMicroHttpd.cmake index 8eecbc4..232f8e5 100644 --- a/cmake/modules/FindMicroHttpd.cmake +++ b/cmake/modules/FindMicroHttpd.cmake | |||
| @@ -33,7 +33,7 @@ find_package_handle_standard_args(MicroHttpd | |||
| 33 | if(MICROHTTPD_FOUND) | 33 | if(MICROHTTPD_FOUND) |
| 34 | set(MICROHTTPD_LIBRARIES ${MICROHTTPD_LIBRARY}) | 34 | set(MICROHTTPD_LIBRARIES ${MICROHTTPD_LIBRARY}) |
| 35 | set(MICROHTTPD_INCLUDE_DIRS ${MICROHTTPD_INCLUDE_DIR}) | 35 | set(MICROHTTPD_INCLUDE_DIRS ${MICROHTTPD_INCLUDE_DIR}) |
| 36 | set(MICROHTTPD_DEFINITIONS -DHAVE_LIBMICROHTTPD=1) | 36 | set(MICROHTTPD_DEFINITIONS -DHAS_WEB_SERVER=1 -DHAS_WEB_INTERFACE=1) |
| 37 | 37 | ||
| 38 | if(KODI_DEPENDSBUILD AND NOT WIN32) | 38 | if(KODI_DEPENDSBUILD AND NOT WIN32) |
| 39 | find_library(GCRYPT_LIBRARY gcrypt) | 39 | find_library(GCRYPT_LIBRARY gcrypt) |
diff --git a/cmake/modules/FindMySqlClient.cmake b/cmake/modules/FindMySqlClient.cmake index 7b48577..50db582 100644 --- a/cmake/modules/FindMySqlClient.cmake +++ b/cmake/modules/FindMySqlClient.cmake | |||
| @@ -46,7 +46,7 @@ find_package_handle_standard_args(MySqlClient | |||
| 46 | if(MYSQLCLIENT_FOUND) | 46 | if(MYSQLCLIENT_FOUND) |
| 47 | set(MYSQLCLIENT_LIBRARIES ${MYSQLCLIENT_LIBRARY}) | 47 | set(MYSQLCLIENT_LIBRARIES ${MYSQLCLIENT_LIBRARY}) |
| 48 | set(MYSQLCLIENT_INCLUDE_DIRS ${MYSQLCLIENT_INCLUDE_DIR}) | 48 | set(MYSQLCLIENT_INCLUDE_DIRS ${MYSQLCLIENT_INCLUDE_DIR}) |
| 49 | set(MYSQLCLIENT_DEFINITIONS -DHAVE_MYSQL=1) | 49 | set(MYSQLCLIENT_DEFINITIONS -DHAS_MYSQL=1) |
| 50 | 50 | ||
| 51 | if(NOT TARGET MySqlClient::MySqlClient) | 51 | if(NOT TARGET MySqlClient::MySqlClient) |
| 52 | add_library(MySqlClient::MySqlClient UNKNOWN IMPORTED) | 52 | add_library(MySqlClient::MySqlClient UNKNOWN IMPORTED) |
| @@ -62,7 +62,7 @@ if(MYSQLCLIENT_FOUND) | |||
| 62 | endif() | 62 | endif() |
| 63 | set_target_properties(MySqlClient::MySqlClient PROPERTIES | 63 | set_target_properties(MySqlClient::MySqlClient PROPERTIES |
| 64 | INTERFACE_INCLUDE_DIRECTORIES "${MYSQLCLIENT_INCLUDE_DIR}" | 64 | INTERFACE_INCLUDE_DIRECTORIES "${MYSQLCLIENT_INCLUDE_DIR}" |
| 65 | INTERFACE_COMPILE_DEFINITIONS HAVE_MYSQL=1) | 65 | INTERFACE_COMPILE_DEFINITIONS HAS_MYSQL=1) |
| 66 | endif() | 66 | endif() |
| 67 | endif() | 67 | endif() |
| 68 | 68 | ||
diff --git a/cmake/modules/FindNFS.cmake b/cmake/modules/FindNFS.cmake index 646ee33..b304bf3 100644 --- a/cmake/modules/FindNFS.cmake +++ b/cmake/modules/FindNFS.cmake | |||
| @@ -41,7 +41,7 @@ endif() | |||
| 41 | if(NFS_FOUND) | 41 | if(NFS_FOUND) |
| 42 | set(NFS_LIBRARIES ${NFS_LIBRARY}) | 42 | set(NFS_LIBRARIES ${NFS_LIBRARY}) |
| 43 | set(NFS_INCLUDE_DIRS ${NFS_INCLUDE_DIR}) | 43 | set(NFS_INCLUDE_DIRS ${NFS_INCLUDE_DIR}) |
| 44 | set(NFS_DEFINITIONS -DHAVE_LIBNFS=1) | 44 | set(NFS_DEFINITIONS -DHAS_FILESYSTEM_NFS=1) |
| 45 | 45 | ||
| 46 | if(NOT TARGET NFS::NFS) | 46 | if(NOT TARGET NFS::NFS) |
| 47 | add_library(NFS::NFS UNKNOWN IMPORTED) | 47 | add_library(NFS::NFS UNKNOWN IMPORTED) |
| @@ -51,7 +51,7 @@ if(NFS_FOUND) | |||
| 51 | endif() | 51 | endif() |
| 52 | set_target_properties(NFS::NFS PROPERTIES | 52 | set_target_properties(NFS::NFS PROPERTIES |
| 53 | INTERFACE_INCLUDE_DIRECTORIES "${NFS_INCLUDE_DIR}" | 53 | INTERFACE_INCLUDE_DIRECTORIES "${NFS_INCLUDE_DIR}" |
| 54 | INTERFACE_COMPILE_DEFINITIONS HAVE_LIBNFS=1) | 54 | INTERFACE_COMPILE_DEFINITIONS HAS_FILESYSTEM_NFS=1) |
| 55 | endif() | 55 | endif() |
| 56 | endif() | 56 | endif() |
| 57 | 57 | ||
diff --git a/cmake/modules/FindOpenGLES.cmake b/cmake/modules/FindOpenGLES.cmake index 4333a69..fac21bc 100644 --- a/cmake/modules/FindOpenGLES.cmake +++ b/cmake/modules/FindOpenGLES.cmake | |||
| @@ -10,14 +10,18 @@ | |||
| 10 | # OPENGLES_LIBRARIES - the OpenGLES libraries | 10 | # OPENGLES_LIBRARIES - the OpenGLES libraries |
| 11 | # OPENGLES_DEFINITIONS - the OpenGLES definitions | 11 | # OPENGLES_DEFINITIONS - the OpenGLES definitions |
| 12 | 12 | ||
| 13 | if(CORE_PLATFORM_NAME_LC STREQUAL rbpi) | ||
| 14 | set(_brcmprefix brcm) | ||
| 15 | endif() | ||
| 16 | |||
| 13 | if(PKG_CONFIG_FOUND) | 17 | if(PKG_CONFIG_FOUND) |
| 14 | pkg_check_modules(PC_OPENGLES glesv2 QUIET) | 18 | pkg_check_modules(PC_OPENGLES ${_brcmprefix}glesv2 QUIET) |
| 15 | endif() | 19 | endif() |
| 16 | 20 | ||
| 17 | if(NOT CORE_SYSTEM_NAME STREQUAL ios) | 21 | if(NOT CORE_SYSTEM_NAME STREQUAL ios) |
| 18 | find_path(OPENGLES_INCLUDE_DIR GLES2/gl2.h | 22 | find_path(OPENGLES_INCLUDE_DIR GLES2/gl2.h |
| 19 | PATHS ${PC_OPENGLES_INCLUDEDIR}) | 23 | PATHS ${PC_OPENGLES_INCLUDEDIR}) |
| 20 | find_library(OPENGLES_gl_LIBRARY NAMES GLESv2 | 24 | find_library(OPENGLES_gl_LIBRARY NAMES ${_brcmprefix}GLESv2 |
| 21 | PATHS ${PC_OPENGLES_LIBDIR}) | 25 | PATHS ${PC_OPENGLES_LIBDIR}) |
| 22 | else() | 26 | else() |
| 23 | find_library(OPENGLES_gl_LIBRARY NAMES OpenGLES | 27 | find_library(OPENGLES_gl_LIBRARY NAMES OpenGLES |
| @@ -27,14 +31,24 @@ else() | |||
| 27 | set(OPENGLES_INCLUDE_DIR ${OPENGLES_gl_LIBRARY}/Headers) | 31 | set(OPENGLES_INCLUDE_DIR ${OPENGLES_gl_LIBRARY}/Headers) |
| 28 | endif() | 32 | endif() |
| 29 | 33 | ||
| 34 | find_path(OPENGLES3_INCLUDE_DIR GLES3/gl3.h) | ||
| 35 | |||
| 30 | include(FindPackageHandleStandardArgs) | 36 | include(FindPackageHandleStandardArgs) |
| 31 | find_package_handle_standard_args(OpenGLES | 37 | find_package_handle_standard_args(OpenGLES |
| 32 | REQUIRED_VARS OPENGLES_gl_LIBRARY OPENGLES_INCLUDE_DIR) | 38 | REQUIRED_VARS OPENGLES_gl_LIBRARY OPENGLES_INCLUDE_DIR) |
| 33 | 39 | ||
| 40 | find_path(OPENGLES3_INCLUDE_DIR GLES3/gl3.h | ||
| 41 | PATHS ${PC_OPENGLES_INCLUDEDIR}) | ||
| 42 | |||
| 34 | if(OPENGLES_FOUND) | 43 | if(OPENGLES_FOUND) |
| 35 | set(OPENGLES_INCLUDE_DIRS ${OPENGLES_INCLUDE_DIR}) | ||
| 36 | set(OPENGLES_LIBRARIES ${OPENGLES_gl_LIBRARY}) | 44 | set(OPENGLES_LIBRARIES ${OPENGLES_gl_LIBRARY}) |
| 37 | set(OPENGLES_DEFINITIONS -DHAVE_LIBGLESV2) | 45 | if(OPENGLES3_INCLUDE_DIR) |
| 46 | set(OPENGLES_INCLUDE_DIRS ${OPENGLES_INCLUDE_DIR} ${OPENGLES3_INCLUDE_DIR}) | ||
| 47 | set(OPENGLES_DEFINITIONS -DHAS_GLES=3) | ||
| 48 | mark_as_advanced(OPENGLES_INCLUDE_DIR OPENGLES3_INCLUDE_DIR OPENGLES_gl_LIBRARY) | ||
| 49 | else() | ||
| 50 | set(OPENGLES_INCLUDE_DIRS ${OPENGLES_INCLUDE_DIR}) | ||
| 51 | set(OPENGLES_DEFINITIONS -DHAS_GLES=2) | ||
| 52 | mark_as_advanced(OPENGLES_INCLUDE_DIR OPENGLES_gl_LIBRARY) | ||
| 53 | endif() | ||
| 38 | endif() | 54 | endif() |
| 39 | |||
| 40 | mark_as_advanced(OPENGLES_INCLUDE_DIR OPENGLES_gl_LIBRARY) | ||
diff --git a/cmake/modules/FindOpenGLES3.cmake b/cmake/modules/FindOpenGLES3.cmake deleted file mode 100644 index 394328d..0000000 --- a/cmake/modules/FindOpenGLES3.cmake +++ /dev/null | |||
| @@ -1,24 +0,0 @@ | |||
| 1 | #.rst: | ||
| 2 | # FindOpenGLES3 | ||
| 3 | # ------------ | ||
| 4 | # Finds the OpenGLES3 library | ||
| 5 | # | ||
| 6 | # This will will define the following variables:: | ||
| 7 | # | ||
| 8 | # OPENGLES3_FOUND - system has OpenGLES3 | ||
| 9 | # OPENGLES3_INCLUDE_DIRS - the OpenGLES3 include directory | ||
| 10 | # OPENGLES3_DEFINITIONS - the OpenGLES3 definitions | ||
| 11 | |||
| 12 | |||
| 13 | find_path(OPENGLES3_INCLUDE_DIR GLES3/gl3.h) | ||
| 14 | |||
| 15 | include(FindPackageHandleStandardArgs) | ||
| 16 | find_package_handle_standard_args(OpenGLES3 | ||
| 17 | REQUIRED_VARS OPENGLES3_INCLUDE_DIR) | ||
| 18 | |||
| 19 | if(OPENGLES3_FOUND) | ||
| 20 | set(OPENGLES3_INCLUDE_DIRS ${OPENGLES3_INCLUDE_DIR}) | ||
| 21 | set(OPENGLES3_DEFINITIONS -DHAVE_LIBGLESV3) | ||
| 22 | endif() | ||
| 23 | |||
| 24 | mark_as_advanced(OPENGLES3_INCLUDE_DIR) | ||
diff --git a/cmake/modules/FindOpenGl.cmake b/cmake/modules/FindOpenGl.cmake index b8cff79..af1c433 100644 --- a/cmake/modules/FindOpenGl.cmake +++ b/cmake/modules/FindOpenGl.cmake | |||
| @@ -37,7 +37,7 @@ find_package_handle_standard_args(OpenGl | |||
| 37 | if(OPENGL_FOUND) | 37 | if(OPENGL_FOUND) |
| 38 | set(OPENGL_INCLUDE_DIRS ${OPENGL_INCLUDE_DIR}) | 38 | set(OPENGL_INCLUDE_DIRS ${OPENGL_INCLUDE_DIR}) |
| 39 | set(OPENGL_LIBRARIES ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY}) | 39 | set(OPENGL_LIBRARIES ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY}) |
| 40 | set(OPENGL_DEFINITIONS -DHAVE_LIBGL=1) | 40 | set(OPENGL_DEFINITIONS -DHAS_GL=1) |
| 41 | endif() | 41 | endif() |
| 42 | 42 | ||
| 43 | mark_as_advanced(OPENGL_INCLUDE_DIR OPENGL_gl_LIBRARY OPENGL_glu_LIBRARY) | 43 | mark_as_advanced(OPENGL_INCLUDE_DIR OPENGL_gl_LIBRARY OPENGL_glu_LIBRARY) |
diff --git a/cmake/modules/FindPlist.cmake b/cmake/modules/FindPlist.cmake index 862da46..0664c10 100644 --- a/cmake/modules/FindPlist.cmake +++ b/cmake/modules/FindPlist.cmake | |||
| @@ -41,7 +41,7 @@ endif() | |||
| 41 | if(PLIST_FOUND) | 41 | if(PLIST_FOUND) |
| 42 | set(PLIST_LIBRARIES ${PLIST_LIBRARY}) | 42 | set(PLIST_LIBRARIES ${PLIST_LIBRARY}) |
| 43 | set(PLIST_INCLUDE_DIRS ${PLIST_INCLUDE_DIR}) | 43 | set(PLIST_INCLUDE_DIRS ${PLIST_INCLUDE_DIR}) |
| 44 | set(PLIST_DEFINITIONS -DHAVE_LIBPLIST=1) | 44 | set(PLIST_DEFINITIONS -DHAS_AIRPLAY=1) |
| 45 | 45 | ||
| 46 | if(NOT TARGET Plist::Plist) | 46 | if(NOT TARGET Plist::Plist) |
| 47 | add_library(Plist::Plist UNKNOWN IMPORTED) | 47 | add_library(Plist::Plist UNKNOWN IMPORTED) |
| @@ -51,7 +51,7 @@ if(PLIST_FOUND) | |||
| 51 | endif() | 51 | endif() |
| 52 | set_target_properties(Plist::Plist PROPERTIES | 52 | set_target_properties(Plist::Plist PROPERTIES |
| 53 | INTERFACE_INCLUDE_DIRECTORIES "${PLIST_INCLUDE_DIR}" | 53 | INTERFACE_INCLUDE_DIRECTORIES "${PLIST_INCLUDE_DIR}" |
| 54 | INTERFACE_COMPILE_DEFINITIONS HAVE_LIBPLIST=1) | 54 | INTERFACE_COMPILE_DEFINITIONS HAS_AIRPLAY=1) |
| 55 | endif() | 55 | endif() |
| 56 | endif() | 56 | endif() |
| 57 | 57 | ||
diff --git a/cmake/modules/FindPulseAudio.cmake b/cmake/modules/FindPulseAudio.cmake index 5761005..2ef7910 100644 --- a/cmake/modules/FindPulseAudio.cmake +++ b/cmake/modules/FindPulseAudio.cmake | |||
| @@ -21,14 +21,18 @@ endif() | |||
| 21 | if(PKG_CONFIG_FOUND) | 21 | if(PKG_CONFIG_FOUND) |
| 22 | pkg_check_modules(PC_PULSEAUDIO libpulse>=${PulseAudio_FIND_VERSION} QUIET) | 22 | pkg_check_modules(PC_PULSEAUDIO libpulse>=${PulseAudio_FIND_VERSION} QUIET) |
| 23 | pkg_check_modules(PC_PULSEAUDIO_MAINLOOP libpulse-mainloop-glib QUIET) | 23 | pkg_check_modules(PC_PULSEAUDIO_MAINLOOP libpulse-mainloop-glib QUIET) |
| 24 | pkg_check_modules(PC_PULSEAUDIO_SIMPLE libpulse-simple QUIET) | ||
| 24 | endif() | 25 | endif() |
| 25 | 26 | ||
| 26 | find_path(PULSEAUDIO_INCLUDE_DIR NAMES pulse/pulseaudio.h | 27 | find_path(PULSEAUDIO_INCLUDE_DIR NAMES pulse/pulseaudio.h pulse/simple.h |
| 27 | PATHS ${PC_PULSEAUDIO_INCLUDEDIR} ${PC_PULSEAUDIO_INCLUDE_DIRS}) | 28 | PATHS ${PC_PULSEAUDIO_INCLUDEDIR} ${PC_PULSEAUDIO_INCLUDE_DIRS}) |
| 28 | 29 | ||
| 29 | find_library(PULSEAUDIO_LIBRARY NAMES pulse libpulse | 30 | find_library(PULSEAUDIO_LIBRARY NAMES pulse libpulse |
| 30 | PATHS ${PC_PULSEAUDIO_LIBDIR} ${PC_PULSEAUDIO_LIBRARY_DIRS}) | 31 | PATHS ${PC_PULSEAUDIO_LIBDIR} ${PC_PULSEAUDIO_LIBRARY_DIRS}) |
| 31 | 32 | ||
| 33 | find_library(PULSEAUDIO_SIMPLE_LIBRARY NAMES pulse-simple libpulse-simple | ||
| 34 | PATHS ${PC_PULSEAUDIO_LIBDIR} ${PC_PULSEAUDIO_LIBRARY_DIRS}) | ||
| 35 | |||
| 32 | find_library(PULSEAUDIO_MAINLOOP_LIBRARY NAMES pulse-mainloop pulse-mainloop-glib libpulse-mainloop-glib | 36 | find_library(PULSEAUDIO_MAINLOOP_LIBRARY NAMES pulse-mainloop pulse-mainloop-glib libpulse-mainloop-glib |
| 33 | PATHS ${PC_PULSEAUDIO_LIBDIR} ${PC_PULSEAUDIO_LIBRARY_DIRS}) | 37 | PATHS ${PC_PULSEAUDIO_LIBDIR} ${PC_PULSEAUDIO_LIBRARY_DIRS}) |
| 34 | 38 | ||
| @@ -42,13 +46,13 @@ endif() | |||
| 42 | 46 | ||
| 43 | include(FindPackageHandleStandardArgs) | 47 | include(FindPackageHandleStandardArgs) |
| 44 | find_package_handle_standard_args(PulseAudio | 48 | find_package_handle_standard_args(PulseAudio |
| 45 | REQUIRED_VARS PULSEAUDIO_LIBRARY PULSEAUDIO_MAINLOOP_LIBRARY PULSEAUDIO_INCLUDE_DIR | 49 | REQUIRED_VARS PULSEAUDIO_LIBRARY PULSEAUDIO_MAINLOOP_LIBRARY PULSEAUDIO_SIMPLE_LIBRARY PULSEAUDIO_INCLUDE_DIR |
| 46 | VERSION_VAR PULSEAUDIO_VERSION_STRING) | 50 | VERSION_VAR PULSEAUDIO_VERSION_STRING) |
| 47 | 51 | ||
| 48 | if(PULSEAUDIO_FOUND) | 52 | if(PULSEAUDIO_FOUND) |
| 49 | set(PULSEAUDIO_INCLUDE_DIRS ${PULSEAUDIO_INCLUDE_DIR}) | 53 | set(PULSEAUDIO_INCLUDE_DIRS ${PULSEAUDIO_INCLUDE_DIR}) |
| 50 | set(PULSEAUDIO_LIBRARIES ${PULSEAUDIO_LIBRARY} ${PULSEAUDIO_MAINLOOP_LIBRARY}) | 54 | set(PULSEAUDIO_LIBRARIES ${PULSEAUDIO_LIBRARY} ${PULSEAUDIO_MAINLOOP_LIBRARY} ${PULSEAUDIO_SIMPLE_LIBRARY}) |
| 51 | set(PULSEAUDIO_DEFINITIONS -DHAVE_LIBPULSE=1) | 55 | set(PULSEAUDIO_DEFINITIONS -DHAS_PULSEAUDIO=1) |
| 52 | 56 | ||
| 53 | if(NOT TARGET PulseAudio::PulseAudioMainloop) | 57 | if(NOT TARGET PulseAudio::PulseAudioMainloop) |
| 54 | add_library(PulseAudio::PulseAudioMainloop UNKNOWN IMPORTED) | 58 | add_library(PulseAudio::PulseAudioMainloop UNKNOWN IMPORTED) |
| @@ -65,4 +69,4 @@ if(PULSEAUDIO_FOUND) | |||
| 65 | endif() | 69 | endif() |
| 66 | endif() | 70 | endif() |
| 67 | 71 | ||
| 68 | mark_as_advanced(PULSEAUDIO_INCLUDE_DIR PULSEAUDIO_LIBRARY PULSEAUDIO_MAINLOOP_LIBRARY) | 72 | mark_as_advanced(PULSEAUDIO_INCLUDE_DIR PULSEAUDIO_LIBRARY PULSEAUDIO_MAINLOOP_LIBRARY PULSEAUDIO_SIMPLE_LIBRARY) |
diff --git a/cmake/modules/FindRapidJSON.cmake b/cmake/modules/FindRapidJSON.cmake index 3c3dc3f..a21ed0b 100644 --- a/cmake/modules/FindRapidJSON.cmake +++ b/cmake/modules/FindRapidJSON.cmake | |||
| @@ -10,7 +10,7 @@ | |||
| 10 | # | 10 | # |
| 11 | if(ENABLE_INTERNAL_RapidJSON) | 11 | if(ENABLE_INTERNAL_RapidJSON) |
| 12 | include(ExternalProject) | 12 | include(ExternalProject) |
| 13 | file(STRINGS ${CMAKE_SOURCE_DIR}/tools/depends/target/rapidjson/Makefile VER REGEX MATCH "^[ ]*VERSION[ ]*=.+$") | 13 | file(STRINGS ${CMAKE_SOURCE_DIR}/tools/depends/target/rapidjson/Makefile VER REGEX "^[ ]*VERSION[ ]*=.+$") |
| 14 | string(REGEX REPLACE "^[ ]*VERSION[ ]*=[ ]*" "" RJSON_VER "${VER}") | 14 | string(REGEX REPLACE "^[ ]*VERSION[ ]*=[ ]*" "" RJSON_VER "${VER}") |
| 15 | 15 | ||
| 16 | # allow user to override the download URL with a local tarball | 16 | # allow user to override the download URL with a local tarball |
| @@ -36,6 +36,10 @@ if(ENABLE_INTERNAL_RapidJSON) | |||
| 36 | PREFIX ${CORE_BUILD_DIR}/rapidjson | 36 | PREFIX ${CORE_BUILD_DIR}/rapidjson |
| 37 | CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR} | 37 | CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR} |
| 38 | -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} | 38 | -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} |
| 39 | -DRAPIDJSON_BUILD_DOC=OFF | ||
| 40 | -DRAPIDJSON_BUILD_EXAMPLES=OFF | ||
| 41 | -DRAPIDJSON_BUILD_TESTS=OFF | ||
| 42 | -DRAPIDJSON_BUILD_THIRDPARTY_GTEST=OFF | ||
| 39 | "${EXTRA_ARGS}" | 43 | "${EXTRA_ARGS}" |
| 40 | PATCH_COMMAND patch -p1 < ${CORE_SOURCE_DIR}/tools/depends/target/rapidjson/0001-remove_custom_cxx_flags.patch | 44 | PATCH_COMMAND patch -p1 < ${CORE_SOURCE_DIR}/tools/depends/target/rapidjson/0001-remove_custom_cxx_flags.patch |
| 41 | BUILD_BYPRODUCTS ${RapidJSON_LIBRARY}) | 45 | BUILD_BYPRODUCTS ${RapidJSON_LIBRARY}) |
diff --git a/cmake/modules/FindSSE.cmake b/cmake/modules/FindSSE.cmake index d001b03..b860dca 100644 --- a/cmake/modules/FindSSE.cmake +++ b/cmake/modules/FindSSE.cmake | |||
| @@ -40,6 +40,41 @@ if(CMAKE_SYSTEM_NAME MATCHES "Linux") | |||
| 40 | string(COMPARE EQUAL "avx2" "${_SSE_THERE}" _AVX2_TRUE) | 40 | string(COMPARE EQUAL "avx2" "${_SSE_THERE}" _AVX2_TRUE) |
| 41 | CHECK_CXX_ACCEPTS_FLAG("-mavx2" _AVX2_OK) | 41 | CHECK_CXX_ACCEPTS_FLAG("-mavx2" _AVX2_OK) |
| 42 | endif() | 42 | endif() |
| 43 | elseif(CMAKE_SYSTEM_NAME MATCHES "FreeBSD") | ||
| 44 | if(CPU MATCHES "amd64" OR CPU MATCHES "i.86") | ||
| 45 | exec_program(cat ARGS "/var/run/dmesg.boot | grep Features" OUTPUT_VARIABLE CPUINFO) | ||
| 46 | |||
| 47 | string(REGEX REPLACE "^.*(SSE).*$" "\\1" _SSE_THERE ${CPUINFO}) | ||
| 48 | string(COMPARE EQUAL "SSE" "${_SSE_THERE}" _SSE_TRUE) | ||
| 49 | CHECK_CXX_ACCEPTS_FLAG("-msse" _SSE_OK) | ||
| 50 | |||
| 51 | string(REGEX REPLACE "^.*(SSE2).*$" "\\1" _SSE_THERE ${CPUINFO}) | ||
| 52 | string(COMPARE EQUAL "SSE2" "${_SSE_THERE}" _SSE2_TRUE) | ||
| 53 | CHECK_CXX_ACCEPTS_FLAG("-msse2" _SSE2_OK) | ||
| 54 | |||
| 55 | string(REGEX REPLACE "^.*(SSE3).*$" "\\1" _SSE_THERE ${CPUINFO}) | ||
| 56 | string(COMPARE EQUAL "SSE3" "${_SSE_THERE}" _SSE3_TRUE) | ||
| 57 | CHECK_CXX_ACCEPTS_FLAG("-msse3" _SSE3_OK) | ||
| 58 | |||
| 59 | string(REGEX REPLACE "^.*(SSSE3).*$" "\\1" _SSE_THERE ${CPUINFO}) | ||
| 60 | string(COMPARE EQUAL "SSSE3" "${_SSE_THERE}" _SSSE3_TRUE) | ||
| 61 | CHECK_CXX_ACCEPTS_FLAG("-mssse3" _SSSE3_OK) | ||
| 62 | |||
| 63 | string(REGEX REPLACE "^.*(SSE4.1).*$" "\\1" _SSE_THERE ${CPUINFO}) | ||
| 64 | string(COMPARE EQUAL "SSE4.1" "${_SSE_THERE}" _SSE41_TRUE) | ||
| 65 | CHECK_CXX_ACCEPTS_FLAG("-msse4.1" _SSE41_OK) | ||
| 66 | string(REGEX REPLACE "^.*(SSE4.2).*$" "\\1" _SSE_THERE ${CPUINFO}) | ||
| 67 | string(COMPARE EQUAL "SSE4.2" "${_SSE_THERE}" _SSE42_TRUE) | ||
| 68 | CHECK_CXX_ACCEPTS_FLAG("-msse4.2" _SSE42_OK) | ||
| 69 | |||
| 70 | string(REGEX REPLACE "^.*(AVX).*$" "\\1" _SSE_THERE ${CPUINFO}) | ||
| 71 | string(COMPARE EQUAL "AVX" "${_SSE_THERE}" _AVX_TRUE) | ||
| 72 | CHECK_CXX_ACCEPTS_FLAG("-mavx" _AVX_OK) | ||
| 73 | |||
| 74 | string(REGEX REPLACE "^.*(AVX2).*$" "\\1" _SSE_THERE ${CPUINFO}) | ||
| 75 | string(COMPARE EQUAL "AVX2" "${_SSE_THERE}" _AVX2_TRUE) | ||
| 76 | CHECK_CXX_ACCEPTS_FLAG("-mavx2" _AVX2_OK) | ||
| 77 | endif() | ||
| 43 | elseif(CMAKE_SYSTEM_NAME MATCHES "Android") | 78 | elseif(CMAKE_SYSTEM_NAME MATCHES "Android") |
| 44 | if(CPU MATCHES "x86_64" OR CPU MATCHES "i.86") | 79 | if(CPU MATCHES "x86_64" OR CPU MATCHES "i.86") |
| 45 | set(_SSE_TRUE TRUE) | 80 | set(_SSE_TRUE TRUE) |
| @@ -94,10 +129,12 @@ elseif(CMAKE_SYSTEM_NAME MATCHES "Darwin") | |||
| 94 | endif() | 129 | endif() |
| 95 | elseif(CMAKE_SYSTEM_NAME MATCHES "Windows") | 130 | elseif(CMAKE_SYSTEM_NAME MATCHES "Windows") |
| 96 | # TODO | 131 | # TODO |
| 97 | set(_SSE_TRUE true) | 132 | if(ARCH STREQUAL win32 OR ARCH STREQUAL x64) |
| 98 | set(_SSE_OK true) | 133 | set(_SSE_TRUE true) |
| 99 | set(_SSE2_TRUE true) | 134 | set(_SSE_OK true) |
| 100 | set(_SSE2_OK true) | 135 | set(_SSE2_TRUE true) |
| 136 | set(_SSE2_OK true) | ||
| 137 | endif() | ||
| 101 | endif() | 138 | endif() |
| 102 | 139 | ||
| 103 | include(FindPackageHandleStandardArgs) | 140 | include(FindPackageHandleStandardArgs) |
diff --git a/cmake/modules/FindSSH.cmake b/cmake/modules/FindSSH.cmake index 538c699..ee65210 100644 --- a/cmake/modules/FindSSH.cmake +++ b/cmake/modules/FindSSH.cmake | |||
| @@ -33,14 +33,14 @@ find_package_handle_standard_args(SSH | |||
| 33 | if(SSH_FOUND) | 33 | if(SSH_FOUND) |
| 34 | set(SSH_LIBRARIES ${SSH_LIBRARY}) | 34 | set(SSH_LIBRARIES ${SSH_LIBRARY}) |
| 35 | set(SSH_INCLUDE_DIRS ${SSH_INCLUDE_DIR}) | 35 | set(SSH_INCLUDE_DIRS ${SSH_INCLUDE_DIR}) |
| 36 | set(SSH_DEFINITIONS -DHAVE_LIBSSH=1) | 36 | set(SSH_DEFINITIONS -DHAS_FILESYSTEM_SFTP=1) |
| 37 | 37 | ||
| 38 | if(NOT TARGET SSH::SSH) | 38 | if(NOT TARGET SSH::SSH) |
| 39 | add_library(SSH::SSH UNKNOWN IMPORTED) | 39 | add_library(SSH::SSH UNKNOWN IMPORTED) |
| 40 | set_target_properties(SSH::SSH PROPERTIES | 40 | set_target_properties(SSH::SSH PROPERTIES |
| 41 | IMPORTED_LOCATION "${SSH_LIBRARY}" | 41 | IMPORTED_LOCATION "${SSH_LIBRARY}" |
| 42 | INTERFACE_INCLUDE_DIRECTORIES "${SSH_INCLUDE_DIR}" | 42 | INTERFACE_INCLUDE_DIRECTORIES "${SSH_INCLUDE_DIR}" |
| 43 | INTERFACE_COMPILE_DEFINITIONS HAVE_LIBSSH=1) | 43 | INTERFACE_COMPILE_DEFINITIONS HAS_FILESYSTEM_SFTP=1) |
| 44 | endif() | 44 | endif() |
| 45 | endif() | 45 | endif() |
| 46 | 46 | ||
diff --git a/cmake/modules/FindShairplay.cmake b/cmake/modules/FindShairplay.cmake index 87d3107..699fb7a 100644 --- a/cmake/modules/FindShairplay.cmake +++ b/cmake/modules/FindShairplay.cmake | |||
| @@ -46,7 +46,7 @@ endif() | |||
| 46 | if(SHAIRPLAY_FOUND) | 46 | if(SHAIRPLAY_FOUND) |
| 47 | set(SHAIRPLAY_LIBRARIES ${SHAIRPLAY_LIBRARY}) | 47 | set(SHAIRPLAY_LIBRARIES ${SHAIRPLAY_LIBRARY}) |
| 48 | set(SHAIRPLAY_INCLUDE_DIRS ${SHAIRPLAY_INCLUDE_DIR}) | 48 | set(SHAIRPLAY_INCLUDE_DIRS ${SHAIRPLAY_INCLUDE_DIR}) |
| 49 | set(SHAIRPLAY_DEFINITIONS -DHAVE_LIBSHAIRPLAY=1) | 49 | set(SHAIRPLAY_DEFINITIONS -DHAS_AIRTUNES=1) |
| 50 | 50 | ||
| 51 | if(NOT TARGET Shairplay::Shairplay) | 51 | if(NOT TARGET Shairplay::Shairplay) |
| 52 | add_library(Shairplay::Shairplay UNKNOWN IMPORTED) | 52 | add_library(Shairplay::Shairplay UNKNOWN IMPORTED) |
| @@ -56,7 +56,7 @@ if(SHAIRPLAY_FOUND) | |||
| 56 | endif() | 56 | endif() |
| 57 | set_target_properties(Shairplay::Shairplay PROPERTIES | 57 | set_target_properties(Shairplay::Shairplay PROPERTIES |
| 58 | INTERFACE_INCLUDE_DIRECTORIES "${SHAIRPLAY_INCLUDE_DIR}" | 58 | INTERFACE_INCLUDE_DIRECTORIES "${SHAIRPLAY_INCLUDE_DIR}" |
| 59 | INTERFACE_COMPILE_DEFINITIONS HAVE_LIBSHAIRPLAY=1) | 59 | INTERFACE_COMPILE_DEFINITIONS HAS_AIRTUNES=1) |
| 60 | endif() | 60 | endif() |
| 61 | endif() | 61 | endif() |
| 62 | 62 | ||
diff --git a/cmake/modules/FindSmbClient.cmake b/cmake/modules/FindSmbClient.cmake index 6455cce..9a8b197 100644 --- a/cmake/modules/FindSmbClient.cmake +++ b/cmake/modules/FindSmbClient.cmake | |||
| @@ -33,14 +33,14 @@ find_package_handle_standard_args(SmbClient | |||
| 33 | if(SMBCLIENT_FOUND) | 33 | if(SMBCLIENT_FOUND) |
| 34 | set(SMBCLIENT_LIBRARIES ${SMBCLIENT_LIBRARY}) | 34 | set(SMBCLIENT_LIBRARIES ${SMBCLIENT_LIBRARY}) |
| 35 | set(SMBCLIENT_INCLUDE_DIRS ${SMBCLIENT_INCLUDE_DIR}) | 35 | set(SMBCLIENT_INCLUDE_DIRS ${SMBCLIENT_INCLUDE_DIR}) |
| 36 | set(SMBCLIENT_DEFINITIONS -DHAVE_LIBSMBCLIENT=1) | 36 | set(SMBCLIENT_DEFINITIONS -DHAS_FILESYSTEM_SMB=1) |
| 37 | 37 | ||
| 38 | if(NOT TARGET SmbClient::SmbClient) | 38 | if(NOT TARGET SmbClient::SmbClient) |
| 39 | add_library(SmbClient::SmbClient UNKNOWN IMPORTED) | 39 | add_library(SmbClient::SmbClient UNKNOWN IMPORTED) |
| 40 | set_target_properties(SmbClient::SmbClient PROPERTIES | 40 | set_target_properties(SmbClient::SmbClient PROPERTIES |
| 41 | IMPORTED_LOCATION "${SMBCLIENT_LIBRARY}" | 41 | IMPORTED_LOCATION "${SMBCLIENT_LIBRARY}" |
| 42 | INTERFACE_INCLUDE_DIRECTORIES "${SMBCLIENT_INCLUDE_DIR}" | 42 | INTERFACE_INCLUDE_DIRECTORIES "${SMBCLIENT_INCLUDE_DIR}" |
| 43 | INTERFACE_COMPILE_DEFINITIONS HAVE_LIBSMBCLIENT=1) | 43 | INTERFACE_COMPILE_DEFINITIONS HAS_FILESYSTEM_SMB=1) |
| 44 | endif() | 44 | endif() |
| 45 | endif() | 45 | endif() |
| 46 | 46 | ||
diff --git a/cmake/modules/FindSndio.cmake b/cmake/modules/FindSndio.cmake index 3dd53d9..5f08acd 100644 --- a/cmake/modules/FindSndio.cmake +++ b/cmake/modules/FindSndio.cmake | |||
| @@ -25,7 +25,7 @@ find_package_handle_standard_args(Sndio | |||
| 25 | if(SNDIO_FOUND) | 25 | if(SNDIO_FOUND) |
| 26 | set(SNDIO_INCLUDE_DIRS ${SNDIO_INCLUDE_DIR}) | 26 | set(SNDIO_INCLUDE_DIRS ${SNDIO_INCLUDE_DIR}) |
| 27 | set(SNDIO_LIBRARIES ${SNDIO_LIBRARY}) | 27 | set(SNDIO_LIBRARIES ${SNDIO_LIBRARY}) |
| 28 | set(SNDIO_DEFINITIONS -DHAVE_SNDIO=1) | 28 | set(SNDIO_DEFINITIONS -DHAS_SNDIO=1) |
| 29 | 29 | ||
| 30 | if(NOT TARGET Sndio::Sndio) | 30 | if(NOT TARGET Sndio::Sndio) |
| 31 | add_library(Sndio::Sndio UNKNOWN IMPORTED) | 31 | add_library(Sndio::Sndio UNKNOWN IMPORTED) |
| @@ -33,7 +33,7 @@ if(SNDIO_FOUND) | |||
| 33 | IMPORTED_LOCATION "${SNDIO_LIBRARY}" | 33 | IMPORTED_LOCATION "${SNDIO_LIBRARY}" |
| 34 | INTERFACE_INCLUDE_DIRECTORIES "${SNDIO_INCLUDE_DIR}") | 34 | INTERFACE_INCLUDE_DIRECTORIES "${SNDIO_INCLUDE_DIR}") |
| 35 | set_target_properties(Sndio::Sndio PROPERTIES | 35 | set_target_properties(Sndio::Sndio PROPERTIES |
| 36 | INTERFACE_COMPILE_DEFINITIONS -DHAVE_SNDIO=1) | 36 | INTERFACE_COMPILE_DEFINITIONS -DHAS_SNDIO=1) |
| 37 | endif() | 37 | endif() |
| 38 | endif() | 38 | endif() |
| 39 | 39 | ||
diff --git a/cmake/modules/FindTexturePacker.cmake b/cmake/modules/FindTexturePacker.cmake index aa6fd3a..874a8f6 100644 --- a/cmake/modules/FindTexturePacker.cmake +++ b/cmake/modules/FindTexturePacker.cmake | |||
| @@ -19,7 +19,7 @@ if(NOT TARGET TexturePacker::TexturePacker) | |||
| 19 | elseif(WIN32) | 19 | elseif(WIN32) |
| 20 | add_executable(TexturePacker::TexturePacker IMPORTED GLOBAL) | 20 | add_executable(TexturePacker::TexturePacker IMPORTED GLOBAL) |
| 21 | set_target_properties(TexturePacker::TexturePacker PROPERTIES | 21 | set_target_properties(TexturePacker::TexturePacker PROPERTIES |
| 22 | IMPORTED_LOCATION "${CMAKE_SOURCE_DIR}/tools/TexturePacker/TexturePacker.exe") | 22 | IMPORTED_LOCATION "${DEPENDENCIES_DIR}/tools/TexturePacker/TexturePacker.exe") |
| 23 | else() | 23 | else() |
| 24 | if(WITH_TEXTUREPACKER) | 24 | if(WITH_TEXTUREPACKER) |
| 25 | get_filename_component(_tppath ${WITH_TEXTUREPACKER} ABSOLUTE) | 25 | get_filename_component(_tppath ${WITH_TEXTUREPACKER} ABSOLUTE) |
diff --git a/cmake/platform/android/android.cmake b/cmake/platform/android/android.cmake index bfa003b..c857cba 100644 --- a/cmake/platform/android/android.cmake +++ b/cmake/platform/android/android.cmake | |||
| @@ -1 +1 @@ | |||
| set(PLATFORM_REQUIRED_DEPS OpenGLES EGL) | set(PLATFORM_REQUIRED_DEPS OpenGLES EGL Zip) | ||
diff --git a/cmake/platform/freebsd/wayland.cmake b/cmake/platform/freebsd/wayland.cmake new file mode 100644 index 0000000..55fbd8a --- /dev/null +++ b/cmake/platform/freebsd/wayland.cmake | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | set(PLATFORM_REQUIRED_DEPS EGL Waylandpp LibDRM Xkbcommon) | ||
| 2 | set(PLATFORM_OPTIONAL_DEPS VAAPI) | ||
| 3 | |||
| 4 | set(WAYLAND_RENDER_SYSTEM "" CACHE STRING "Render system to use with Wayland: \"gl\" or \"gles\"") | ||
| 5 | |||
| 6 | if(WAYLAND_RENDER_SYSTEM STREQUAL "gl") | ||
| 7 | list(APPEND PLATFORM_REQUIRED_DEPS OpenGl) | ||
| 8 | elseif(WAYLAND_RENDER_SYSTEM STREQUAL "gles") | ||
| 9 | list(APPEND PLATFORM_REQUIRED_DEPS OpenGLES) | ||
| 10 | else() | ||
| 11 | message(SEND_ERROR "You need to decide whether you want to use GL- or GLES-based rendering in combination with the Wayland windowing system. Please set WAYLAND_RENDER_SYSTEM to either \"gl\" or \"gles\". For normal desktop systems, you will usually want to use \"gl\".") | ||
| 12 | endif() | ||
| 13 | |||
| 14 | set(PLATFORM_GLOBAL_TARGET_DEPS generate-wayland-extra-protocols) | ||
| 15 | set(WAYLAND_EXTRA_PROTOCOL_GENERATED_DIR "${CMAKE_CURRENT_BINARY_DIR}") | ||
| 16 | # for wayland-extra-protocols.hpp | ||
| 17 | include_directories("${WAYLAND_EXTRA_PROTOCOL_GENERATED_DIR}") | ||
diff --git a/cmake/platform/freebsd/x11.cmake b/cmake/platform/freebsd/x11.cmake new file mode 100644 index 0000000..656fd66 --- /dev/null +++ b/cmake/platform/freebsd/x11.cmake | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | set(PLATFORM_REQUIRED_DEPS OpenGl EGL X XRandR LibDRM) | ||
| 2 | set(PLATFORM_OPTIONAL_DEPS VAAPI VDPAU GLX) | ||
diff --git a/cmake/platform/linux/gbm.cmake b/cmake/platform/linux/gbm.cmake index 616cefb..6a9165a 100644 --- a/cmake/platform/linux/gbm.cmake +++ b/cmake/platform/linux/gbm.cmake | |||
| @@ -1,2 +1,2 @@ | |||
| 1 | set(PLATFORM_REQUIRED_DEPS OpenGLES EGL GBM LibDRM) | 1 | set(PLATFORM_REQUIRED_DEPS OpenGLES EGL GBM LibDRM) |
| 2 | set(PLATFORM_OPTIONAL_DEPS VAAPI OpenGLES3) | 2 | set(PLATFORM_OPTIONAL_DEPS VAAPI) |
diff --git a/cmake/platform/linux/imx.cmake b/cmake/platform/linux/imx.cmake deleted file mode 100644 index c0c7196..0000000 --- a/cmake/platform/linux/imx.cmake +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | set(PLATFORM_REQUIRED_DEPS OpenGLES EGL IMX) | ||
diff --git a/cmake/platform/linux/x11.cmake b/cmake/platform/linux/x11.cmake index edea24d..656fd66 100644 --- a/cmake/platform/linux/x11.cmake +++ b/cmake/platform/linux/x11.cmake | |||
| @@ -1,2 +1,2 @@ | |||
| 1 | set(PLATFORM_REQUIRED_DEPS OpenGl EGL X XRandR LibDRM GLX) | 1 | set(PLATFORM_REQUIRED_DEPS OpenGl EGL X XRandR LibDRM) |
| 2 | set(PLATFORM_OPTIONAL_DEPS VAAPI VDPAU) | 2 | set(PLATFORM_OPTIONAL_DEPS VAAPI VDPAU GLX) |
diff --git a/cmake/platform/windowsstore/defines.txt b/cmake/platform/windowsstore/defines.txt new file mode 100644 index 0000000..e962feb --- /dev/null +++ b/cmake/platform/windowsstore/defines.txt | |||
| @@ -0,0 +1 @@ | |||
| -DTARGET_WINDOWS -DTARGET_WINDOWS_STORE -DNOMINMAX -D_CRT_SECURE_NO_WARNINGS -D_WINSOCKAPI_ \ No newline at end of file | |||
diff --git a/cmake/platform/windowsstore/windowsstore.cmake b/cmake/platform/windowsstore/windowsstore.cmake new file mode 100644 index 0000000..266fb3e --- /dev/null +++ b/cmake/platform/windowsstore/windowsstore.cmake | |||
| @@ -0,0 +1 @@ | |||
| set(PLATFORM_REQUIRED_DEPS zlib) | |||
diff --git a/cmake/scripts/android/ArchSetup.cmake b/cmake/scripts/android/ArchSetup.cmake index 7b8b466..03056fa 100644 --- a/cmake/scripts/android/ArchSetup.cmake +++ b/cmake/scripts/android/ArchSetup.cmake | |||
| @@ -6,15 +6,22 @@ endif() | |||
| 6 | 6 | ||
| 7 | set(ARCH_DEFINES -DTARGET_POSIX -DTARGET_LINUX -D_LINUX -DTARGET_ANDROID) | 7 | set(ARCH_DEFINES -DTARGET_POSIX -DTARGET_LINUX -D_LINUX -DTARGET_ANDROID) |
| 8 | set(SYSTEM_DEFINES -D__STDC_CONSTANT_MACROS -D_LARGEFILE64_SOURCE | 8 | set(SYSTEM_DEFINES -D__STDC_CONSTANT_MACROS -D_LARGEFILE64_SOURCE |
| 9 | -D_FILE_OFFSET_BITS=64) | 9 | -D_FILE_OFFSET_BITS=64 -D__USE_FILE_OFFSET64=1) |
| 10 | set(PLATFORM_DIR linux) | 10 | |
| 11 | # Main cpp | ||
| 12 | set(CORE_MAIN_SOURCE ${CMAKE_SOURCE_DIR}/xbmc/platform/android/activity/XBMCApp.cpp) | ||
| 13 | |||
| 14 | set(PLATFORM_DIR platform/linux) | ||
| 11 | if(WITH_ARCH) | 15 | if(WITH_ARCH) |
| 12 | set(ARCH ${WITH_ARCH}) | 16 | set(ARCH ${WITH_ARCH}) |
| 13 | else() | 17 | else() |
| 14 | if(CPU STREQUAL armeabi-v7a) | 18 | if(CPU STREQUAL armeabi-v7a) |
| 15 | set(ARCH arm) | 19 | set(ARCH arm) |
| 16 | set(NEON True) | 20 | set(NEON True) |
| 17 | set(NEON_FLAGS "-mfpu=neon -mvectorize-with-neon-quad") | 21 | set(NEON_FLAGS "-mfpu=neon") |
| 22 | if(CMAKE_COMPILER_IS_GNUCC AND CMAKE_COMPILER_IS_GNUCXX) | ||
| 23 | set(NEON_FLAGS "${NEON_FLAGS} -mvectorize-with-neon-quad") | ||
| 24 | endif() | ||
| 18 | elseif(CPU STREQUAL arm64-v8a) | 25 | elseif(CPU STREQUAL arm64-v8a) |
| 19 | set(ARCH aarch64) | 26 | set(ARCH aarch64) |
| 20 | set(NEON True) | 27 | set(NEON True) |
| @@ -26,6 +33,9 @@ else() | |||
| 26 | endif() | 33 | endif() |
| 27 | endif() | 34 | endif() |
| 28 | 35 | ||
| 36 | # Additional SYSTEM_DEFINES | ||
| 37 | list(APPEND SYSTEM_DEFINES -DHAS_ZEROCONF) | ||
| 38 | |||
| 29 | set(ENABLE_X11 OFF CACHE BOOL "" FORCE) | 39 | set(ENABLE_X11 OFF CACHE BOOL "" FORCE) |
| 30 | set(ENABLE_AML OFF CACHE BOOL "" FORCE) | 40 | set(ENABLE_AML OFF CACHE BOOL "" FORCE) |
| 31 | set(ENABLE_OPTICAL OFF CACHE BOOL "" FORCE) | 41 | set(ENABLE_OPTICAL OFF CACHE BOOL "" FORCE) |
diff --git a/cmake/scripts/android/Install.cmake b/cmake/scripts/android/Install.cmake index 46181f7..cc52d51 100644 --- a/cmake/scripts/android/Install.cmake +++ b/cmake/scripts/android/Install.cmake | |||
| @@ -26,14 +26,38 @@ configure_file(${CMAKE_SOURCE_DIR}/tools/android/packaging/apksign | |||
| 26 | ${CMAKE_BINARY_DIR}/tools/android/packaging/apksign COPYONLY) | 26 | ${CMAKE_BINARY_DIR}/tools/android/packaging/apksign COPYONLY) |
| 27 | configure_file(${CMAKE_SOURCE_DIR}/tools/android/packaging/make_symbols.sh | 27 | configure_file(${CMAKE_SOURCE_DIR}/tools/android/packaging/make_symbols.sh |
| 28 | ${CMAKE_BINARY_DIR}/tools/android/packaging/make_symbols.sh COPYONLY) | 28 | ${CMAKE_BINARY_DIR}/tools/android/packaging/make_symbols.sh COPYONLY) |
| 29 | configure_file(${CMAKE_SOURCE_DIR}/tools/android/packaging/build.gradle | ||
| 30 | ${CMAKE_BINARY_DIR}/tools/android/packaging/build.gradle COPYONLY) | ||
| 31 | configure_file(${CMAKE_SOURCE_DIR}/tools/android/packaging/gradlew | ||
| 32 | ${CMAKE_BINARY_DIR}/tools/android/packaging/gradlew COPYONLY) | ||
| 33 | configure_file(${CMAKE_SOURCE_DIR}/tools/android/packaging/settings.gradle | ||
| 34 | ${CMAKE_BINARY_DIR}/tools/android/packaging/settings.gradle COPYONLY) | ||
| 35 | configure_file(${CMAKE_SOURCE_DIR}/tools/android/packaging/gradle/wrapper/gradle-wrapper.jar | ||
| 36 | ${CMAKE_BINARY_DIR}/tools/android/packaging/gradle/wrapper/gradle-wrapper.jar COPYONLY) | ||
| 37 | configure_file(${CMAKE_SOURCE_DIR}/tools/android/packaging/gradle/wrapper/gradle-wrapper.properties | ||
| 38 | ${CMAKE_BINARY_DIR}/tools/android/packaging/gradle/wrapper/gradle-wrapper.properties COPYONLY) | ||
| 29 | file(WRITE ${CMAKE_BINARY_DIR}/tools/depends/Makefile.include | 39 | file(WRITE ${CMAKE_BINARY_DIR}/tools/depends/Makefile.include |
| 30 | "$(PREFIX)/lib/${APP_NAME_LC}/lib${APP_NAME_LC}.so: ;\n") | 40 | "$(PREFIX)/lib/${APP_NAME_LC}/lib${APP_NAME_LC}.so: ;\n") |
| 31 | 41 | ||
| 42 | string(REPLACE "." ";" APP_VERSION_CODE_LIST ${APP_VERSION_CODE}) | ||
| 43 | list(GET APP_VERSION_CODE_LIST 0 major) | ||
| 44 | list(GET APP_VERSION_CODE_LIST 1 minor) | ||
| 45 | list(GET APP_VERSION_CODE_LIST 2 patch) | ||
| 46 | unset(APP_VERSION_CODE_LIST) | ||
| 47 | math(EXPR APP_VERSION_CODE_ANDROID "(${major} * 100 + ${minor}) * 1000 + ${patch}") | ||
| 48 | unset(major) | ||
| 49 | unset(minor) | ||
| 50 | if(ARCH STREQUAL aarch64 AND patch LESS 999) | ||
| 51 | math(EXPR APP_VERSION_CODE_ANDROID "${APP_VERSION_CODE_ANDROID} + 1") | ||
| 52 | endif() | ||
| 53 | unset(patch) | ||
| 54 | |||
| 32 | set(package_files strings.xml | 55 | set(package_files strings.xml |
| 33 | activity_main.xml | 56 | activity_main.xml |
| 34 | colors.xml | 57 | colors.xml |
| 35 | searchable.xml | 58 | searchable.xml |
| 36 | AndroidManifest.xml | 59 | AndroidManifest.xml |
| 60 | build.gradle | ||
| 37 | src/Main.java | 61 | src/Main.java |
| 38 | src/Splash.java | 62 | src/Splash.java |
| 39 | src/XBMCBroadcastReceiver.java | 63 | src/XBMCBroadcastReceiver.java |
| @@ -124,6 +148,8 @@ foreach(target apk obb apk-unsigned apk-obb apk-obb-unsigned apk-noobb apk-clean | |||
| 124 | CC=${CMAKE_C_COMPILER} | 148 | CC=${CMAKE_C_COMPILER} |
| 125 | CPU=${CPU} | 149 | CPU=${CPU} |
| 126 | ARCH=${ARCH} | 150 | ARCH=${ARCH} |
| 151 | HOST=${HOST} | ||
| 152 | TOOLCHAIN=${TOOLCHAIN} | ||
| 127 | PREFIX=${prefix} | 153 | PREFIX=${prefix} |
| 128 | DEPENDS_PATH=${DEPENDS_PATH} | 154 | DEPENDS_PATH=${DEPENDS_PATH} |
| 129 | NDKROOT=${NDKROOT} | 155 | NDKROOT=${NDKROOT} |
diff --git a/cmake/scripts/common/AddonHelpers.cmake b/cmake/scripts/common/AddonHelpers.cmake index 2fafe79..c11923e 100644 --- a/cmake/scripts/common/AddonHelpers.cmake +++ b/cmake/scripts/common/AddonHelpers.cmake | |||
| @@ -52,7 +52,8 @@ macro (build_addon target prefix libs) | |||
| 52 | # Read used headers from addon, needed to identitfy used kodi addon interface headers | 52 | # Read used headers from addon, needed to identitfy used kodi addon interface headers |
| 53 | if(${prefix}_HEADERS) | 53 | if(${prefix}_HEADERS) |
| 54 | # Add the used header files defined with CMakeLists.txt from addon itself | 54 | # Add the used header files defined with CMakeLists.txt from addon itself |
| 55 | if(${prefix}_HEADERS MATCHES ${PROJECT_SOURCE_DIR}) | 55 | string(FIND "${${prefix}_HEADERS}" "${PROJECT_SOURCE_DIR}" position) |
| 56 | if(position GREATER -1) | ||
| 56 | # include path name already complete | 57 | # include path name already complete |
| 57 | list(APPEND USED_SOURCES ${${prefix}_HEADERS}) | 58 | list(APPEND USED_SOURCES ${${prefix}_HEADERS}) |
| 58 | else() | 59 | else() |
| @@ -75,7 +76,8 @@ macro (build_addon target prefix libs) | |||
| 75 | endif() | 76 | endif() |
| 76 | 77 | ||
| 77 | # Add the used source files defined with CMakeLists.txt from addon itself | 78 | # Add the used source files defined with CMakeLists.txt from addon itself |
| 78 | if(${prefix}_SOURCES MATCHES ${PROJECT_SOURCE_DIR}) | 79 | string(FIND "${${prefix}_SOURCES}" "${PROJECT_SOURCE_DIR}" position) |
| 80 | if(position GREATER -1) | ||
| 79 | # include path name already complete | 81 | # include path name already complete |
| 80 | list(APPEND USED_SOURCES ${${prefix}_SOURCES}) | 82 | list(APPEND USED_SOURCES ${${prefix}_SOURCES}) |
| 81 | else() | 83 | else() |
| @@ -228,7 +230,9 @@ macro (build_addon target prefix libs) | |||
| 228 | set(CPACK_COMPONENTS_IGNORE_GROUPS 1) | 230 | set(CPACK_COMPONENTS_IGNORE_GROUPS 1) |
| 229 | list(APPEND CPACK_COMPONENTS_ALL ${target}-${${prefix}_VERSION}) | 231 | list(APPEND CPACK_COMPONENTS_ALL ${target}-${${prefix}_VERSION}) |
| 230 | # Pack files together to create an archive | 232 | # Pack files together to create an archive |
| 231 | install(DIRECTORY ${target} DESTINATION ./ COMPONENT ${target}-${${prefix}_VERSION} PATTERN "*.xml.in" EXCLUDE) | 233 | install(DIRECTORY ${target} DESTINATION ./ |
| 234 | COMPONENT ${target}-${${prefix}_VERSION} | ||
| 235 | REGEX ".+\\.xml\\.in(clude)?$" EXCLUDE) | ||
| 232 | if(WIN32) | 236 | if(WIN32) |
| 233 | if(NOT CPACK_PACKAGE_DIRECTORY) | 237 | if(NOT CPACK_PACKAGE_DIRECTORY) |
| 234 | # determine the temporary path | 238 | # determine the temporary path |
| @@ -321,7 +325,8 @@ macro (build_addon target prefix libs) | |||
| 321 | if (${prefix}_CUSTOM_BINARY) | 325 | if (${prefix}_CUSTOM_BINARY) |
| 322 | install(FILES ${LIBRARY_LOCATION} DESTINATION ${CMAKE_INSTALL_LIBDIR}/addons/${target} RENAME ${LIBRARY_FILENAME}) | 326 | install(FILES ${LIBRARY_LOCATION} DESTINATION ${CMAKE_INSTALL_LIBDIR}/addons/${target} RENAME ${LIBRARY_FILENAME}) |
| 323 | endif() | 327 | endif() |
| 324 | install(DIRECTORY ${target} DESTINATION ${CMAKE_INSTALL_DATADIR}/addons PATTERN "*.xml.in" EXCLUDE) | 328 | install(DIRECTORY ${target} DESTINATION ${CMAKE_INSTALL_DATADIR}/addons |
| 329 | REGEX ".+\\.xml\\.in(clude)?$" EXCLUDE) | ||
| 325 | if(${prefix}_CUSTOM_DATA) | 330 | if(${prefix}_CUSTOM_DATA) |
| 326 | install(DIRECTORY ${${prefix}_CUSTOM_DATA} DESTINATION ${CMAKE_INSTALL_DATADIR}/addons/${target}/resources) | 331 | install(DIRECTORY ${${prefix}_CUSTOM_DATA} DESTINATION ${CMAKE_INSTALL_DATADIR}/addons/${target}/resources) |
| 327 | endif() | 332 | endif() |
| @@ -348,6 +353,12 @@ macro (build_addon target prefix libs) | |||
| 348 | COMMAND ${CMAKE_COMMAND} -E copy | 353 | COMMAND ${CMAKE_COMMAND} -E copy |
| 349 | ${LIBRARY_LOCATION} | 354 | ${LIBRARY_LOCATION} |
| 350 | ${${APP_NAME_UC}_BUILD_DIR}/addons/${target}/${LIBRARY_FILENAME}) | 355 | ${${APP_NAME_UC}_BUILD_DIR}/addons/${target}/${LIBRARY_FILENAME}) |
| 356 | if(${prefix}_ADDITIONAL_BINARY) | ||
| 357 | add_custom_command(TARGET ${target} POST_BUILD | ||
| 358 | COMMAND ${CMAKE_COMMAND} -E copy | ||
| 359 | ${${prefix}_ADDITIONAL_BINARY} | ||
| 360 | ${${APP_NAME_UC}_BUILD_DIR}/addons/${target}) | ||
| 361 | endif() | ||
| 351 | endif() | 362 | endif() |
| 352 | endmacro() | 363 | endmacro() |
| 353 | 364 | ||
diff --git a/cmake/scripts/common/ArchSetup.cmake b/cmake/scripts/common/ArchSetup.cmake index 357c14c..3b81533 100644 --- a/cmake/scripts/common/ArchSetup.cmake +++ b/cmake/scripts/common/ArchSetup.cmake | |||
| @@ -11,6 +11,9 @@ | |||
| 11 | # DEP_DEFINES - compiler definitions for system dependencies (e.g. LIRC) | 11 | # DEP_DEFINES - compiler definitions for system dependencies (e.g. LIRC) |
| 12 | # + the results of compiler tests etc. | 12 | # + the results of compiler tests etc. |
| 13 | 13 | ||
| 14 | # workaround a bug in older cmake, where binutils wouldn't be set after deleting CMakeCache.txt | ||
| 15 | include(CMakeFindBinUtils) | ||
| 16 | |||
| 14 | include(CheckCXXSourceCompiles) | 17 | include(CheckCXXSourceCompiles) |
| 15 | include(CheckSymbolExists) | 18 | include(CheckSymbolExists) |
| 16 | include(CheckFunctionExists) | 19 | include(CheckFunctionExists) |
diff --git a/cmake/scripts/common/GenerateVersionedFiles.cmake b/cmake/scripts/common/GenerateVersionedFiles.cmake index 90b2173..011f495 100644 --- a/cmake/scripts/common/GenerateVersionedFiles.cmake +++ b/cmake/scripts/common/GenerateVersionedFiles.cmake | |||
| @@ -13,12 +13,11 @@ endfunction() | |||
| 13 | 13 | ||
| 14 | # add-on xml's | 14 | # add-on xml's |
| 15 | file(GLOB ADDON_XML_IN_FILE ${CORE_SOURCE_DIR}/addons/*/addon.xml.in) | 15 | file(GLOB ADDON_XML_IN_FILE ${CORE_SOURCE_DIR}/addons/*/addon.xml.in) |
| 16 | foreach(loop_var ${ADDON_XML_IN_FILE}) | ||
| 17 | # prevent 'xbmc.json'; will be obtained from 'xbmc/interfaces/json-rpc/schema/CMakeLists.txt'. | ||
| 18 | if(loop_var MATCHES "xbmc.json") | ||
| 19 | continue() | ||
| 20 | endif() | ||
| 21 | 16 | ||
| 17 | # remove 'xbmc.json', will be created from 'xbmc/interfaces/json-rpc/schema/CMakeLists.txt' | ||
| 18 | list(REMOVE_ITEM ADDON_XML_IN_FILE xbmc.json) | ||
| 19 | |||
| 20 | foreach(loop_var ${ADDON_XML_IN_FILE}) | ||
| 22 | list(GET loop_var 0 xml_name) | 21 | list(GET loop_var 0 xml_name) |
| 23 | 22 | ||
| 24 | string(REPLACE "/addon.xml.in" "" source_dir ${xml_name}) | 23 | string(REPLACE "/addon.xml.in" "" source_dir ${xml_name}) |
| @@ -35,4 +34,5 @@ foreach(loop_var ${ADDON_XML_IN_FILE}) | |||
| 35 | unset(xml_name) | 34 | unset(xml_name) |
| 36 | endforeach() | 35 | endforeach() |
| 37 | 36 | ||
| 37 | |||
| 38 | generate_versioned_file(xbmc/CompileInfo.cpp.in ${CORE_BUILD_DIR}/xbmc/CompileInfo.cpp) | 38 | generate_versioned_file(xbmc/CompileInfo.cpp.in ${CORE_BUILD_DIR}/xbmc/CompileInfo.cpp) |
diff --git a/cmake/scripts/common/HandleDepends.cmake b/cmake/scripts/common/HandleDepends.cmake index 85d2cf4..49e5ac8 100644 --- a/cmake/scripts/common/HandleDepends.cmake +++ b/cmake/scripts/common/HandleDepends.cmake | |||
| @@ -7,6 +7,10 @@ function(add_addon_depends addon searchpath) | |||
| 7 | set(OUTPUT_DIR ${ADDON_DEPENDS_PATH}) | 7 | set(OUTPUT_DIR ${ADDON_DEPENDS_PATH}) |
| 8 | # look for platform-specific dependencies | 8 | # look for platform-specific dependencies |
| 9 | file(GLOB_RECURSE cmake_input_files ${searchpath}/${CORE_SYSTEM_NAME}/*.txt) | 9 | file(GLOB_RECURSE cmake_input_files ${searchpath}/${CORE_SYSTEM_NAME}/*.txt) |
| 10 | # backward compatibility | ||
| 11 | if(NOT cmake_input_files AND CORE_SYSTEM_NAME STREQUAL windowsstore) | ||
| 12 | file(GLOB_RECURSE cmake_input_files ${searchpath}/windows/*.txt) | ||
| 13 | endif() | ||
| 10 | file(GLOB_RECURSE cmake_input_files2 ${searchpath}/common/*.txt) | 14 | file(GLOB_RECURSE cmake_input_files2 ${searchpath}/common/*.txt) |
| 11 | list(APPEND cmake_input_files ${cmake_input_files2}) | 15 | list(APPEND cmake_input_files ${cmake_input_files2}) |
| 12 | 16 | ||
| @@ -67,6 +71,11 @@ function(add_addon_depends addon searchpath) | |||
| 67 | -DCORE_SYSTEM_NAME=${CORE_SYSTEM_NAME} | 71 | -DCORE_SYSTEM_NAME=${CORE_SYSTEM_NAME} |
| 68 | -DENABLE_STATIC=1 | 72 | -DENABLE_STATIC=1 |
| 69 | -DBUILD_SHARED_LIBS=0) | 73 | -DBUILD_SHARED_LIBS=0) |
| 74 | # windows store args | ||
| 75 | if (CMAKE_SYSTEM_NAME STREQUAL WindowsStore) | ||
| 76 | list(APPEND BUILD_ARGS -DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME} | ||
| 77 | -DCMAKE_SYSTEM_VERSION=${CMAKE_SYSTEM_VERSION}) | ||
| 78 | endif() | ||
| 70 | # if there are no make rules override files available take care of manually passing on ARCH_DEFINES | 79 | # if there are no make rules override files available take care of manually passing on ARCH_DEFINES |
| 71 | if(NOT CMAKE_USER_MAKE_RULES_OVERRIDE AND NOT CMAKE_USER_MAKE_RULES_OVERRIDE_CXX) | 80 | if(NOT CMAKE_USER_MAKE_RULES_OVERRIDE AND NOT CMAKE_USER_MAKE_RULES_OVERRIDE_CXX) |
| 72 | # make sure we create strings, not lists | 81 | # make sure we create strings, not lists |
| @@ -147,6 +156,10 @@ function(add_addon_depends addon searchpath) | |||
| 147 | if(EXISTS ${dir}/${CORE_SYSTEM_NAME}-deps.txt) | 156 | if(EXISTS ${dir}/${CORE_SYSTEM_NAME}-deps.txt) |
| 148 | file(STRINGS ${dir}/${CORE_SYSTEM_NAME}-deps.txt deps) | 157 | file(STRINGS ${dir}/${CORE_SYSTEM_NAME}-deps.txt deps) |
| 149 | message(STATUS "${id} depends: ${deps}") | 158 | message(STATUS "${id} depends: ${deps}") |
| 159 | # backward compatibility | ||
| 160 | elseif(CORE_SYSTEM_NAME STREQUAL windowsstore AND EXISTS ${dir}/windows-deps.txt) | ||
| 161 | file(STRINGS ${dir}/windows-deps.txt deps) | ||
| 162 | message(STATUS "${id} depends: ${deps}") | ||
| 150 | elseif(EXISTS ${dir}/deps.txt) | 163 | elseif(EXISTS ${dir}/deps.txt) |
| 151 | set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${dir}/deps.txt) | 164 | set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${dir}/deps.txt) |
| 152 | file(STRINGS ${dir}/deps.txt deps) | 165 | file(STRINGS ${dir}/deps.txt deps) |
diff --git a/cmake/scripts/common/Macros.cmake b/cmake/scripts/common/Macros.cmake index 9f00bb7..d508f87 100644 --- a/cmake/scripts/common/Macros.cmake +++ b/cmake/scripts/common/Macros.cmake | |||
| @@ -72,11 +72,15 @@ function(core_add_library name) | |||
| 72 | add_library(${name} STATIC ${SOURCES} ${HEADERS} ${OTHERS}) | 72 | add_library(${name} STATIC ${SOURCES} ${HEADERS} ${OTHERS}) |
| 73 | set_target_properties(${name} PROPERTIES PREFIX "") | 73 | set_target_properties(${name} PROPERTIES PREFIX "") |
| 74 | set(core_DEPENDS ${name} ${core_DEPENDS} CACHE STRING "" FORCE) | 74 | set(core_DEPENDS ${name} ${core_DEPENDS} CACHE STRING "" FORCE) |
| 75 | add_dependencies(${name} libcpluff ffmpeg dvdnav crossguid ${PLATFORM_GLOBAL_TARGET_DEPS}) | 75 | set(lib_DEPS libcpluff ffmpeg crossguid ${PLATFORM_GLOBAL_TARGET_DEPS}) |
| 76 | if(NOT CORE_SYSTEM_NAME STREQUAL windowsstore) | ||
| 77 | list(APPEND lib_DEPS dvdnav) | ||
| 78 | endif() | ||
| 79 | add_dependencies(${name} ${lib_DEPS}) | ||
| 76 | set(CORE_LIBRARY ${name} PARENT_SCOPE) | 80 | set(CORE_LIBRARY ${name} PARENT_SCOPE) |
| 77 | 81 | ||
| 78 | # Add precompiled headers to Kodi main libraries | 82 | # Add precompiled headers to Kodi main libraries |
| 79 | if(CORE_SYSTEM_NAME STREQUAL windows) | 83 | if(CORE_SYSTEM_NAME MATCHES windows) |
| 80 | add_precompiled_header(${name} pch.h ${CMAKE_SOURCE_DIR}/xbmc/platform/win32/pch.cpp PCH_TARGET kodi) | 84 | add_precompiled_header(${name} pch.h ${CMAKE_SOURCE_DIR}/xbmc/platform/win32/pch.cpp PCH_TARGET kodi) |
| 81 | set_language_cxx(${name}) | 85 | set_language_cxx(${name}) |
| 82 | target_link_libraries(${name} PUBLIC effects11) | 86 | target_link_libraries(${name} PUBLIC effects11) |
| @@ -102,7 +106,11 @@ function(core_add_test_library name) | |||
| 102 | set_target_properties(${name} PROPERTIES PREFIX "" | 106 | set_target_properties(${name} PROPERTIES PREFIX "" |
| 103 | EXCLUDE_FROM_ALL 1 | 107 | EXCLUDE_FROM_ALL 1 |
| 104 | FOLDER "Build Utilities/tests") | 108 | FOLDER "Build Utilities/tests") |
| 105 | add_dependencies(${name} libcpluff ffmpeg dvdnav crossguid) | 109 | set(lib_DEPS libcpluff ffmpeg crossguid ${PLATFORM_GLOBAL_TARGET_DEPS}) |
| 110 | if(NOT CORE_SYSTEM_NAME STREQUAL windowsstore) | ||
| 111 | list(APPEND lib_DEPS dvdnav) | ||
| 112 | endif() | ||
| 113 | add_dependencies(${name} ${lib_DEPS}) | ||
| 106 | set(test_archives ${test_archives} ${name} CACHE STRING "" FORCE) | 114 | set(test_archives ${test_archives} ${name} CACHE STRING "" FORCE) |
| 107 | endif() | 115 | endif() |
| 108 | foreach(src IN LISTS SOURCES SUPPORTED_SOURCES HEADERS OTHERS) | 116 | foreach(src IN LISTS SOURCES SUPPORTED_SOURCES HEADERS OTHERS) |
| @@ -314,6 +322,7 @@ function(copy_files_from_filelist_to_buildtree pattern) | |||
| 314 | copy_file_to_buildtree(${CMAKE_SOURCE_DIR}/${file} DIRECTORY ${dest} ${DIR_OPTION}) | 322 | copy_file_to_buildtree(${CMAKE_SOURCE_DIR}/${file} DIRECTORY ${dest} ${DIR_OPTION}) |
| 315 | endif() | 323 | endif() |
| 316 | endforeach() | 324 | endforeach() |
| 325 | set(DIR_OPTION) | ||
| 317 | endforeach() | 326 | endforeach() |
| 318 | endforeach() | 327 | endforeach() |
| 319 | endforeach() | 328 | endforeach() |
| @@ -583,7 +592,8 @@ function(core_find_git_rev stamp) | |||
| 583 | else() | 592 | else() |
| 584 | find_package(Git) | 593 | find_package(Git) |
| 585 | if(GIT_FOUND AND EXISTS ${CMAKE_SOURCE_DIR}/.git) | 594 | if(GIT_FOUND AND EXISTS ${CMAKE_SOURCE_DIR}/.git) |
| 586 | execute_process(COMMAND ${GIT_EXECUTABLE} update-index --ignore-submodules --refresh -q) | 595 | execute_process(COMMAND ${GIT_EXECUTABLE} update-index --ignore-submodules -q --refresh |
| 596 | WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) | ||
| 587 | execute_process(COMMAND ${GIT_EXECUTABLE} diff-files --ignore-submodules --quiet -- | 597 | execute_process(COMMAND ${GIT_EXECUTABLE} diff-files --ignore-submodules --quiet -- |
| 588 | RESULT_VARIABLE status_code | 598 | RESULT_VARIABLE status_code |
| 589 | WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) | 599 | WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) |
| @@ -610,7 +620,11 @@ function(core_find_git_rev stamp) | |||
| 610 | string(REPLACE "-" "" DATE ${DATE}) | 620 | string(REPLACE "-" "" DATE ${DATE}) |
| 611 | else() | 621 | else() |
| 612 | string(TIMESTAMP DATE "%Y%m%d" UTC) | 622 | string(TIMESTAMP DATE "%Y%m%d" UTC) |
| 613 | set(HASH "nogitfound") | 623 | if(EXISTS ${CMAKE_SOURCE_DIR}/VERSION) |
| 624 | file(STRINGS ${CMAKE_SOURCE_DIR}/VERSION HASH LIMIT_INPUT 16) | ||
| 625 | else() | ||
| 626 | set(HASH "nogitfound") | ||
| 627 | endif() | ||
| 614 | endif() | 628 | endif() |
| 615 | cmake_parse_arguments(arg "FULL" "" "" ${ARGN}) | 629 | cmake_parse_arguments(arg "FULL" "" "" ${ARGN}) |
| 616 | if(arg_FULL) | 630 | if(arg_FULL) |
| @@ -637,6 +651,7 @@ endfunction() | |||
| 637 | # APP_VERSION - the app version (${APP_VERSION_MAJOR}.${APP_VERSION_MINOR}-${APP_VERSION_TAG}) | 651 | # APP_VERSION - the app version (${APP_VERSION_MAJOR}.${APP_VERSION_MINOR}-${APP_VERSION_TAG}) |
| 638 | # APP_ADDON_API - the addon API version in the form of 16.9.702 | 652 | # APP_ADDON_API - the addon API version in the form of 16.9.702 |
| 639 | # FILE_VERSION - file version in the form of 16,9,702,0 - Windows only | 653 | # FILE_VERSION - file version in the form of 16,9,702,0 - Windows only |
| 654 | # JSONRPC_VERSION - the json api version in the form of 8.3.0 | ||
| 640 | # | 655 | # |
| 641 | # Set various variables defined in "versions.h" | 656 | # Set various variables defined in "versions.h" |
| 642 | macro(core_find_versions) | 657 | macro(core_find_versions) |
| @@ -651,9 +666,28 @@ macro(core_find_versions) | |||
| 651 | 666 | ||
| 652 | include(CMakeParseArguments) | 667 | include(CMakeParseArguments) |
| 653 | core_file_read_filtered(version_list ${CORE_SOURCE_DIR}/version.txt) | 668 | core_file_read_filtered(version_list ${CORE_SOURCE_DIR}/version.txt) |
| 654 | string(REPLACE " " ";" version_list "${version_list}") | 669 | core_file_read_filtered(json_version ${CORE_SOURCE_DIR}/xbmc/interfaces/json-rpc/schema/version.txt) |
| 655 | cmake_parse_arguments(APP "" "APP_NAME;COMPANY_NAME;WEBSITE;VERSION_MAJOR;VERSION_MINOR;VERSION_TAG;VERSION_CODE;ADDON_API;APP_PACKAGE" "" ${version_list}) | 670 | string(REGEX REPLACE "([^ ;]*) ([^;]*)" "\\1;\\2" version_list "${version_list};${json_version}") |
| 656 | 671 | set(version_props | |
| 672 | ADDON_API | ||
| 673 | APP_NAME | ||
| 674 | APP_PACKAGE | ||
| 675 | COMPANY_NAME | ||
| 676 | JSONRPC_VERSION | ||
| 677 | PACKAGE_DESCRIPTION | ||
| 678 | PACKAGE_IDENTITY | ||
| 679 | PACKAGE_PUBLISHER | ||
| 680 | VERSION_MAJOR | ||
| 681 | VERSION_MINOR | ||
| 682 | VERSION_TAG | ||
| 683 | VERSION_CODE | ||
| 684 | WEBSITE | ||
| 685 | ) | ||
| 686 | cmake_parse_arguments(APP "" "${version_props}" "" ${version_list}) | ||
| 687 | |||
| 688 | if(NOT ${APP_VERSION_CODE} MATCHES "^[0-9]+\\.[0-9][0-9]?\\.[0-9][0-9]?[0-9]?$") | ||
| 689 | message(FATAL_ERROR "VERSION_CODE was set to ${APP_VERSION_CODE} in version.txt, but it has to match '^\\d+\\.\\d{1,2}\\.\\d{1,3}$'") | ||
| 690 | endif() | ||
| 657 | set(APP_NAME ${APP_APP_NAME}) # inconsistency but APP_APP_NAME looks weird | 691 | set(APP_NAME ${APP_APP_NAME}) # inconsistency but APP_APP_NAME looks weird |
| 658 | string(TOLOWER ${APP_APP_NAME} APP_NAME_LC) | 692 | string(TOLOWER ${APP_APP_NAME} APP_NAME_LC) |
| 659 | string(TOUPPER ${APP_APP_NAME} APP_NAME_UC) | 693 | string(TOUPPER ${APP_APP_NAME} APP_NAME_UC) |
| @@ -665,6 +699,7 @@ macro(core_find_versions) | |||
| 665 | string(TOLOWER ${APP_VERSION_TAG} APP_VERSION_TAG_LC) | 699 | string(TOLOWER ${APP_VERSION_TAG} APP_VERSION_TAG_LC) |
| 666 | endif() | 700 | endif() |
| 667 | string(REPLACE "." "," FILE_VERSION ${APP_ADDON_API}.0) | 701 | string(REPLACE "." "," FILE_VERSION ${APP_ADDON_API}.0) |
| 702 | set(JSONRPC_VERSION ${APP_JSONRPC_VERSION}) | ||
| 668 | 703 | ||
| 669 | # Set defines used in addon.xml.in and read from versions.h to set add-on | 704 | # Set defines used in addon.xml.in and read from versions.h to set add-on |
| 670 | # version parts automatically | 705 | # version parts automatically |
| @@ -689,6 +724,9 @@ macro(core_find_versions) | |||
| 689 | if(NOT DEFINED APP_VERSION_MAJOR OR NOT DEFINED APP_VERSION_MINOR) | 724 | if(NOT DEFINED APP_VERSION_MAJOR OR NOT DEFINED APP_VERSION_MINOR) |
| 690 | message(FATAL_ERROR "Could not determine app version! Make sure that ${CORE_SOURCE_DIR}/version.txt exists") | 725 | message(FATAL_ERROR "Could not determine app version! Make sure that ${CORE_SOURCE_DIR}/version.txt exists") |
| 691 | endif() | 726 | endif() |
| 727 | if(NOT DEFINED JSONRPC_VERSION) | ||
| 728 | message(FATAL_ERROR "Could not determine json-rpc version! Make sure that ${CORE_SOURCE_DIR}/xbmc/interfaces/json-rpc/schema/version.txt exists") | ||
| 729 | endif() | ||
| 692 | endmacro() | 730 | endmacro() |
| 693 | 731 | ||
| 694 | # add-on xml's | 732 | # add-on xml's |
diff --git a/cmake/scripts/common/Platform.cmake b/cmake/scripts/common/Platform.cmake index b19b7e5..5ac233a 100644 --- a/cmake/scripts/common/Platform.cmake +++ b/cmake/scripts/common/Platform.cmake | |||
| @@ -2,14 +2,17 @@ if(NOT CORE_SYSTEM_NAME) | |||
| 2 | string(TOLOWER ${CMAKE_SYSTEM_NAME} CORE_SYSTEM_NAME) | 2 | string(TOLOWER ${CMAKE_SYSTEM_NAME} CORE_SYSTEM_NAME) |
| 3 | endif() | 3 | endif() |
| 4 | 4 | ||
| 5 | if(CORE_SYSTEM_NAME STREQUAL linux) | 5 | if(CORE_SYSTEM_NAME STREQUAL linux OR CORE_SYSTEM_NAME STREQUAL freebsd) |
| 6 | # Set default CORE_PLATFORM_NAME to X11 | 6 | # Set default CORE_PLATFORM_NAME to X11 |
| 7 | # This is overridden by user setting -DCORE_PLATFORM_NAME=<platform> | 7 | # This is overridden by user setting -DCORE_PLATFORM_NAME=<platform> |
| 8 | set(_DEFAULT_PLATFORM X11) | 8 | set(_DEFAULT_PLATFORM X11) |
| 9 | option(ENABLE_APP_AUTONAME "Enable renaming the binary according to windowing?" ON) | ||
| 9 | else() | 10 | else() |
| 10 | string(TOLOWER ${CORE_SYSTEM_NAME} _DEFAULT_PLATFORM) | 11 | string(TOLOWER ${CORE_SYSTEM_NAME} _DEFAULT_PLATFORM) |
| 11 | endif() | 12 | endif() |
| 12 | 13 | ||
| 14 | set(APP_BINARY_SUFFIX ".bin") | ||
| 15 | |||
| 13 | # | 16 | # |
| 14 | # Note: please do not use CORE_PLATFORM_NAME in any checks, | 17 | # Note: please do not use CORE_PLATFORM_NAME in any checks, |
| 15 | # use the normalized to lower case CORE_PLATFORM_NAME_LC (see below) instead | 18 | # use the normalized to lower case CORE_PLATFORM_NAME_LC (see below) instead |
| @@ -23,10 +26,12 @@ string(TOLOWER ${CORE_PLATFORM_NAME} CORE_PLATFORM_NAME_LC) | |||
| 23 | list(APPEND final_message "Platform: ${CORE_PLATFORM_NAME}") | 26 | list(APPEND final_message "Platform: ${CORE_PLATFORM_NAME}") |
| 24 | if(EXISTS ${CMAKE_SOURCE_DIR}/cmake/platform/${CORE_SYSTEM_NAME}/${CORE_PLATFORM_NAME_LC}.cmake) | 27 | if(EXISTS ${CMAKE_SOURCE_DIR}/cmake/platform/${CORE_SYSTEM_NAME}/${CORE_PLATFORM_NAME_LC}.cmake) |
| 25 | include(${CMAKE_SOURCE_DIR}/cmake/platform/${CORE_SYSTEM_NAME}/${CORE_PLATFORM_NAME_LC}.cmake) | 28 | include(${CMAKE_SOURCE_DIR}/cmake/platform/${CORE_SYSTEM_NAME}/${CORE_PLATFORM_NAME_LC}.cmake) |
| 29 | if(ENABLE_APP_AUTONAME) | ||
| 30 | set(APP_BINARY_SUFFIX "-${CORE_PLATFORM_NAME_LC}") | ||
| 31 | endif() | ||
| 26 | else() | 32 | else() |
| 27 | file(GLOB _platformnames RELATIVE ${CMAKE_SOURCE_DIR}/cmake/platform/${CORE_SYSTEM_NAME}/ | 33 | file(GLOB _platformnames RELATIVE ${CMAKE_SOURCE_DIR}/cmake/platform/${CORE_SYSTEM_NAME}/ |
| 28 | ${CMAKE_SOURCE_DIR}/cmake/platform/${CORE_SYSTEM_NAME}/*.cmake) | 34 | ${CMAKE_SOURCE_DIR}/cmake/platform/${CORE_SYSTEM_NAME}/*.cmake) |
| 29 | string(REPLACE ".cmake" " " _platformnames ${_platformnames}) | 35 | string(REPLACE ".cmake" " " _platformnames ${_platformnames}) |
| 30 | message(FATAL_ERROR "invalid CORE_PLATFORM_NAME: ${CORE_PLATFORM_NAME_LC}\nValid platforms: ${_platformnames}") | 36 | message(FATAL_ERROR "invalid CORE_PLATFORM_NAME: ${CORE_PLATFORM_NAME_LC}\nValid platforms: ${_platformnames}") |
| 31 | endif() | 37 | endif() |
| 32 | |||
diff --git a/cmake/scripts/common/PrepareEnv.cmake b/cmake/scripts/common/PrepareEnv.cmake index 5a6066b..1426148 100644 --- a/cmake/scripts/common/PrepareEnv.cmake +++ b/cmake/scripts/common/PrepareEnv.cmake | |||
| @@ -40,17 +40,11 @@ file(COPY ${CORE_SOURCE_DIR}/cmake/scripts/common/AddonHelpers.cmake | |||
| 40 | ${CORE_SOURCE_DIR}/cmake/scripts/common/AddOptions.cmake | 40 | ${CORE_SOURCE_DIR}/cmake/scripts/common/AddOptions.cmake |
| 41 | DESTINATION ${APP_LIB_DIR}) | 41 | DESTINATION ${APP_LIB_DIR}) |
| 42 | 42 | ||
| 43 | # copy standard add-on include files | ||
| 44 | file(COPY ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/ | ||
| 45 | DESTINATION ${APP_INCLUDE_DIR} REGEX ".txt" EXCLUDE) | ||
| 46 | |||
| 47 | ### copy all the addon binding header files to include/kodi | 43 | ### copy all the addon binding header files to include/kodi |
| 48 | # parse addon-bindings.mk to get the list of header files to copy | 44 | include(${CORE_SOURCE_DIR}/xbmc/addons/AddonBindings.cmake) |
| 49 | core_file_read_filtered(bindings ${CORE_SOURCE_DIR}/xbmc/addons/addon-bindings.mk) | 45 | file(COPY ${CORE_ADDON_BINDINGS_FILES} ${CORE_ADDON_BINDINGS_DIRS}/ |
| 50 | foreach(header ${bindings}) | 46 | DESTINATION ${APP_INCLUDE_DIR} |
| 51 | # copy the header file to include/kodi | 47 | REGEX ".txt" EXCLUDE) |
| 52 | configure_file(${CORE_SOURCE_DIR}/${header} ${APP_INCLUDE_DIR} COPYONLY) | ||
| 53 | endforeach() | ||
| 54 | 48 | ||
| 55 | ### processing additional tools required by the platform | 49 | ### processing additional tools required by the platform |
| 56 | if(EXISTS ${CORE_SOURCE_DIR}/cmake/scripts/${CORE_SYSTEM_NAME}/tools/) | 50 | if(EXISTS ${CORE_SOURCE_DIR}/cmake/scripts/${CORE_SYSTEM_NAME}/tools/) |
diff --git a/cmake/scripts/freebsd/ArchSetup.cmake b/cmake/scripts/freebsd/ArchSetup.cmake index ef693b0..8ee78fc 100644 --- a/cmake/scripts/freebsd/ArchSetup.cmake +++ b/cmake/scripts/freebsd/ArchSetup.cmake | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | set(ARCH_DEFINES -D_LINUX -DTARGET_POSIX -DTARGET_FREEBSD) | 1 | set(ARCH_DEFINES -D_LINUX -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) |
| 4 | set(PLATFORM_DIR linux) | 4 | set(PLATFORM_DIR platform/linux) |
| 5 | set(SYSTEM_LDFLAGS -L/usr/local/lib) | 5 | set(SYSTEM_LDFLAGS -L/usr/local/lib) |
| 6 | if(WITH_ARCH) | 6 | if(WITH_ARCH) |
| 7 | set(ARCH ${WITH_ARCH}) | 7 | set(ARCH ${WITH_ARCH}) |
| @@ -14,3 +14,6 @@ else() | |||
| 14 | message(WARNING "unknown CPU: ${CPU}") | 14 | message(WARNING "unknown CPU: ${CPU}") |
| 15 | endif() | 15 | endif() |
| 16 | endif() | 16 | endif() |
| 17 | |||
| 18 | # Additional SYSTEM_DEFINES | ||
| 19 | list(APPEND SYSTEM_DEFINES -DHAS_LINUX_NETWORK) | ||
diff --git a/cmake/scripts/freebsd/ExtraTargets.cmake b/cmake/scripts/freebsd/ExtraTargets.cmake new file mode 100644 index 0000000..66383ab --- /dev/null +++ b/cmake/scripts/freebsd/ExtraTargets.cmake | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | # xrandr | ||
| 2 | if(X_FOUND AND XRANDR_FOUND) | ||
| 3 | find_package(X QUIET) | ||
| 4 | find_package(XRandR QUIET) | ||
| 5 | add_executable(${APP_NAME_LC}-xrandr ${CMAKE_SOURCE_DIR}/xbmc-xrandr.c) | ||
| 6 | target_link_libraries(${APP_NAME_LC}-xrandr ${SYSTEM_LDFLAGS} ${X_LIBRARIES} m ${XRANDR_LIBRARIES}) | ||
| 7 | endif() | ||
| 8 | |||
| 9 | # WiiRemote | ||
| 10 | if(ENABLE_EVENTCLIENTS AND BLUETOOTH_FOUND) | ||
| 11 | find_package(CWiid QUIET) | ||
| 12 | if(CWIID_FOUND) | ||
| 13 | add_subdirectory(${CMAKE_SOURCE_DIR}/tools/EventClients/Clients/WiiRemote build/WiiRemote) | ||
| 14 | endif() | ||
| 15 | endif() | ||
| 16 | |||
| 17 | if(CORE_PLATFORM_NAME_LC STREQUAL "wayland") | ||
| 18 | # This cannot go into wayland.cmake since it requires the Wayland dependencies | ||
| 19 | # to already be resolved | ||
| 20 | set(PROTOCOL_XMLS "${WAYLAND_PROTOCOLS_DIR}/unstable/xdg-shell/xdg-shell-unstable-v6.xml" | ||
| 21 | "${WAYLAND_PROTOCOLS_DIR}/unstable/idle-inhibit/idle-inhibit-unstable-v1.xml") | ||
| 22 | add_custom_command(OUTPUT "${WAYLAND_EXTRA_PROTOCOL_GENERATED_DIR}/wayland-extra-protocols.hpp" "${WAYLAND_EXTRA_PROTOCOL_GENERATED_DIR}/wayland-extra-protocols.cpp" | ||
| 23 | COMMAND "${WAYLANDPP_SCANNER}" ${PROTOCOL_XMLS} "${WAYLAND_EXTRA_PROTOCOL_GENERATED_DIR}/wayland-extra-protocols.hpp" "${WAYLAND_EXTRA_PROTOCOL_GENERATED_DIR}/wayland-extra-protocols.cpp" | ||
| 24 | DEPENDS "${WAYLANDPP_SCANNER}" ${PROTOCOL_XMLS} | ||
| 25 | COMMENT "Generating wayland-protocols C++ wrappers") | ||
| 26 | |||
| 27 | # Dummy target for dependencies | ||
| 28 | add_custom_target(generate-wayland-extra-protocols DEPENDS wayland-extra-protocols.hpp) | ||
| 29 | endif() | ||
diff --git a/cmake/scripts/ios/ArchSetup.cmake b/cmake/scripts/ios/ArchSetup.cmake index be12c49..0808eb2 100644 --- a/cmake/scripts/ios/ArchSetup.cmake +++ b/cmake/scripts/ios/ArchSetup.cmake | |||
| @@ -7,7 +7,7 @@ set(CORE_MAIN_SOURCE ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/XBMCApplicatio | |||
| 7 | set(ARCH_DEFINES -D_LINUX -DTARGET_POSIX -DTARGET_DARWIN -DTARGET_DARWIN_IOS) | 7 | set(ARCH_DEFINES -D_LINUX -DTARGET_POSIX -DTARGET_DARWIN -DTARGET_DARWIN_IOS) |
| 8 | set(SYSTEM_DEFINES -D_REENTRANT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE | 8 | set(SYSTEM_DEFINES -D_REENTRANT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE |
| 9 | -D__STDC_CONSTANT_MACROS) | 9 | -D__STDC_CONSTANT_MACROS) |
| 10 | set(PLATFORM_DIR linux) | 10 | set(PLATFORM_DIR platform/linux) |
| 11 | set(CMAKE_SYSTEM_NAME Darwin) | 11 | set(CMAKE_SYSTEM_NAME Darwin) |
| 12 | if(WITH_ARCH) | 12 | if(WITH_ARCH) |
| 13 | set(ARCH ${WITH_ARCH}) | 13 | set(ARCH ${WITH_ARCH}) |
| @@ -21,6 +21,9 @@ else() | |||
| 21 | endif() | 21 | endif() |
| 22 | endif() | 22 | endif() |
| 23 | 23 | ||
| 24 | # Additional SYSTEM_DEFINES | ||
| 25 | list(APPEND SYSTEM_DEFINES -DHAS_LINUX_NETWORK -DHAS_ZEROCONF) | ||
| 26 | |||
| 24 | find_package(CXX11 REQUIRED) | 27 | find_package(CXX11 REQUIRED) |
| 25 | 28 | ||
| 26 | list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${NATIVEPREFIX}) | 29 | list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${NATIVEPREFIX}) |
diff --git a/cmake/scripts/ios/Install.cmake b/cmake/scripts/ios/Install.cmake index fee7368..587b24f 100644 --- a/cmake/scripts/ios/Install.cmake +++ b/cmake/scripts/ios/Install.cmake | |||
| @@ -4,6 +4,8 @@ set(BUNDLE_RESOURCES ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/Default-568h@2 | |||
| 4 | ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/Default-667h@2x.png | 4 | ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/Default-667h@2x.png |
| 5 | ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/Default-736h@3x.png | 5 | ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/Default-736h@3x.png |
| 6 | ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/Default-Landscape-736h@3x.png | 6 | ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/Default-Landscape-736h@3x.png |
| 7 | ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/Default-812h@3x.png | ||
| 8 | ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/Default-Landscape-812h@3x.png | ||
| 7 | ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon29x29.png | 9 | ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon29x29.png |
| 8 | ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon29x29@2x.png | 10 | ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon29x29@2x.png |
| 9 | ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon40x40.png | 11 | ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon40x40.png |
diff --git a/cmake/scripts/linux/ArchSetup.cmake b/cmake/scripts/linux/ArchSetup.cmake index 74018d0..ee69c09 100644 --- a/cmake/scripts/linux/ArchSetup.cmake +++ b/cmake/scripts/linux/ArchSetup.cmake | |||
| @@ -5,7 +5,7 @@ if(CORE_PLATFORM_NAME_LC STREQUAL rbpi) | |||
| 5 | endif() | 5 | endif() |
| 6 | set(SYSTEM_DEFINES -D__STDC_CONSTANT_MACROS -D_FILE_DEFINED | 6 | set(SYSTEM_DEFINES -D__STDC_CONSTANT_MACROS -D_FILE_DEFINED |
| 7 | -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64) | 7 | -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64) |
| 8 | set(PLATFORM_DIR linux) | 8 | set(PLATFORM_DIR platform/linux) |
| 9 | set(CMAKE_SYSTEM_NAME Linux) | 9 | set(CMAKE_SYSTEM_NAME Linux) |
| 10 | if(WITH_ARCH) | 10 | if(WITH_ARCH) |
| 11 | set(ARCH ${WITH_ARCH}) | 11 | set(ARCH ${WITH_ARCH}) |
| @@ -37,9 +37,32 @@ else() | |||
| 37 | endif() | 37 | endif() |
| 38 | endif() | 38 | endif() |
| 39 | 39 | ||
| 40 | # Make sure we strip binaries in Release build | 40 | if((CMAKE_BUILD_TYPE STREQUAL Release OR CMAKE_BUILD_TYPE STREQUAL MinSizeRel) |
| 41 | if(CMAKE_BUILD_TYPE STREQUAL Release AND CMAKE_COMPILER_IS_GNUCXX) | 41 | AND CMAKE_COMPILER_IS_GNUCXX) |
| 42 | # Make sure we strip binaries in Release build | ||
| 42 | set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -s") | 43 | set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -s") |
| 44 | |||
| 45 | # LTO Support, requires cmake >= 3.9 | ||
| 46 | if(CMAKE_VERSION VERSION_EQUAL 3.9.0 OR CMAKE_VERSION VERSION_GREATER 3.9.0) | ||
| 47 | option(USE_LTO "Enable link time optimization. Specify an int for number of parallel jobs" OFF) | ||
| 48 | if(USE_LTO) | ||
| 49 | include(CheckIPOSupported) | ||
| 50 | check_ipo_supported(RESULT HAVE_LTO OUTPUT _output) | ||
| 51 | if(HAVE_LTO) | ||
| 52 | set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE) | ||
| 53 | # override flags to enable parallel processing | ||
| 54 | set(NJOBS 2) | ||
| 55 | if(USE_LTO MATCHES "^[0-9]+$") | ||
| 56 | set(NJOBS ${USE_LTO}) | ||
| 57 | endif() | ||
| 58 | set(CMAKE_CXX_COMPILE_OPTIONS_IPO -flto=${NJOBS} -fno-fat-lto-objects) | ||
| 59 | set(CMAKE_C_COMPILE_OPTIONS_IPO -flto=${NJOBS} -fno-fat-lto-objects) | ||
| 60 | else() | ||
| 61 | message(WARNING "LTO optimization not supported: ${_output}") | ||
| 62 | unset(_output) | ||
| 63 | endif() | ||
| 64 | endif() | ||
| 65 | endif() | ||
| 43 | endif() | 66 | endif() |
| 44 | 67 | ||
| 45 | if(KODI_DEPENDSBUILD) | 68 | if(KODI_DEPENDSBUILD) |
| @@ -64,6 +87,9 @@ if(HAVE_MKOSTEMP) | |||
| 64 | list(APPEND ARCH_DEFINES "-DHAVE_MKOSTEMP=1" "-D_GNU_SOURCE") | 87 | list(APPEND ARCH_DEFINES "-DHAVE_MKOSTEMP=1" "-D_GNU_SOURCE") |
| 65 | endif() | 88 | endif() |
| 66 | 89 | ||
| 90 | # Additional SYSTEM_DEFINES | ||
| 91 | list(APPEND SYSTEM_DEFINES -DHAS_LINUX_NETWORK) | ||
| 92 | |||
| 67 | # Code Coverage | 93 | # Code Coverage |
| 68 | if(CMAKE_BUILD_TYPE STREQUAL Coverage) | 94 | if(CMAKE_BUILD_TYPE STREQUAL Coverage) |
| 69 | set(COVERAGE_TEST_BINARY ${APP_NAME_LC}-test) | 95 | set(COVERAGE_TEST_BINARY ${APP_NAME_LC}-test) |
| @@ -78,5 +104,8 @@ endif() | |||
| 78 | 104 | ||
| 79 | if(ENABLE_GBM) | 105 | if(ENABLE_GBM) |
| 80 | set(ENABLE_VDPAU OFF CACHE BOOL "Disabling VDPAU" FORCE) | 106 | set(ENABLE_VDPAU OFF CACHE BOOL "Disabling VDPAU" FORCE) |
| 81 | set(ENABLE_VAAPI OFF CACHE BOOL "Disabling VAAPI" FORCE) | 107 | endif() |
| 108 | |||
| 109 | if(ENABLE_VDPAU) | ||
| 110 | set(ENABLE_GLX ON CACHE BOOL "Enabling GLX" FORCE) | ||
| 82 | endif() | 111 | endif() |
diff --git a/cmake/scripts/linux/Install.cmake b/cmake/scripts/linux/Install.cmake index 7a2705b..d6767bf 100644 --- a/cmake/scripts/linux/Install.cmake +++ b/cmake/scripts/linux/Install.cmake | |||
| @@ -15,6 +15,7 @@ else() | |||
| 15 | endif() | 15 | endif() |
| 16 | 16 | ||
| 17 | # CMake config | 17 | # CMake config |
| 18 | set(APP_BINARY ${APP_NAME_LC}${APP_BINARY_SUFFIX}) | ||
| 18 | set(APP_PREFIX ${prefix}) | 19 | set(APP_PREFIX ${prefix}) |
| 19 | set(APP_LIB_DIR ${libdir}/${APP_NAME_LC}) | 20 | set(APP_LIB_DIR ${libdir}/${APP_NAME_LC}) |
| 20 | set(APP_DATA_DIR ${datarootdir}/${APP_NAME_LC}) | 21 | set(APP_DATA_DIR ${datarootdir}/${APP_NAME_LC}) |
| @@ -146,17 +147,13 @@ if(NOT WITH_TEXTUREPACKER) | |||
| 146 | endif() | 147 | endif() |
| 147 | 148 | ||
| 148 | # Install kodi-addon-dev headers | 149 | # Install kodi-addon-dev headers |
| 149 | install(DIRECTORY ${CMAKE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/ | 150 | include(${CMAKE_SOURCE_DIR}/xbmc/addons/AddonBindings.cmake) |
| 151 | install(DIRECTORY ${CORE_ADDON_BINDINGS_DIRS}/ | ||
| 150 | DESTINATION ${includedir}/${APP_NAME_LC} | 152 | DESTINATION ${includedir}/${APP_NAME_LC} |
| 151 | COMPONENT kodi-addon-dev | 153 | COMPONENT kodi-addon-dev |
| 152 | REGEX ".txt" EXCLUDE) | 154 | REGEX ".txt" EXCLUDE) |
| 153 | 155 | ||
| 154 | install(FILES ${CMAKE_SOURCE_DIR}/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxPacket.h | 156 | install(FILES ${CORE_ADDON_BINDINGS_FILES} |
| 155 | ${CMAKE_SOURCE_DIR}/xbmc/cores/VideoPlayer/DVDDemuxers/DemuxCrypto.h | ||
| 156 | ${CMAKE_SOURCE_DIR}/xbmc/cores/AudioEngine/Utils/AEChannelData.h | ||
| 157 | ${CMAKE_SOURCE_DIR}/xbmc/filesystem/IFileTypes.h | ||
| 158 | ${CMAKE_SOURCE_DIR}/xbmc/input/ActionIDs.h | ||
| 159 | ${CMAKE_SOURCE_DIR}/xbmc/input/XBMC_vkeys.h | ||
| 160 | DESTINATION ${includedir}/${APP_NAME_LC} | 157 | DESTINATION ${includedir}/${APP_NAME_LC} |
| 161 | COMPONENT kodi-addon-dev) | 158 | COMPONENT kodi-addon-dev) |
| 162 | 159 | ||
| @@ -178,7 +175,7 @@ install(FILES ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/scripts/${APP_NAME}Config.cm | |||
| 178 | COMPONENT kodi-addon-dev) | 175 | COMPONENT kodi-addon-dev) |
| 179 | 176 | ||
| 180 | if(ENABLE_EVENTCLIENTS) | 177 | if(ENABLE_EVENTCLIENTS) |
| 181 | execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(prefix='')" | 178 | execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(prefix=''))" |
| 182 | OUTPUT_VARIABLE PYTHON_LIB_PATH OUTPUT_STRIP_TRAILING_WHITESPACE) | 179 | OUTPUT_VARIABLE PYTHON_LIB_PATH OUTPUT_STRIP_TRAILING_WHITESPACE) |
| 183 | # Install kodi-eventclients-common BT python files | 180 | # Install kodi-eventclients-common BT python files |
| 184 | install(PROGRAMS ${CMAKE_SOURCE_DIR}/tools/EventClients/lib/python/bt/__init__.py | 181 | install(PROGRAMS ${CMAKE_SOURCE_DIR}/tools/EventClients/lib/python/bt/__init__.py |
diff --git a/cmake/scripts/linux/clang-check-test.sh.in b/cmake/scripts/linux/clang-check-test.sh.in index 3b30ec1..12e9a0e 100755 --- a/cmake/scripts/linux/clang-check-test.sh.in +++ b/cmake/scripts/linux/clang-check-test.sh.in | |||
| @@ -12,7 +12,7 @@ source_file=$2 | |||
| 12 | 12 | ||
| 13 | tmpfil=`mktemp` | 13 | tmpfil=`mktemp` |
| 14 | $clangcheck_cmd -p @CMAKE_BINARY_DIR@ -analyze $source_file &> $tmpfil | 14 | $clangcheck_cmd -p @CMAKE_BINARY_DIR@ -analyze $source_file &> $tmpfil |
| 15 | nerr=`cat $tmpfil | grep -v "warning: /usr/bin/c++: 'linker' input unused" | wc -l` | 15 | nerr=`cat $tmpfil | grep -v "warning: .*: 'linker' input unused" | wc -l` |
| 16 | if test $nerr -gt 0 | 16 | if test $nerr -gt 0 |
| 17 | then | 17 | then |
| 18 | cat $tmpfil | 18 | cat $tmpfil |
diff --git a/cmake/scripts/osx/ArchSetup.cmake b/cmake/scripts/osx/ArchSetup.cmake index 5a1b567..d0c5506 100644 --- a/cmake/scripts/osx/ArchSetup.cmake +++ b/cmake/scripts/osx/ArchSetup.cmake | |||
| @@ -9,7 +9,7 @@ set(CORE_MAIN_SOURCE ${CMAKE_SOURCE_DIR}/xbmc/platform/posix/main.cpp | |||
| 9 | set(ARCH_DEFINES -D_LINUX -DTARGET_POSIX -DTARGET_DARWIN -DTARGET_DARWIN_OSX) | 9 | set(ARCH_DEFINES -D_LINUX -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 linux) | 12 | set(PLATFORM_DIR platform/linux) |
| 13 | set(CMAKE_SYSTEM_NAME Darwin) | 13 | set(CMAKE_SYSTEM_NAME Darwin) |
| 14 | if(WITH_ARCH) | 14 | if(WITH_ARCH) |
| 15 | set(ARCH ${WITH_ARCH}) | 15 | set(ARCH ${WITH_ARCH}) |
| @@ -22,6 +22,9 @@ else() | |||
| 22 | endif() | 22 | endif() |
| 23 | endif() | 23 | endif() |
| 24 | 24 | ||
| 25 | # Additional SYSTEM_DEFINES | ||
| 26 | list(APPEND SYSTEM_DEFINES -DHAS_LINUX_NETWORK -DHAS_SDL -DHAS_ZEROCONF) | ||
| 27 | |||
| 25 | find_package(CXX11 REQUIRED) | 28 | find_package(CXX11 REQUIRED) |
| 26 | 29 | ||
| 27 | list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${NATIVEPREFIX}) | 30 | list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${NATIVEPREFIX}) |
diff --git a/cmake/scripts/windows/ArchSetup.cmake b/cmake/scripts/windows/ArchSetup.cmake index d438b05..8e4f61d 100644 --- a/cmake/scripts/windows/ArchSetup.cmake +++ b/cmake/scripts/windows/ArchSetup.cmake | |||
| @@ -17,14 +17,15 @@ set(CORE_MAIN_SOURCE ${CMAKE_SOURCE_DIR}/xbmc/platform/win32/WinMain.cpp) | |||
| 17 | 17 | ||
| 18 | # Precompiled headers fail with per target output directory. (needs CMake 3.1) | 18 | # Precompiled headers fail with per target output directory. (needs CMake 3.1) |
| 19 | set(PRECOMPILEDHEADER_DIR ${PROJECT_BINARY_DIR}/${CORE_BUILD_CONFIG}/objs) | 19 | set(PRECOMPILEDHEADER_DIR ${PROJECT_BINARY_DIR}/${CORE_BUILD_CONFIG}/objs) |
| 20 | |||
| 21 | set(CMAKE_SYSTEM_NAME Windows) | 20 | set(CMAKE_SYSTEM_NAME Windows) |
| 22 | list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${CMAKE_SOURCE_DIR}/project/BuildDependencies/mingwlibs/${ARCH}) | 21 | set(DEPS_FOLDER_RELATIVE project/BuildDependencies) |
| 23 | list(APPEND CMAKE_SYSTEM_LIBRARY_PATH ${CMAKE_SOURCE_DIR}/project/BuildDependencies/mingwlibs/${ARCH}/bin) | 22 | set(DEPENDENCIES_DIR ${CMAKE_SOURCE_DIR}/${DEPS_FOLDER_RELATIVE}/${ARCH}) |
| 24 | list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${CMAKE_SOURCE_DIR}/project/BuildDependencies/${ARCH}) | 23 | set(MINGW_LIBS_DIR ${CMAKE_SOURCE_DIR}/${DEPS_FOLDER_RELATIVE}/mingwlibs/${ARCH}) |
| 25 | list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${CMAKE_SOURCE_DIR}/project/BuildDependencies) | ||
| 26 | set(PYTHON_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/project/BuildDependencies/${ARCH}/include/python) | ||
| 27 | 24 | ||
| 25 | list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${MINGW_LIBS_DIR}) | ||
| 26 | list(APPEND CMAKE_SYSTEM_LIBRARY_PATH ${MINGW_LIBS_DIR}/bin) | ||
| 27 | list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${DEPENDENCIES_DIR}) | ||
| 28 | set(PYTHON_INCLUDE_DIR ${DEPENDENCIES_DIR}/include/python) | ||
| 28 | 29 | ||
| 29 | # -------- Compiler options --------- | 30 | # -------- Compiler options --------- |
| 30 | 31 | ||
| @@ -41,6 +42,9 @@ if(${ARCH} STREQUAL win32) | |||
| 41 | list(APPEND SYSTEM_DEFINES $<$<CONFIG:Debug>:-D_ITERATOR_DEBUG_LEVEL=0>) | 42 | list(APPEND SYSTEM_DEFINES $<$<CONFIG:Debug>:-D_ITERATOR_DEBUG_LEVEL=0>) |
| 42 | endif() | 43 | endif() |
| 43 | 44 | ||
| 45 | # Additional SYSTEM_DEFINES | ||
| 46 | list(APPEND SYSTEM_DEFINES -DHAS_IRSERVERSUITE -DHAS_WIN32_NETWORK -DHAS_FILESYSTEM_SMB) | ||
| 47 | |||
| 44 | # Make sure /FS is set for Visual Studio in order to prevent simultaneous access to pdb files. | 48 | # Make sure /FS is set for Visual Studio in order to prevent simultaneous access to pdb files. |
| 45 | if(CMAKE_GENERATOR MATCHES "Visual Studio") | 49 | if(CMAKE_GENERATOR MATCHES "Visual Studio") |
| 46 | set(CMAKE_CXX_FLAGS "/MP /FS ${CMAKE_CXX_FLAGS}") | 50 | set(CMAKE_CXX_FLAGS "/MP /FS ${CMAKE_CXX_FLAGS}") |
| @@ -56,14 +60,7 @@ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO") | |||
| 56 | 60 | ||
| 57 | # For #pragma comment(lib X) | 61 | # For #pragma comment(lib X) |
| 58 | # TODO: It would certainly be better to handle these libraries via CMake modules. | 62 | # TODO: It would certainly be better to handle these libraries via CMake modules. |
| 59 | if(${ARCH} STREQUAL win32) | 63 | link_directories(${DEPENDENCIES_DIR}/lib) |
| 60 | link_directories(${CMAKE_SOURCE_DIR}/lib/win32/ffmpeg/bin | ||
| 61 | ${CMAKE_SOURCE_DIR}/project/BuildDependencies/${ARCH}/lib | ||
| 62 | ${CMAKE_SOURCE_DIR}/project/BuildDependencies/lib) | ||
| 63 | else() | ||
| 64 | link_directories(${CMAKE_SOURCE_DIR}/lib/win32/ffmpeg/bin | ||
| 65 | ${CMAKE_SOURCE_DIR}/project/BuildDependencies/${ARCH}/lib) | ||
| 66 | endif() | ||
| 67 | 64 | ||
| 68 | # Additional libraries | 65 | # Additional libraries |
| 69 | list(APPEND DEPLIBS d3d11.lib DInput8.lib DSound.lib winmm.lib Mpr.lib Iphlpapi.lib WS2_32.lib | 66 | list(APPEND DEPLIBS d3d11.lib DInput8.lib DSound.lib winmm.lib Mpr.lib Iphlpapi.lib WS2_32.lib |
diff --git a/cmake/scripts/windowsstore/ArchSetup.cmake b/cmake/scripts/windowsstore/ArchSetup.cmake new file mode 100644 index 0000000..6c6622c --- /dev/null +++ b/cmake/scripts/windowsstore/ArchSetup.cmake | |||
| @@ -0,0 +1,121 @@ | |||
| 1 | # -------- Architecture settings --------- | ||
| 2 | |||
| 3 | check_symbol_exists(_X86_ "Windows.h" _X86_) | ||
| 4 | check_symbol_exists(_AMD64_ "Windows.h" _AMD64_) | ||
| 5 | check_symbol_exists(_ARM_ "Windows.h" _ARM_) | ||
| 6 | |||
| 7 | if(_X86_) | ||
| 8 | set(ARCH win32) | ||
| 9 | set(SDK_TARGET_ARCH x86) | ||
| 10 | elseif(_AMD64_) | ||
| 11 | set(ARCH x64) | ||
| 12 | set(SDK_TARGET_ARCH x64) | ||
| 13 | elseif(_ARM_) | ||
| 14 | set(ARCH arm) | ||
| 15 | set(SDK_TARGET_ARCH arm) | ||
| 16 | else() | ||
| 17 | message(FATAL_ERROR "Unsupported architecture") | ||
| 18 | endif() | ||
| 19 | |||
| 20 | unset(_X86_) | ||
| 21 | unset(_AMD64_) | ||
| 22 | unset(_ARM_) | ||
| 23 | |||
| 24 | # -------- Paths (mainly for find_package) --------- | ||
| 25 | |||
| 26 | set(PLATFORM_DIR platform/win32) | ||
| 27 | set(CORE_MAIN_SOURCE ${CMAKE_SOURCE_DIR}/xbmc/platform/win10/main.cpp) | ||
| 28 | |||
| 29 | # Precompiled headers fail with per target output directory. (needs CMake 3.1) | ||
| 30 | set(PRECOMPILEDHEADER_DIR ${PROJECT_BINARY_DIR}/${CORE_BUILD_CONFIG}/objs) | ||
| 31 | |||
| 32 | set(CMAKE_SYSTEM_NAME WindowsStore) | ||
| 33 | set(CORE_SYSTEM_NAME "windowsstore") | ||
| 34 | set(PACKAGE_GUID "281d668b-5739-4abd-b3c2-ed1cda572ed2") | ||
| 35 | set(APP_MANIFEST_NAME package.appxmanifest) | ||
| 36 | set(DEPS_FOLDER_RELATIVE project/BuildDependencies) | ||
| 37 | |||
| 38 | set(DEPENDENCIES_DIR ${CMAKE_SOURCE_DIR}/${DEPS_FOLDER_RELATIVE}/win10-${ARCH}) | ||
| 39 | set(MINGW_LIBS_DIR ${CMAKE_SOURCE_DIR}/${DEPS_FOLDER_RELATIVE}/mingwlibs/win10-${ARCH}) | ||
| 40 | |||
| 41 | # mingw libs | ||
| 42 | list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${MINGW_LIBS_DIR}) | ||
| 43 | list(APPEND CMAKE_SYSTEM_LIBRARY_PATH ${MINGW_LIBS_DIR}/bin) | ||
| 44 | # dependencies | ||
| 45 | list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${DEPENDENCIES_DIR}) | ||
| 46 | # for python | ||
| 47 | set(PYTHON_INCLUDE_DIR ${DEPENDENCIES_DIR}/include/python) | ||
| 48 | |||
| 49 | |||
| 50 | # -------- Compiler options --------- | ||
| 51 | |||
| 52 | add_options(CXX ALL_BUILDS "/wd\"4996\"") | ||
| 53 | add_options(CXX ALL_BUILDS "/wd\"4146\"") | ||
| 54 | add_options(CXX ALL_BUILDS "/wd\"4251\"") | ||
| 55 | add_options(CXX ALL_BUILDS "/wd\"4668\"") | ||
| 56 | set(ARCH_DEFINES -D_WINDOWS -DTARGET_WINDOWS -DTARGET_WINDOWS_STORE -DXBMC_EXPORT -DMS_UWP) | ||
| 57 | if(NOT SDK_TARGET_ARCH STREQUAL arm) | ||
| 58 | list(APPEND ARCH_DEFINES -D__SSE__ -D__SSE2__) | ||
| 59 | endif() | ||
| 60 | set(SYSTEM_DEFINES -DNOMINMAX -DHAS_DX -D__STDC_CONSTANT_MACROS | ||
| 61 | -DFMT_HEADER_ONLY -DTAGLIB_STATIC -DNPT_CONFIG_ENABLE_LOGGING | ||
| 62 | -DPLT_HTTP_DEFAULT_USER_AGENT="UPnP/1.0 DLNADOC/1.50 Kodi" | ||
| 63 | -DPLT_HTTP_DEFAULT_SERVER="UPnP/1.0 DLNADOC/1.50 Kodi" | ||
| 64 | -DUNICODE -D_UNICODE | ||
| 65 | $<$<CONFIG:Debug>:-DD3D_DEBUG_INFO>) | ||
| 66 | |||
| 67 | # Additional SYSTEM_DEFINES | ||
| 68 | list(APPEND SYSTEM_DEFINES -DHAS_IRSERVERSUITE -DHAS_WIN10_NETWORK) | ||
| 69 | |||
| 70 | # The /MP option enables /FS by default. | ||
| 71 | set(CMAKE_CXX_FLAGS "/MP ${CMAKE_CXX_FLAGS} /ZW /EHsc /await") | ||
| 72 | # Google Test needs to use shared version of runtime libraries | ||
| 73 | set(gtest_force_shared_crt ON CACHE STRING "" FORCE) | ||
| 74 | |||
| 75 | |||
| 76 | # -------- Linker options --------- | ||
| 77 | |||
| 78 | # For #pragma comment(lib X) | ||
| 79 | # TODO: It would certainly be better to handle these libraries via CMake modules. | ||
| 80 | link_directories(${MINGW_LIBS_DIR}/lib | ||
| 81 | ${DEPENDENCIES_DIR}/lib) | ||
| 82 | |||
| 83 | list(APPEND DEPLIBS d3d11.lib WS2_32.lib dxguid.lib dloadhelper.lib) | ||
| 84 | if(ARCH STREQUAL win32 OR ARCH STREQUAL x64) | ||
| 85 | list(APPEND DEPLIBS DInput8.lib DSound.lib winmm.lib Mpr.lib Iphlpapi.lib PowrProf.lib setupapi.lib dwmapi.lib) | ||
| 86 | endif() | ||
| 87 | # NODEFAULTLIB option | ||
| 88 | |||
| 89 | set(_nodefaultlibs_RELEASE libcmt) | ||
| 90 | set(_nodefaultlibs_DEBUG libcmt msvcrt) | ||
| 91 | foreach(_lib ${_nodefaultlibs_RELEASE}) | ||
| 92 | set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /NODEFAULTLIB:\"${_lib}\"") | ||
| 93 | endforeach() | ||
| 94 | foreach(_lib ${_nodefaultlibs_DEBUG}) | ||
| 95 | set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /NODEFAULTLIB:\"${_lib}\"") | ||
| 96 | endforeach() | ||
| 97 | |||
| 98 | # Make the Release version create a PDB | ||
| 99 | set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Zi") | ||
| 100 | # Minimize the size or the resulting DLLs | ||
| 101 | set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /DEBUG /OPT:REF") | ||
| 102 | # remove warning | ||
| 103 | set(CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS} /ignore:4264") | ||
| 104 | |||
| 105 | |||
| 106 | # -------- Visual Studio options --------- | ||
| 107 | |||
| 108 | if(CMAKE_GENERATOR MATCHES "Visual Studio") | ||
| 109 | set_property(GLOBAL PROPERTY USE_FOLDERS ON) | ||
| 110 | |||
| 111 | # Generate a batch file that opens Visual Studio with the necessary env variables set. | ||
| 112 | file(WRITE ${CMAKE_BINARY_DIR}/kodi-sln.bat | ||
| 113 | "@echo off\n" | ||
| 114 | "set KODI_HOME=%~dp0\n" | ||
| 115 | "set PATH=%~dp0\\system\n" | ||
| 116 | "start %~dp0\\${PROJECT_NAME}.sln") | ||
| 117 | endif() | ||
| 118 | |||
| 119 | # -------- Build options --------- | ||
| 120 | |||
| 121 | set(ENABLE_OPTICAL OFF CACHE BOOL "" FORCE) | ||
diff --git a/cmake/scripts/windowsstore/CFlagOverrides.cmake b/cmake/scripts/windowsstore/CFlagOverrides.cmake new file mode 100644 index 0000000..0cd1c4d --- /dev/null +++ b/cmake/scripts/windowsstore/CFlagOverrides.cmake | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | # compiler flags | ||
| 2 | string(APPEND CMAKE_C_FLAGS_INIT " /D_UNICODE /DUNICODE /MP /DWIN32 /D_WINDOWS /W3 /Zi /DTARGET_WINDOWS") | ||
| 3 | string(APPEND CMAKE_C_FLAGS_INIT " /DWINAPI_FAMILY=2 /DTARGET_WINDOWS_STORE /D_WINSOCK_DEPRECATED_NO_WARNINGS /D_CRT_NONSTDC_NO_DEPRECATE") | ||
| 4 | string(APPEND CMAKE_C_FLAGS_DEBUG_INIT " /D_DEBUG /MDd /Ob0 /Od /RTC1 /D_ITERATOR_DEBUG_LEVEL=0") | ||
| 5 | string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " /MD /Ox /Ob2 /Oi /Ot /Oy /GL /DNDEBUG") | ||
| 6 | # linker flags | ||
| 7 | string(APPEND CMAKE_SHARED_LINKER_FLAGS_INIT " /DYNAMICBASE /NXCOMPAT /APPCONTAINER") | ||
| 8 | # win32 specific flags | ||
| 9 | if("$ENV{Platform}" STREQUAL X86) | ||
| 10 | string(APPEND CMAKE_C_FLAGS_INIT " /arch:SSE2") | ||
| 11 | string(APPEND CMAKE_SHARED_LINKER_FLAGS_INIT " /SAFESEH") | ||
| 12 | endif() | ||
diff --git a/cmake/scripts/windowsstore/CXXFlagOverrides.cmake b/cmake/scripts/windowsstore/CXXFlagOverrides.cmake new file mode 100644 index 0000000..2219af4 --- /dev/null +++ b/cmake/scripts/windowsstore/CXXFlagOverrides.cmake | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | # compiler flags | ||
| 2 | string(APPEND CMAKE_CXX_FLAGS_INIT " /D_UNICODE /DUNICODE /MP /DWIN32 /D_WINDOWS /W3 /GR /Zi /EHsc /DTARGET_WINDOWS") | ||
| 3 | string(APPEND CMAKE_CXX_FLAGS_INIT " /DWINAPI_FAMILY=2 /DTARGET_WINDOWS_STORE /D_WINSOCK_DEPRECATED_NO_WARNINGS /D_CRT_NONSTDC_NO_DEPRECATE") | ||
| 4 | string(APPEND CMAKE_CXX_FLAGS_DEBUG_INIT " /D_DEBUG /MDd /Ob0 /Od /RTC1 /D_ITERATOR_DEBUG_LEVEL=0") | ||
| 5 | string(APPEND CMAKE_CXX_FLAGS_RELEASE_INIT " /MD /Ox /Ob2 /Oi /Ot /Oy /GL /DNDEBUG") | ||
| 6 | # linker flags | ||
| 7 | string(APPEND CMAKE_SHARED_LINKER_FLAGS_INIT " /DYNAMICBASE /NXCOMPAT /APPCONTAINER") | ||
| 8 | # win32 specific flags | ||
| 9 | if("$ENV{Platform}" STREQUAL X86) | ||
| 10 | string(APPEND CMAKE_CXX_FLAGS_INIT " /arch:SSE2") | ||
| 11 | string(APPEND CMAKE_SHARED_LINKER_FLAGS_INIT " /SAFESEH") | ||
| 12 | endif() | ||
diff --git a/cmake/scripts/windowsstore/Install.cmake b/cmake/scripts/windowsstore/Install.cmake new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/cmake/scripts/windowsstore/Install.cmake | |||
diff --git a/cmake/scripts/windowsstore/Macros.cmake b/cmake/scripts/windowsstore/Macros.cmake new file mode 100644 index 0000000..6e7d1d0 --- /dev/null +++ b/cmake/scripts/windowsstore/Macros.cmake | |||
| @@ -0,0 +1,181 @@ | |||
| 1 | function(core_link_library lib wraplib) | ||
| 2 | message(AUTHOR_WARNING "core_link_library is not compatible with windows.") | ||
| 3 | endfunction() | ||
| 4 | |||
| 5 | function(find_soname lib) | ||
| 6 | # Windows uses hardcoded dlls in xbmc/DllPaths_win32.h. | ||
| 7 | # Therefore the output of this function is unused. | ||
| 8 | endfunction() | ||
| 9 | |||
| 10 | # Add precompiled header to target | ||
| 11 | # Arguments: | ||
| 12 | # target existing target that will be set up to compile with a precompiled header | ||
| 13 | # pch_header the precompiled header file | ||
| 14 | # pch_source the precompiled header source file | ||
| 15 | # Optional Arguments: | ||
| 16 | # PCH_TARGET build precompiled header as separate target with the given name | ||
| 17 | # so that the same precompiled header can be used for multiple libraries | ||
| 18 | # EXCLUDE_SOURCES if not all target sources shall use the precompiled header, | ||
| 19 | # the relevant files can be listed here | ||
| 20 | # On return: | ||
| 21 | # Compiles the pch_source into a precompiled header and adds the header to | ||
| 22 | # the given target | ||
| 23 | function(add_precompiled_header target pch_header pch_source) | ||
| 24 | cmake_parse_arguments(PCH "" "PCH_TARGET" "EXCLUDE_SOURCES" ${ARGN}) | ||
| 25 | |||
| 26 | if(PCH_PCH_TARGET) | ||
| 27 | set(pch_binary ${PRECOMPILEDHEADER_DIR}/${PCH_PCH_TARGET}.pch) | ||
| 28 | else() | ||
| 29 | set(pch_binary ${PRECOMPILEDHEADER_DIR}/${target}.pch) | ||
| 30 | endif() | ||
| 31 | |||
| 32 | # Set compile options and dependency for sources | ||
| 33 | get_target_property(sources ${target} SOURCES) | ||
| 34 | list(REMOVE_ITEM sources ${pch_source}) | ||
| 35 | foreach(exclude_source IN LISTS PCH_EXCLUDE_SOURCES) | ||
| 36 | list(REMOVE_ITEM sources ${exclude_source}) | ||
| 37 | endforeach() | ||
| 38 | set_source_files_properties(${sources} | ||
| 39 | PROPERTIES COMPILE_FLAGS "/Yu\"${pch_header}\" /Fp\"${pch_binary}\" /FI\"${pch_header}\"" | ||
| 40 | OBJECT_DEPENDS "${pch_binary}") | ||
| 41 | |||
| 42 | # Set compile options for precompiled header | ||
| 43 | if(NOT PCH_PCH_TARGET OR NOT TARGET ${PCH_PCH_TARGET}_pch) | ||
| 44 | set_source_files_properties(${pch_source} | ||
| 45 | PROPERTIES COMPILE_FLAGS "/Yc\"${pch_header}\" /Fp\"${pch_binary}\"" | ||
| 46 | OBJECT_OUTPUTS "${pch_binary}") | ||
| 47 | endif() | ||
| 48 | |||
| 49 | # Compile precompiled header | ||
| 50 | if(PCH_PCH_TARGET) | ||
| 51 | # As own target for usage in multiple libraries | ||
| 52 | if(NOT TARGET ${PCH_PCH_TARGET}_pch) | ||
| 53 | add_library(${PCH_PCH_TARGET}_pch STATIC ${pch_source}) | ||
| 54 | set_target_properties(${PCH_PCH_TARGET}_pch PROPERTIES COMPILE_PDB_NAME vc140 | ||
| 55 | COMPILE_PDB_OUTPUT_DIRECTORY ${PRECOMPILEDHEADER_DIR} | ||
| 56 | FOLDER "Build Utilities") | ||
| 57 | endif() | ||
| 58 | # From VS2012 onwards, precompiled headers have to be linked against (LNK2011). | ||
| 59 | target_link_libraries(${target} PUBLIC ${PCH_PCH_TARGET}_pch) | ||
| 60 | set_target_properties(${target} PROPERTIES COMPILE_PDB_NAME vc140 | ||
| 61 | COMPILE_PDB_OUTPUT_DIRECTORY ${PRECOMPILEDHEADER_DIR}) | ||
| 62 | else() | ||
| 63 | # As part of the target | ||
| 64 | target_sources(${target} PRIVATE ${pch_source}) | ||
| 65 | endif() | ||
| 66 | endfunction() | ||
| 67 | |||
| 68 | macro(winstore_set_assets target) | ||
| 69 | file(GLOB ASSET_FILES "${CMAKE_SOURCE_DIR}/tools/windows/packaging/uwp/media/*.png") | ||
| 70 | set_property(SOURCE ${ASSET_FILES} PROPERTY VS_DEPLOYMENT_CONTENT 1) | ||
| 71 | set_property(SOURCE ${ASSET_FILES} PROPERTY VS_DEPLOYMENT_LOCATION "media") | ||
| 72 | source_group("media" FILES ${ASSET_FILES}) | ||
| 73 | set(RESOURCES ${RESOURCES} ${ASSET_FILES} | ||
| 74 | "${CMAKE_SOURCE_DIR}/tools/windows/packaging/uwp/kodi_temp_key.pfx") | ||
| 75 | set(LICENSE_FILES | ||
| 76 | ${CMAKE_SOURCE_DIR}/LICENSE.GPL | ||
| 77 | ${CMAKE_SOURCE_DIR}/copying.txt | ||
| 78 | ${CMAKE_SOURCE_DIR}/privacy-policy.txt) | ||
| 79 | if(EXISTS "${CMAKE_SOURCE_DIR}/known_issues.txt") | ||
| 80 | list(APPEND LICENSE_FILES ${CMAKE_SOURCE_DIR}/known_issues.txt) | ||
| 81 | endif() | ||
| 82 | set_property(SOURCE ${LICENSE_FILES} PROPERTY VS_DEPLOYMENT_CONTENT 1) | ||
| 83 | list(APPEND RESOURCES ${LICENSE_FILES}) | ||
| 84 | endmacro() | ||
| 85 | |||
| 86 | macro(winstore_generate_manifest target) | ||
| 87 | configure_file( | ||
| 88 | ${CMAKE_SOURCE_DIR}/tools/windows/packaging/uwp/${APP_MANIFEST_NAME}.in | ||
| 89 | ${CMAKE_CURRENT_BINARY_DIR}/${APP_MANIFEST_NAME} | ||
| 90 | @ONLY) | ||
| 91 | set(RESOURCES ${RESOURCES} ${CMAKE_CURRENT_BINARY_DIR}/${APP_MANIFEST_NAME}) | ||
| 92 | endmacro() | ||
| 93 | |||
| 94 | macro(add_deployment_content_group path link match exclude) | ||
| 95 | set(_link "") | ||
| 96 | set(_exclude "") | ||
| 97 | file(TO_NATIVE_PATH ${path} _path) | ||
| 98 | file(TO_NATIVE_PATH ${match} _match) | ||
| 99 | if (NOT "${link}" STREQUAL "") | ||
| 100 | file(TO_NATIVE_PATH ${link} _link) | ||
| 101 | set(_link "${_link}\\") | ||
| 102 | endif() | ||
| 103 | if(NOT "${exclude}" STREQUAL "") | ||
| 104 | string(REPLACE "/" "\\" _exclude ${exclude}) | ||
| 105 | endif() | ||
| 106 | string(CONCAT UWP_DEPLOYMENT_CONTENT_STR "${UWP_DEPLOYMENT_CONTENT_STR}" | ||
| 107 | " <EmbedResources Include=\"${_path}\\${_match}\" Exclude=\"${_exclude}\">\n" | ||
| 108 | " <Link>${_link}%(RecursiveDir)%(FileName)%(Extension)</Link>\n" | ||
| 109 | " <DeploymentContent>true</DeploymentContent>\n" | ||
| 110 | " </EmbedResources>\n") | ||
| 111 | endmacro() | ||
| 112 | |||
| 113 | macro(winstore_append_props target) | ||
| 114 | # exclude debug dlls from packaging | ||
| 115 | set(DEBUG_DLLS zlibd.dll freetyped.dll sqlite3d.dll) | ||
| 116 | foreach(_dll ${DEBUG_DLLS}) | ||
| 117 | if (DEBUG_DLLS_EXCLUDE) | ||
| 118 | list(APPEND DEBUG_DLLS_EXCLUDE "\;$(BuildRootPath)/dlls/${_dll}") | ||
| 119 | else() | ||
| 120 | list(APPEND DEBUG_DLLS_EXCLUDE "$(BuildRootPath)/dlls/${_dll}") | ||
| 121 | endif() | ||
| 122 | string(CONCAT DEBUG_DLLS_LINKAGE_PROPS "${DEBUG_DLLS_LINKAGE_PROPS}" | ||
| 123 | " <ItemGroup Label=\"Binaries\">\n" | ||
| 124 | " <None Include=\"$(BinPath)\\${_dll}\" Condition=\"'$(Configuration)'=='Debug'\">\n" | ||
| 125 | " <DeploymentContent>true</DeploymentContent>\n" | ||
| 126 | " </None>\n" | ||
| 127 | " </ItemGroup>\n") | ||
| 128 | endforeach(_dll DEBUG_DLLS) | ||
| 129 | |||
| 130 | add_deployment_content_group($(BuildRootPath)/dlls "" *.dll "${DEBUG_DLLS_EXCLUDE}") | ||
| 131 | add_deployment_content_group($(BuildRootPath)/system system **/* "$(BuildRootPath)/**/*.glsl") | ||
| 132 | add_deployment_content_group($(BuildRootPath)/media media **/* "") | ||
| 133 | add_deployment_content_group($(BuildRootPath)/userdata userdata **/* "") | ||
| 134 | add_deployment_content_group($(BuildRootPath)/addons addons **/* "") | ||
| 135 | add_deployment_content_group($(BinaryAddonsPath) addons **/* "") | ||
| 136 | |||
| 137 | foreach(xbt_file ${XBT_FILES}) | ||
| 138 | file(RELATIVE_PATH relative ${CMAKE_CURRENT_BINARY_DIR} ${xbt_file}) | ||
| 139 | file(TO_NATIVE_PATH ${relative} relative) | ||
| 140 | string(CONCAT XBT_FILE_PROPS "${XBT_FILE_PROPS}" | ||
| 141 | " <ItemGroup Label=\"SkinsMedia\">\n" | ||
| 142 | " <None Include=\"$(BuildRootPath)\\${relative}\">\n" | ||
| 143 | " <Link>${relative}</Link>\n" | ||
| 144 | " <DeploymentContent>true</DeploymentContent>\n" | ||
| 145 | " </None>\n" | ||
| 146 | " </ItemGroup>\n") | ||
| 147 | endforeach() | ||
| 148 | |||
| 149 | set(VCPROJECT_PROPS_FILE "${CMAKE_CURRENT_BINARY_DIR}/${target}.props") | ||
| 150 | file(TO_NATIVE_PATH ${DEPENDENCIES_DIR} DEPENDENCIES_DIR_NATIVE) | ||
| 151 | file(TO_NATIVE_PATH ${CMAKE_CURRENT_BINARY_DIR} CMAKE_CURRENT_BINARY_DIR_NATIVE) | ||
| 152 | file(TO_NATIVE_PATH ${CMAKE_SOURCE_DIR}/project/Win32BuildSetup/BUILD_WIN32/addons BINARY_ADDONS_DIR_NATIVE) | ||
| 153 | |||
| 154 | file(WRITE ${VCPROJECT_PROPS_FILE} | ||
| 155 | "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" | ||
| 156 | "<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n" | ||
| 157 | " <ImportGroup Label=\"PropertySheets\" />\n" | ||
| 158 | " <PropertyGroup Label=\"APP_DLLS\">\n" | ||
| 159 | " <BinPath>${DEPENDENCIES_DIR_NATIVE}\\bin</BinPath>\n" | ||
| 160 | " <BuildRootPath>${CMAKE_CURRENT_BINARY_DIR_NATIVE}</BuildRootPath>\n" | ||
| 161 | " <BinaryAddonsPath>${BINARY_ADDONS_DIR_NATIVE}</BinaryAddonsPath>\n" | ||
| 162 | " </PropertyGroup>\n" | ||
| 163 | "${DEBUG_DLLS_LINKAGE_PROPS}" | ||
| 164 | "${XBT_FILE_PROPS}" | ||
| 165 | " <ItemGroup>\n" | ||
| 166 | "${UWP_DEPLOYMENT_CONTENT_STR}" | ||
| 167 | " </ItemGroup>\n" | ||
| 168 | " <Target Name=\"_CollectCustomResources\" Inputs=\"@(EmbedResources)\" Outputs=\"@(EmbedResources->'$(OutputPath)\\PackageLayout\\%(Link)')\" BeforeTargets=\"AssignTargetPaths\">\n" | ||
| 169 | " <Message Text=\"Collecting package resources...\"/>\n" | ||
| 170 | " <ItemGroup>\n" | ||
| 171 | " <None Include=\"@(EmbedResources)\" />\n" | ||
| 172 | " </ItemGroup>\n" | ||
| 173 | " </Target>\n" | ||
| 174 | "</Project>") | ||
| 175 | endmacro() | ||
| 176 | |||
| 177 | macro(winstore_add_target_properties target) | ||
| 178 | winstore_set_assets(${target}) | ||
| 179 | winstore_generate_manifest(${target}) | ||
| 180 | winstore_append_props(${target}) | ||
| 181 | endmacro() \ No newline at end of file | ||
diff --git a/cmake/scripts/windowsstore/PathSetup.cmake b/cmake/scripts/windowsstore/PathSetup.cmake new file mode 100644 index 0000000..8550616 --- /dev/null +++ b/cmake/scripts/windowsstore/PathSetup.cmake | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | if(NOT prefix) | ||
| 2 | set(prefix ${CMAKE_INSTALL_PREFIX}) | ||
| 3 | else() | ||
| 4 | set(CMAKE_INSTALL_PREFIX ${prefix}) | ||
| 5 | endif() | ||
| 6 | if(NOT exec_prefix) | ||
| 7 | set(exec_prefix ${prefix}) | ||
| 8 | endif() | ||
| 9 | if(NOT libdir) | ||
| 10 | set(libdir ${prefix}/lib) | ||
| 11 | endif() | ||
| 12 | if(NOT bindir) | ||
| 13 | set(bindir ${prefix}/bin) | ||
| 14 | endif() | ||
| 15 | if(NOT includedir) | ||
| 16 | set(includedir ${prefix}/include) | ||
| 17 | endif() | ||
| 18 | if(NOT datarootdir) | ||
| 19 | set(datarootdir ${prefix}/share) | ||
| 20 | endif() | ||
| 21 | if(NOT datadir) | ||
| 22 | set(datadir ${datarootdir}) | ||
| 23 | endif() | ||
| 24 | |||
| 25 | list(APPEND final_message "-- PATH config --") | ||
| 26 | list(APPEND final_message "Prefix: ${prefix}") | ||
| 27 | list(APPEND final_message "Libdir: ${libdir}") | ||
| 28 | list(APPEND final_message "Bindir: ${bindir}") | ||
| 29 | list(APPEND final_message "Includedir: ${includedir}") | ||
| 30 | list(APPEND final_message "Datarootdir: ${datarootdir}") | ||
| 31 | list(APPEND final_message "Datadir: ${datadir}") | ||
| 32 | |||
| 33 | set(PATH_DEFINES -DBIN_INSTALL_PATH=\"${libdir}/kodi\" | ||
| 34 | -DINSTALL_PATH=\"${datarootdir}/kodi\") | ||
diff --git a/cmake/scripts/windowsstore/tools/patch.cmake b/cmake/scripts/windowsstore/tools/patch.cmake new file mode 100644 index 0000000..0a342fa --- /dev/null +++ b/cmake/scripts/windowsstore/tools/patch.cmake | |||
| @@ -0,0 +1,37 @@ | |||
| 1 | find_program(PATCH_FOUND NAMES patch patch.exe) | ||
| 2 | if(PATCH_FOUND) | ||
| 3 | message(STATUS "patch utility found at ${PATCH_FOUND}") | ||
| 4 | else() | ||
| 5 | set(PATCH_ARCHIVE_NAME "patch-2.5.9-7-bin-3") | ||
| 6 | set(PATCH_ARCHIVE "${PATCH_ARCHIVE_NAME}.zip") | ||
| 7 | set(PATCH_URL "${KODI_MIRROR}/build-deps/win32/${PATCH_ARCHIVE}") | ||
| 8 | set(PATCH_DOWNLOAD ${BUILD_DIR}/download/${PATCH_ARCHIVE}) | ||
| 9 | |||
| 10 | # download the archive containing patch.exe | ||
| 11 | message(STATUS "Downloading patch utility from ${PATCH_URL}...") | ||
| 12 | file(DOWNLOAD "${PATCH_URL}" "${PATCH_DOWNLOAD}" STATUS PATCH_DL_STATUS LOG PATCH_LOG SHOW_PROGRESS) | ||
| 13 | list(GET PATCH_DL_STATUS 0 PATCH_RETCODE) | ||
| 14 | if(NOT PATCH_RETCODE EQUAL 0) | ||
| 15 | message(FATAL_ERROR "ERROR downloading ${PATCH_URL} - status: ${PATCH_DL_STATUS} log: ${PATCH_LOG}") | ||
| 16 | endif() | ||
| 17 | |||
| 18 | # extract the archive containing patch.exe | ||
| 19 | execute_process(COMMAND ${CMAKE_COMMAND} -E tar xzvf ${PATCH_DOWNLOAD} | ||
| 20 | WORKING_DIRECTORY ${BUILD_DIR}) | ||
| 21 | |||
| 22 | # make sure the extraction worked and that patch.exe is there | ||
| 23 | set(PATCH_PATH ${BUILD_DIR}/${PATCH_ARCHIVE_NAME}) | ||
| 24 | set(PATCH_BINARY_PATH ${PATCH_PATH}/bin/patch.exe) | ||
| 25 | if(NOT EXISTS ${PATCH_PATH} OR NOT EXISTS ${PATCH_BINARY_PATH}) | ||
| 26 | message(FATAL_ERROR "ERROR extracting patch utility from ${PATCH_PATH}") | ||
| 27 | endif() | ||
| 28 | |||
| 29 | # copy patch.exe into the output directory | ||
| 30 | file(INSTALL ${PATCH_BINARY_PATH} DESTINATION ${ADDON_DEPENDS_PATH}/bin) | ||
| 31 | |||
| 32 | # make sure that cmake can find the copied patch.exe | ||
| 33 | find_program(PATCH_FOUND NAMES patch patch.exe) | ||
| 34 | if(NOT PATCH_FOUND) | ||
| 35 | message(FATAL_ERROR "ERROR installing patch utility from ${PATCH_BINARY_PATH} to ${ADDON_DEPENDS_PATH}/bin") | ||
| 36 | endif() | ||
| 37 | endif() | ||
diff --git a/cmake/treedata/android/subdirs.txt b/cmake/treedata/android/subdirs.txt index 0733201..b56618a 100644 --- a/cmake/treedata/android/subdirs.txt +++ b/cmake/treedata/android/subdirs.txt | |||
| @@ -1,4 +1,5 @@ | |||
| 1 | xbmc/linux linuxsupport | 1 | xbmc/cores/RetroPlayer/process/android cores/RetroPlayer/process/android |
| 2 | xbmc/platform/linux platform/linux | ||
| 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/linux network/linux | 5 | xbmc/network/linux network/linux |
diff --git a/cmake/treedata/common/music.txt b/cmake/treedata/common/music.txt index 71f30e1..29aae7b 100644 --- a/cmake/treedata/common/music.txt +++ b/cmake/treedata/common/music.txt | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | xbmc/music music | 1 | xbmc/music music |
| 2 | xbmc/music/dialogs music/dialogs | 2 | xbmc/music/dialogs music/dialogs |
| 3 | xbmc/music/infoscanner music/infoscanner | 3 | xbmc/music/infoscanner music/infoscanner |
| 4 | xbmc/music/jobs music/jobs | ||
| 4 | xbmc/music/tags music/tags | 5 | xbmc/music/tags music/tags |
| 5 | xbmc/music/windows music/windows | 6 | xbmc/music/windows music/windows |
diff --git a/cmake/treedata/common/retroplayer.txt b/cmake/treedata/common/retroplayer.txt index ab18c3c..97e27b3 100644 --- a/cmake/treedata/common/retroplayer.txt +++ b/cmake/treedata/common/retroplayer.txt | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | xbmc/cores/RetroPlayer cores/RetroPlayer | 1 | xbmc/cores/RetroPlayer cores/RetroPlayer |
| 2 | xbmc/cores/RetroPlayer/guicontrols cores/RetroPlayer/guicontrols | 2 | xbmc/cores/RetroPlayer/guicontrols cores/RetroPlayer/guicontrols |
| 3 | xbmc/cores/RetroPlayer/process cores/RetroPlayer/process | ||
| 3 | xbmc/cores/RetroPlayer/rendering cores/RetroPlayer/rendering | 4 | xbmc/cores/RetroPlayer/rendering cores/RetroPlayer/rendering |
| 5 | xbmc/cores/RetroPlayer/rendering/VideoRenderers cores/RetroPlayer/rendering/VideoRenderers | ||
| 6 | xbmc/cores/RetroPlayer/rendering/VideoShaders cores/RetroPlayer/rendering/VideoShaders | ||
| 7 | xbmc/cores/RetroPlayer/windows cores/RetroPlayer/windows | ||
diff --git a/cmake/treedata/common/subdirs.txt b/cmake/treedata/common/subdirs.txt index ee4e83c..d5412b5 100644 --- a/cmake/treedata/common/subdirs.txt +++ b/cmake/treedata/common/subdirs.txt | |||
| @@ -1,16 +1,23 @@ | |||
| 1 | xbmc xbmc | 1 | xbmc xbmc |
| 2 | xbmc/addons addons | 2 | xbmc/addons addons |
| 3 | xbmc/addons/binary-addons addons_binary-addons | 3 | xbmc/addons/binary-addons addons_binary-addons |
| 4 | xbmc/addons/interfaces addonsBinaryInterfaces | 4 | xbmc/addons/interfaces addons_interfaces |
| 5 | xbmc/addons/interfaces/Addon addonCallbacks_Addon | 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/settings addonsSettings | 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 | ||
| 11 | 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 | ||
| 13 | xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs addons_kodi-addon-dev-kit_include_kodi_gui_dialogs | ||
| 14 | xbmc/addons/kodi-addon-dev-kit/include/kodi/tools addons_kodi-addon-dev-kit_include_kodi_tools | ||
| 15 | xbmc/addons/settings addons_settings | ||
| 10 | xbmc/commons commons | 16 | xbmc/commons commons |
| 11 | xbmc/dbwrappers dbwrappers | 17 | xbmc/dbwrappers dbwrappers |
| 12 | xbmc/dialogs dialogs | 18 | xbmc/dialogs dialogs |
| 13 | xbmc/favourites favourites | 19 | xbmc/favourites favourites |
| 20 | xbmc/guiinfo guiinfo | ||
| 14 | xbmc/guilib guilib | 21 | xbmc/guilib guilib |
| 15 | xbmc/input input | 22 | xbmc/input input |
| 16 | xbmc/input/joysticks input/joysticks | 23 | xbmc/input/joysticks input/joysticks |
| @@ -35,5 +42,6 @@ xbmc/storage storage | |||
| 35 | xbmc/threads threads | 42 | xbmc/threads threads |
| 36 | xbmc/utils utils | 43 | xbmc/utils utils |
| 37 | xbmc/view view | 44 | xbmc/view view |
| 45 | xbmc/weather weather | ||
| 38 | xbmc/windowing windowing | 46 | xbmc/windowing windowing |
| 39 | xbmc/windows windows | 47 | xbmc/windows windows |
diff --git a/cmake/treedata/common/video.txt b/cmake/treedata/common/video.txt index acfb33b..ab53453 100644 --- a/cmake/treedata/common/video.txt +++ b/cmake/treedata/common/video.txt | |||
| @@ -1,4 +1,5 @@ | |||
| 1 | xbmc/video video | 1 | xbmc/video video |
| 2 | xbmc/video/dialogs video/dialogs | 2 | xbmc/video/dialogs video/dialogs |
| 3 | xbmc/video/jobs video/jobs | 3 | xbmc/video/jobs video/jobs |
| 4 | xbmc/video/tags video/tags | ||
| 4 | xbmc/video/windows video/windows | 5 | xbmc/video/windows video/windows |
diff --git a/cmake/treedata/freebsd/subdirs.txt b/cmake/treedata/freebsd/subdirs.txt index df2fa76..f7651ee 100644 --- a/cmake/treedata/freebsd/subdirs.txt +++ b/cmake/treedata/freebsd/subdirs.txt | |||
| @@ -1,6 +1,5 @@ | |||
| 1 | xbmc/linux linuxsupport | 1 | xbmc/platform/linux platform/linux |
| 2 | xbmc/linux/sse4 sse4 | 2 | xbmc/platform/linux/input platform/linux/input |
| 3 | xbmc/input/linux input/linux | ||
| 4 | xbmc/input/touch input/touch | 3 | xbmc/input/touch input/touch |
| 5 | xbmc/input/touch/generic input/touch/generic | 4 | xbmc/input/touch/generic input/touch/generic |
| 6 | xbmc/network/linux network/linux | 5 | xbmc/network/linux network/linux |
diff --git a/cmake/treedata/ios/subdirs.txt b/cmake/treedata/ios/subdirs.txt index 4bbeeb1..00f5cf1 100644 --- a/cmake/treedata/ios/subdirs.txt +++ b/cmake/treedata/ios/subdirs.txt | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | xbmc/linux linuxsupport | 1 | xbmc/platform/linux platform/linux |
| 2 | xbmc/input/touch input/touch | 2 | xbmc/input/touch input/touch |
| 3 | xbmc/input/touch/generic input/touch/generic | 3 | xbmc/input/touch/generic input/touch/generic |
| 4 | xbmc/network/linux network/linux | 4 | xbmc/network/linux network/linux |
| @@ -13,4 +13,5 @@ xbmc/platform/darwin/ios-common platform_ios-common | |||
| 13 | xbmc/filesystem/posix filesystem/posix | 13 | xbmc/filesystem/posix filesystem/posix |
| 14 | xbmc/utils/posix utils_posix | 14 | xbmc/utils/posix utils_posix |
| 15 | xbmc/windowing/osx windowing/osx | 15 | xbmc/windowing/osx windowing/osx |
| 16 | xbmc/cores/RetroPlayer/process/ios cores/RetroPlayer/process/ios | ||
| 16 | xbmc/cores/VideoPlayer/Process/ios cores/VideoPlayer/Process/ios | 17 | xbmc/cores/VideoPlayer/Process/ios cores/VideoPlayer/Process/ios |
diff --git a/cmake/treedata/linux/subdirs.txt b/cmake/treedata/linux/subdirs.txt index e301579..b310b53 100644 --- a/cmake/treedata/linux/subdirs.txt +++ b/cmake/treedata/linux/subdirs.txt | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | xbmc/linux linuxsupport | 1 | xbmc/platform/linux platform/linux |
| 2 | xbmc/input/linux input/linux | 2 | xbmc/platform/linux/input platform/linux/input |
| 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/network/linux network/linux | 5 | xbmc/network/linux network/linux |
| @@ -9,5 +9,6 @@ xbmc/storage/linux storage/linux | |||
| 9 | xbmc/filesystem/posix filesystem/posix | 9 | xbmc/filesystem/posix filesystem/posix |
| 10 | xbmc/utils/posix utils_posix | 10 | xbmc/utils/posix utils_posix |
| 11 | xbmc/platform/posix posix | 11 | xbmc/platform/posix posix |
| 12 | xbmc/cores/RetroPlayer/process/rbpi cores/RetroPlayer/process/rbpi | ||
| 12 | xbmc/cores/VideoPlayer/Process/rbpi cores/VideoPlayer/Process/rbpi | 13 | xbmc/cores/VideoPlayer/Process/rbpi cores/VideoPlayer/Process/rbpi |
| 13 | xbmc/windowing/linux windowing/linux | 14 | xbmc/windowing/linux windowing/linux |
diff --git a/cmake/treedata/optional/common/X.txt b/cmake/treedata/optional/common/X.txt index 26b8a90..e66ad80 100644 --- a/cmake/treedata/optional/common/X.txt +++ b/cmake/treedata/optional/common/X.txt | |||
| @@ -1,2 +1,3 @@ | |||
| 1 | xbmc/windowing/X11 windowing/X11 # X | 1 | xbmc/windowing/X11 windowing/X11 # X |
| 2 | xbmc/cores/RetroPlayer/process/X11 cores/RetroPlayer/process/X11 # X | ||
| 2 | xbmc/cores/VideoPlayer/Process/X11 cores/VideoPlayer/Process/X11 # X | 3 | xbmc/cores/VideoPlayer/Process/X11 cores/VideoPlayer/Process/X11 # X |
diff --git a/cmake/treedata/optional/common/aml.txt b/cmake/treedata/optional/common/aml.txt index db1efd1..3d412d0 100644 --- a/cmake/treedata/optional/common/aml.txt +++ b/cmake/treedata/optional/common/aml.txt | |||
| @@ -1,2 +1,3 @@ | |||
| 1 | xbmc/cores/RetroPlayer/process/amlogic cores/RetroPlayer/process/amlogic # AML | ||
| 1 | xbmc/windowing/amlogic windowing/amlogic # AML | 2 | xbmc/windowing/amlogic windowing/amlogic # AML |
| 2 | 3 | ||
diff --git a/cmake/treedata/optional/common/gbm.txt b/cmake/treedata/optional/common/gbm.txt index 1adde93..196b323 100644 --- a/cmake/treedata/optional/common/gbm.txt +++ b/cmake/treedata/optional/common/gbm.txt | |||
| @@ -1 +1,2 @@ | |||
| 1 | xbmc/windowing/gbm windowing/gbm # GBM | 1 | xbmc/cores/RetroPlayer/process/gbm cores/RetroPlayer/process/gbm # GBM |
| 2 | xbmc/windowing/gbm windowing/gbm # GBM \ No newline at end of file | ||
diff --git a/cmake/treedata/optional/common/imx.txt b/cmake/treedata/optional/common/imx.txt deleted file mode 100644 index 8c7e60b..0000000 --- a/cmake/treedata/optional/common/imx.txt +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | xbmc/windowing/egl windowing/egl # IMX | ||
diff --git a/cmake/treedata/optional/common/python.txt b/cmake/treedata/optional/common/python.txt index 4960485..c381a18 100644 --- a/cmake/treedata/optional/common/python.txt +++ b/cmake/treedata/optional/common/python.txt | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | xbmc/interfaces/legacy interfaces/legacy # PYTHON | 1 | xbmc/interfaces/legacy interfaces/legacy # PYTHON |
| 2 | xbmc/interfaces/legacy/wsgi interfaces/legacy/wsgi # PYTHON | 2 | xbmc/interfaces/legacy/wsgi interfaces/legacy/wsgi # PYTHON |
| 3 | xbmc/interfaces/python interfaces/python # PYTHON | 3 | xbmc/interfaces/python interfaces/python # PYTHON |
| 4 | xbmc/interfaces/swig build/swig # PYTHON | 4 | xbmc/interfaces/swig swig # PYTHON |
diff --git a/cmake/treedata/optional/common/wayland.txt b/cmake/treedata/optional/common/wayland.txt index 3725fc6..4664b35 100644 --- a/cmake/treedata/optional/common/wayland.txt +++ b/cmake/treedata/optional/common/wayland.txt | |||
| @@ -1,2 +1,3 @@ | |||
| 1 | xbmc/windowing/wayland windowing/wayland # WAYLANDPP | 1 | xbmc/windowing/wayland windowing/wayland # WAYLANDPP |
| 2 | xbmc/cores/RetroPlayer/process/wayland cores/RetroPlayer/process/wayland # WAYLANDPP | ||
| 2 | xbmc/cores/VideoPlayer/Process/wayland cores/VideoPlayer/Process/wayland # WAYLANDPP \ No newline at end of file | 3 | xbmc/cores/VideoPlayer/Process/wayland cores/VideoPlayer/Process/wayland # WAYLANDPP \ No newline at end of file |
diff --git a/cmake/treedata/osx/subdirs.txt b/cmake/treedata/osx/subdirs.txt index a520243..5b1b302 100644 --- a/cmake/treedata/osx/subdirs.txt +++ b/cmake/treedata/osx/subdirs.txt | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | xbmc/linux linuxsupport | 1 | xbmc/platform/linux platform/linux |
| 2 | xbmc/network/linux network/linux | 2 | xbmc/network/linux network/linux |
| 3 | xbmc/network/osx network/osx | 3 | xbmc/network/osx network/osx |
| 4 | xbmc/peripherals/bus/osx peripherals/bus/osx | 4 | xbmc/peripherals/bus/osx peripherals/bus/osx |
| @@ -10,4 +10,5 @@ xbmc/platform/darwin/osx platform_osx | |||
| 10 | xbmc/filesystem/posix filesystem/posix | 10 | xbmc/filesystem/posix filesystem/posix |
| 11 | xbmc/utils/posix utils_posix | 11 | xbmc/utils/posix utils_posix |
| 12 | xbmc/windowing/osx windowing/osx | 12 | xbmc/windowing/osx windowing/osx |
| 13 | xbmc/cores/RetroPlayer/process/osx cores/RetroPlayer/process/osx | ||
| 13 | xbmc/cores/VideoPlayer/Process/osx cores/VideoPlayer/Process/osx | 14 | xbmc/cores/VideoPlayer/Process/osx cores/VideoPlayer/Process/osx |
diff --git a/cmake/treedata/windows/subdirs.txt b/cmake/treedata/windows/subdirs.txt index bdbbe1d..8344320 100644 --- a/cmake/treedata/windows/subdirs.txt +++ b/cmake/treedata/windows/subdirs.txt | |||
| @@ -12,4 +12,6 @@ xbmc/utils/win32 utils_win32 | |||
| 12 | xbmc/rendering/dx rendering_dx | 12 | xbmc/rendering/dx rendering_dx |
| 13 | xbmc/threads/platform/win threads_win | 13 | xbmc/threads/platform/win threads_win |
| 14 | xbmc/windowing/windows windowing/windows | 14 | xbmc/windowing/windows windowing/windows |
| 15 | xbmc/cores/RetroPlayer/process/windows cores/RetroPlayer/process/windows | ||
| 16 | xbmc/cores/RetroPlayer/rendering/VideoShaders/windows cores/RetroPlayer/rendering/VideoShaders/windows | ||
| 15 | xbmc/cores/VideoPlayer/Process/windows cores/VideoPlayer/Process/windows | 17 | xbmc/cores/VideoPlayer/Process/windows cores/VideoPlayer/Process/windows |
diff --git a/cmake/treedata/windowsstore/externals.txt b/cmake/treedata/windowsstore/externals.txt new file mode 100644 index 0000000..989677e --- /dev/null +++ b/cmake/treedata/windowsstore/externals.txt | |||
| @@ -0,0 +1 @@ | |||
| lib/win32/Effects11 Effects11 | |||
diff --git a/cmake/treedata/windowsstore/subdirs.txt b/cmake/treedata/windowsstore/subdirs.txt new file mode 100644 index 0000000..84150d5 --- /dev/null +++ b/cmake/treedata/windowsstore/subdirs.txt | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | xbmc/platform/win10 platform_win10 | ||
| 2 | xbmc/input/windows input/windows | ||
| 3 | xbmc/input/touch input/touch | ||
| 4 | xbmc/input/touch/generic input/touch/generic | ||
| 5 | xbmc/network/win10 network/win10 | ||
| 6 | xbmc/network/mdns network/mdns | ||
| 7 | xbmc/peripherals/bus/win10 peripherals/bus/win10 | ||
| 8 | xbmc/powermanagement/win10 powermanagement/win10 | ||
| 9 | xbmc/storage/win10 storage/win10 | ||
| 10 | xbmc/filesystem/win32 filesystem/win32 | ||
| 11 | xbmc/filesystem/win10 filesystem/win10 | ||
| 12 | xbmc/utils/win32 utils_win32 | ||
| 13 | xbmc/rendering/dx rendering_dx | ||
| 14 | xbmc/threads/platform/win threads_win | ||
| 15 | xbmc/windowing/win10 windowing/win10 | ||
| 16 | xbmc/cores/VideoPlayer/Process/windows cores/VideoPlayer/Process/windows | ||
