aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake')
-rw-r--r--cmake/KodiConfig.cmake.in6
-rw-r--r--cmake/addons/CMakeLists.txt13
-rw-r--r--cmake/addons/bootstrap/repositories/binary-addons.txt2
-rw-r--r--cmake/addons/depends/common/kodi-platform/kodi-platform.txt2
-rw-r--r--cmake/addons/depends/common/p8-platform/p8-platform.txt2
-rw-r--r--cmake/cpack/deb/packages/kodi.txt.in2
-rw-r--r--cmake/installdata/darwin_embedded/fontconfig.txt (renamed from cmake/installdata/ios/fontconfig.txt)0
-rw-r--r--cmake/installdata/darwin_embedded/packaging.txt (renamed from cmake/installdata/ios/packaging.txt)0
-rw-r--r--cmake/installdata/darwin_embedded/runtime.txt (renamed from cmake/installdata/ios/runtime.txt)0
-rw-r--r--cmake/installdata/windows/addons.txt1
-rw-r--r--cmake/installdata/windowsstore/addons.txt3
-rw-r--r--cmake/modules/FindAML.cmake49
-rw-r--r--cmake/modules/FindBluray.cmake4
-rw-r--r--cmake/modules/FindCCache.cmake11
-rw-r--r--cmake/modules/FindCXX11.cmake18
-rw-r--r--cmake/modules/FindClangFormat.cmake11
-rw-r--r--cmake/modules/FindCpluff.cmake51
-rw-r--r--cmake/modules/FindCrossGUID.cmake3
-rw-r--r--cmake/modules/FindCurl.cmake19
-rw-r--r--cmake/modules/FindFlatBuffers.cmake3
-rw-r--r--cmake/modules/FindFriBidi.cmake3
-rw-r--r--cmake/modules/FindLibDRM.cmake2
-rw-r--r--cmake/modules/FindLibDvd.cmake1
-rw-r--r--cmake/modules/FindMicroHttpd.cmake10
-rw-r--r--cmake/modules/FindOpenGLES.cmake2
-rw-r--r--cmake/modules/FindPlist.cmake19
-rw-r--r--cmake/modules/FindShairplay.cmake42
-rw-r--r--cmake/modules/FindYajl.cmake62
-rw-r--r--cmake/platform/android/android.cmake1
-rw-r--r--cmake/platform/android/defines.txt2
-rw-r--r--cmake/platform/darwin_embedded/defines.txt1
-rw-r--r--cmake/platform/darwin_embedded/ios.cmake3
-rw-r--r--cmake/platform/freebsd/defines.txt2
-rw-r--r--cmake/platform/freebsd/x11.cmake1
-rw-r--r--cmake/platform/ios/defines.txt1
-rw-r--r--cmake/platform/ios/ios.cmake1
-rw-r--r--cmake/platform/linux/aml.cmake3
-rw-r--r--cmake/platform/linux/defines.txt2
-rw-r--r--cmake/platform/osx/defines.txt2
-rw-r--r--cmake/platform/osx/osx.cmake1
-rw-r--r--cmake/platform/windows/windows.cmake3
-rw-r--r--cmake/platform/windowsstore/windowsstore.cmake3
-rw-r--r--cmake/scripts/android/ArchSetup.cmake4
-rw-r--r--cmake/scripts/android/Install.cmake4
-rw-r--r--cmake/scripts/common/AddonHelpers.cmake40
-rw-r--r--cmake/scripts/common/AddonHelpers.dox59
-rw-r--r--cmake/scripts/common/ArchSetup.cmake30
-rw-r--r--cmake/scripts/common/CompilerSettings.cmake7
-rw-r--r--cmake/scripts/common/GenerateVersionedFiles.cmake3
-rw-r--r--cmake/scripts/common/HandleDepends.cmake39
-rw-r--r--cmake/scripts/common/Macros.cmake52
-rw-r--r--cmake/scripts/common/PrepareEnv.cmake19
-rw-r--r--cmake/scripts/darwin/Macros.cmake8
-rw-r--r--cmake/scripts/darwin_embedded/ArchSetup.cmake (renamed from cmake/scripts/ios/ArchSetup.cmake)41
-rw-r--r--cmake/scripts/darwin_embedded/Install.cmake70
l---------cmake/scripts/darwin_embedded/Macros.cmake (renamed from cmake/scripts/ios/Macros.cmake)0
-rw-r--r--cmake/scripts/darwin_embedded/PathSetup.cmake4
-rw-r--r--cmake/scripts/freebsd/ArchSetup.cmake3
-rw-r--r--cmake/scripts/ios/Install.cmake98
l---------cmake/scripts/ios/PathSetup.cmake1
-rw-r--r--cmake/scripts/linux/ArchSetup.cmake7
-rw-r--r--cmake/scripts/linux/Install.cmake1
-rw-r--r--cmake/scripts/osx/ArchSetup.cmake10
-rw-r--r--cmake/scripts/osx/Macros.cmake2
-rw-r--r--cmake/scripts/windowsstore/ArchSetup.cmake5
-rw-r--r--cmake/treedata/android/subdirs.txt37
-rw-r--r--cmake/treedata/common/drm.txt1
-rw-r--r--cmake/treedata/common/filesystem.txt2
-rw-r--r--cmake/treedata/common/gbm/gbm.txt3
-rw-r--r--cmake/treedata/common/media.txt2
-rw-r--r--cmake/treedata/common/pvr.txt20
-rw-r--r--cmake/treedata/common/rbpi/rbpi.txt2
-rw-r--r--cmake/treedata/common/subdirs.txt3
-rw-r--r--cmake/treedata/common/tests.txt5
-rw-r--r--cmake/treedata/common/videoplayer.txt2
-rw-r--r--cmake/treedata/common/wayland/wayland.txt (renamed from cmake/treedata/optional/common/wayland.txt)6
-rw-r--r--cmake/treedata/common/x11/X.txt (renamed from cmake/treedata/optional/common/X.txt)6
-rw-r--r--cmake/treedata/darwin_embedded/ios/ios.txt4
-rw-r--r--cmake/treedata/darwin_embedded/subdirs.txt10
-rw-r--r--cmake/treedata/freebsd/subdirs.txt17
-rw-r--r--cmake/treedata/ios/subdirs.txt17
-rw-r--r--cmake/treedata/linux/subdirs.txt16
-rw-r--r--cmake/treedata/optional/common/aml.txt3
-rw-r--r--cmake/treedata/optional/common/gbm.txt2
-rw-r--r--cmake/treedata/osx/subdirs.txt15
-rw-r--r--cmake/treedata/windows/subdirs.txt15
-rw-r--r--cmake/treedata/windowsstore/subdirs.txt9
87 files changed, 469 insertions, 602 deletions
diff --git a/cmake/KodiConfig.cmake.in b/cmake/KodiConfig.cmake.in
index 560374dd4b..fde5add903 100644
--- a/cmake/KodiConfig.cmake.in
+++ b/cmake/KodiConfig.cmake.in
@@ -17,9 +17,6 @@ if(NOT @APP_NAME_UC@_DATA_DIR)
set(@APP_NAME_UC@_DATA_DIR @APP_DATA_DIR@)
endif()
set(APP_RENDER_SYSTEM @APP_RENDER_SYSTEM@)
-if(NOT WIN32)
- set(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS} @CXX11_SWITCH@")
-endif()
list(APPEND CMAKE_MODULE_PATH @APP_LIB_DIR@ @APP_DATA_DIR@/cmake)
string(REPLACE ";" " " ARCH_DEFINES "@ARCH_DEFINES@")
@@ -28,5 +25,8 @@ add_definitions(${ARCH_DEFINES} -DBUILD_KODI_ADDON)
set(CORE_SYSTEM_NAME @CORE_SYSTEM_NAME@)
set(PLATFORM @CORE_SYSTEM_NAME@)
set(PLATFORM_TAG @PLATFORM_TAG@)
+set(CMAKE_CXX_STANDARD @CMAKE_CXX_STANDARD@)
+set(CMAKE_CXX_STANDARD_REQUIRED @CMAKE_CXX_STANDARD_REQUIRED@)
+set(CMAKE_CXX_EXTENSIONS @CMAKE_CXX_EXTENSIONS@)
include(AddonHelpers)
diff --git a/cmake/addons/CMakeLists.txt b/cmake/addons/CMakeLists.txt
index 5fc798b545..a2a962f879 100644
--- a/cmake/addons/CMakeLists.txt
+++ b/cmake/addons/CMakeLists.txt
@@ -80,6 +80,8 @@ if (CMAKE_SYSTEM_NAME STREQUAL WindowsStore)
-DCMAKE_SYSTEM_VERSION=${CMAKE_SYSTEM_VERSION})
endif()
+include(${CORE_SOURCE_DIR}/cmake/scripts/common/CompilerSettings.cmake)
+
set(BUILD_ARGS -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}
-DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
-DPACKAGE_CONFIG_PATH=${ADDON_DEPENDS_PATH}/lib/pkgconfig
@@ -121,6 +123,17 @@ if(CMAKE_TOOLCHAIN_FILE)
message(STATUS ${BUILD_ARGS})
endif()
+# used for addons where need special folders to store there content (if
+# not set the addon define it byself).
+# e.g. Google Chromium addon where his git bring:
+# - "unable to create file" ... "Filename too long"
+# see also WARNING by Windows on: https://bitbucket.org/chromiumembedded/cef/wiki/MasterBuildQuickStart
+if(THIRD_PARTY_PATH)
+ message(STATUS "Third party lib path specified")
+ message(STATUS ${THIRD_PARTY_PATH})
+ list(APPEND BUILD_ARGS -DTHIRD_PARTY_PATH=${THIRD_PARTY_PATH})
+endif()
+
if(NOT ADDONS_TO_BUILD)
set(ADDONS_TO_BUILD "all")
else()
diff --git a/cmake/addons/bootstrap/repositories/binary-addons.txt b/cmake/addons/bootstrap/repositories/binary-addons.txt
index 8674f06b82..7e471ff948 100644
--- a/cmake/addons/bootstrap/repositories/binary-addons.txt
+++ b/cmake/addons/bootstrap/repositories/binary-addons.txt
@@ -1 +1 @@
-binary-addons https://github.com/xbmc/repo-binary-addons.git master \ No newline at end of file
+binary-addons https://github.com/xbmc/repo-binary-addons.git Matrix
diff --git a/cmake/addons/depends/common/kodi-platform/kodi-platform.txt b/cmake/addons/depends/common/kodi-platform/kodi-platform.txt
index c553769683..e5f33f31cf 100644
--- a/cmake/addons/depends/common/kodi-platform/kodi-platform.txt
+++ b/cmake/addons/depends/common/kodi-platform/kodi-platform.txt
@@ -1 +1 @@
-kodi-platform https://github.com/xbmc/kodi-platform e8574b883ffa2131f2eeb96ff3724d60b21130f7
+kodi-platform https://github.com/xbmc/kodi-platform 809c5e9d711e378561440a896fcb7dbcd009eb3d
diff --git a/cmake/addons/depends/common/p8-platform/p8-platform.txt b/cmake/addons/depends/common/p8-platform/p8-platform.txt
index ae7a3703e2..98ed58a6be 100644
--- a/cmake/addons/depends/common/p8-platform/p8-platform.txt
+++ b/cmake/addons/depends/common/p8-platform/p8-platform.txt
@@ -1 +1 @@
-p8-platform https://github.com/xbmc/platform.git 32190045c7eb6883c0662db2f91b4ceeab904fc2
+p8-platform https://github.com/xbmc/platform.git cee64e9dc0b69e8d286dc170a78effaabfa09c44
diff --git a/cmake/cpack/deb/packages/kodi.txt.in b/cmake/cpack/deb/packages/kodi.txt.in
index 5ab89054cd..4776622206 100644
--- a/cmake/cpack/deb/packages/kodi.txt.in
+++ b/cmake/cpack/deb/packages/kodi.txt.in
@@ -15,7 +15,7 @@ PACKAGE_ARCHITECTURE all
PACKAGE_SECTION video
PACKAGE_PRIORITY optional
PACKAGE_SHLIBDEPS
-PACKAGE_DEPENDS @APP_NAME_LC@-bin (>= @CPACK_DEBIAN_PACKAGE_VERSION@), @APP_NAME_LC@-bin (<< @CPACK_DEBIAN_PACKAGE_VERSION@.1~), curl, libcurl4 | libcurl3, mesa-utils, x11-utils, fonts-liberation | ttf-liberation, fonts-dejavu-core | ttf-dejavu-core, python-bluez | python-lightblue, python-imaging | python-pil, python-simplejson, libass9 | libass5 | libass4, libgif5 | libgif7, libnfs8 | libnfs4 | libnfs1, libbluray1 | libbluray2, libshairplay0, libvorbisfile3, libaacs0, libcec4, libgnutls30 | libgnutls-deb0-28 | libgnutls28 | libgnutls26, libxslt1.1, libyajl2
+PACKAGE_DEPENDS @APP_NAME_LC@-bin (>= @CPACK_DEBIAN_PACKAGE_VERSION@), @APP_NAME_LC@-bin (<< @CPACK_DEBIAN_PACKAGE_VERSION@.1~), curl, libcurl4 | libcurl3, mesa-utils, x11-utils, fonts-liberation | ttf-liberation, fonts-dejavu-core | ttf-dejavu-core, python-bluez | python-lightblue, python-imaging | python-pil, python-simplejson, libass9 | libass5 | libass4, libgif5 | libgif7, libnfs8 | libnfs4 | libnfs1, libbluray1 | libbluray2, libshairplay0, libvorbisfile3, libaacs0, libcec4, libgnutls30 | libgnutls-deb0-28 | libgnutls28 | libgnutls26, libxslt1.1
PACKAGE_RECOMMENDS libvdpau1, libva-intel-vaapi-driver, libva1
PACKAGE_SUGGESTS @APP_NAME_LC@-pvr-mythtv, @APP_NAME_LC@-pvr-vuplus, @APP_NAME_LC@-pvr-vdr-vnsi, @APP_NAME_LC@-pvr-njoy, @APP_NAME_LC@-pvr-nextpvr, @APP_NAME_LC@-pvr-mediaportal-tvserver, @APP_NAME_LC@-pvr-tvheadend-hts, @APP_NAME_LC@-pvr-dvbviewer, @APP_NAME_LC@-pvr-argustv, @APP_NAME_LC@-pvr-iptvsimple, @APP_NAME_LC@-audioencoder-vorbis, @APP_NAME_LC@-audioencoder-flac, @APP_NAME_LC@-audioencoder-lame
PACKAGE_BREAKS xbmc (<< 2:14.0~git20141019), xbmc-data, xbmc-standalone
diff --git a/cmake/installdata/ios/fontconfig.txt b/cmake/installdata/darwin_embedded/fontconfig.txt
index 1f1bd9d50b..1f1bd9d50b 100644
--- a/cmake/installdata/ios/fontconfig.txt
+++ b/cmake/installdata/darwin_embedded/fontconfig.txt
diff --git a/cmake/installdata/ios/packaging.txt b/cmake/installdata/darwin_embedded/packaging.txt
index 3d5ae4a0ba..3d5ae4a0ba 100644
--- a/cmake/installdata/ios/packaging.txt
+++ b/cmake/installdata/darwin_embedded/packaging.txt
diff --git a/cmake/installdata/ios/runtime.txt b/cmake/installdata/darwin_embedded/runtime.txt
index 3bb546754e..3bb546754e 100644
--- a/cmake/installdata/ios/runtime.txt
+++ b/cmake/installdata/darwin_embedded/runtime.txt
diff --git a/cmake/installdata/windows/addons.txt b/cmake/installdata/windows/addons.txt
index a3bdd4493b..66b583a23f 100644
--- a/cmake/installdata/windows/addons.txt
+++ b/cmake/installdata/windows/addons.txt
@@ -1,3 +1,2 @@
-addons/repository.pvr-win32.xbmc.org/*
project/BuildDependencies/${ARCH}/addons/script.module.pil KEEP_DIR_STRUCTURE addons
project/BuildDependencies/${ARCH}/addons/script.module.pycryptodome KEEP_DIR_STRUCTURE addons
diff --git a/cmake/installdata/windowsstore/addons.txt b/cmake/installdata/windowsstore/addons.txt
index 4b8678b682..3b4d9a949b 100644
--- a/cmake/installdata/windowsstore/addons.txt
+++ b/cmake/installdata/windowsstore/addons.txt
@@ -1,3 +1,2 @@
-addons/repository.pvr-win32.xbmc.org/*
project/BuildDependencies/win10-${ARCH}/addons/*
-system/addon-manifest-uwp.xml \ No newline at end of file
+system/addon-manifest-uwp.xml
diff --git a/cmake/modules/FindAML.cmake b/cmake/modules/FindAML.cmake
deleted file mode 100644
index 89d1fd985d..0000000000
--- a/cmake/modules/FindAML.cmake
+++ /dev/null
@@ -1,49 +0,0 @@
-#.rst:
-# FindAML
-# -------
-# Finds the AML codec
-#
-# This will define the following variables::
-#
-# AML_FOUND - system has AML
-# AML_INCLUDE_DIRS - the AML include directory
-# AML_DEFINITIONS - the AML definitions
-#
-# and the following imported targets::
-#
-# AML::AML - The AML codec
-
-find_path(AML_INCLUDE_DIR codec_error.h
- PATH_SUFFIXES amcodec)
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(AML
- REQUIRED_VARS AML_INCLUDE_DIR)
-
-include(CheckCSourceCompiles)
-set(CMAKE_REQUIRED_INCLUDES ${AML_INCLUDE_DIR})
-check_c_source_compiles("#include <amcodec/codec.h>
-
- int main()
- {
- int i = VIDEO_DEC_FORMAT_VP9;
- return 0;
- }
- " AML_HAS_VP9)
-
-if(AML_FOUND)
- set(AML_INCLUDE_DIRS ${AML_INCLUDE_DIR})
- set(AML_DEFINITIONS -DHAS_LIBAMCODEC=1)
- if(AML_HAS_VP9)
- list(APPEND AML_DEFINITIONS -DHAS_LIBAMCODEC_VP9=1)
- endif()
-
- if(NOT TARGET AML::AML)
- add_library(AML::AML UNKNOWN IMPORTED)
- set_target_properties(AML::AML PROPERTIES
- INTERFACE_INCLUDE_DIRECTORIES "${AML_INCLUDE_DIR}"
- INTERFACE_COMPILE_DEFINITIONS HAS_LIBAMCODEC=1)
- endif()
-endif()
-
-mark_as_advanced(AMLCODEC_INCLUDE_DIR)
diff --git a/cmake/modules/FindBluray.cmake b/cmake/modules/FindBluray.cmake
index 58a9a912cb..34bc50ef54 100644
--- a/cmake/modules/FindBluray.cmake
+++ b/cmake/modules/FindBluray.cmake
@@ -48,6 +48,10 @@ if(BLURAY_FOUND)
list(APPEND BLURAY_DEFINITIONS -DHAVE_LIBBLURAY_BDJ=1)
endif()
+ if(${BLURAY_LIBRARY} MATCHES ".+\.a$" AND PC_BLURAY_STATIC_LIBRARIES)
+ list(APPEND BLURAY_LIBRARIES ${PC_BLURAY_STATIC_LIBRARIES})
+ endif()
+
if(NOT TARGET Bluray::Bluray)
add_library(Bluray::Bluray UNKNOWN IMPORTED)
if(BLURAY_LIBRARY)
diff --git a/cmake/modules/FindCCache.cmake b/cmake/modules/FindCCache.cmake
index 956dee218d..a18d4e03e0 100644
--- a/cmake/modules/FindCCache.cmake
+++ b/cmake/modules/FindCCache.cmake
@@ -12,7 +12,16 @@ include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(CCache REQUIRED_VARS CCACHE_PROGRAM)
if(CCACHE_FOUND)
- # Supports Unix Makefiles and Ninja
+ # Supports Unix Makefiles, Ninja and Xcode
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}")
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK "${CCACHE_PROGRAM}")
+
+ file(WRITE "${CMAKE_BINARY_DIR}/launch-c" "exec \"${CCACHE_PROGRAM}\" \"${CMAKE_C_COMPILER}\" \"$@\"\n")
+ file(WRITE "${CMAKE_BINARY_DIR}/launch-cxx" "exec \"${CCACHE_PROGRAM}\" \"${CMAKE_CXX_COMPILER}\" \"$@\"\n")
+ execute_process(COMMAND chmod +x "${CMAKE_BINARY_DIR}/launch-c" "${CMAKE_BINARY_DIR}/launch-cxx")
+
+ set(CMAKE_XCODE_ATTRIBUTE_CC "${CMAKE_BINARY_DIR}/launch-c" PARENT_SCOPE)
+ set(CMAKE_XCODE_ATTRIBUTE_CXX "${CMAKE_BINARY_DIR}/launch-cxx" PARENT_SCOPE)
+ set(CMAKE_XCODE_ATTRIBUTE_LD "${CMAKE_BINARY_DIR}/launch-c" PARENT_SCOPE)
+ set(CMAKE_XCODE_ATTRIBUTE_LDPLUSPLUS "${CMAKE_BINARY_DIR}/launch-cxx" PARENT_SCOPE)
endif()
diff --git a/cmake/modules/FindCXX11.cmake b/cmake/modules/FindCXX11.cmake
deleted file mode 100644
index c0b9a52d20..0000000000
--- a/cmake/modules/FindCXX11.cmake
+++ /dev/null
@@ -1,18 +0,0 @@
-include(TestCXXAcceptsFlag)
-
-# try to use compiler flag -std=c++11
-check_cxx_accepts_flag("-std=c++11" CXX_FLAG_CXX11)
-if(CXX_FLAG_CXX11)
- add_options (CXX ALL_BUILDS "-std=c++11")
- set(CXX_STD11_FLAGS "-std=c++11")
-else()
- # try to use compiler flag -std=c++0x for older compilers
- check_cxx_accepts_flag("-std=c++0x" CXX_FLAG_CXX0X)
- if(CXX_FLAG_CXX0X)
- add_options (CXX ALL_BUILDS "-std=c++0x")
- set(CXX_STD11_FLAGS "-std=c++0x")
- endif()
-endif()
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(CXX11 DEFAULT_MSG CXX_STD11_FLAGS)
diff --git a/cmake/modules/FindClangFormat.cmake b/cmake/modules/FindClangFormat.cmake
new file mode 100644
index 0000000000..7220d31623
--- /dev/null
+++ b/cmake/modules/FindClangFormat.cmake
@@ -0,0 +1,11 @@
+#.rst:
+# FindClangFormat
+# ----------
+# Finds clang-format
+
+find_program(CLANG_FORMAT_EXECUTABLE clang-format)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(ClangFormat REQUIRED_VARS CLANG_FORMAT_EXECUTABLE)
+
+mark_as_advanced(CLANG_FORMAT_EXECUTABLE)
diff --git a/cmake/modules/FindCpluff.cmake b/cmake/modules/FindCpluff.cmake
deleted file mode 100644
index 9e29e1736c..0000000000
--- a/cmake/modules/FindCpluff.cmake
+++ /dev/null
@@ -1,51 +0,0 @@
-# - Builds Cpluff as external project
-# Once done this will define
-#
-# CPLUFF_FOUND - system has cpluff
-# CPLUFF_INCLUDE_DIRS - the cpluff include directories
-#
-# and link Kodi against the cpluff libraries.
-
-find_package(EXPAT REQUIRED)
-if(CORE_SYSTEM_NAME MATCHES windows)
- add_subdirectory(${CMAKE_SOURCE_DIR}/lib/cpluff)
- set(CPLUFF_LIBRARIES $<TARGET_FILE:libcpluff> ${EXPAT_LIBRARIES})
-else()
- string(REPLACE ";" " " defines "${CMAKE_C_FLAGS} ${SYSTEM_DEFINES} -I${EXPAT_INCLUDE_DIR}")
- get_filename_component(expat_dir ${EXPAT_LIBRARY} DIRECTORY)
- set(ldflags "-L${expat_dir}")
-
- # iOS: Without specifying -arch, configure tries to use /bin/cpp as C-preprocessor
- # http://stackoverflow.com/questions/38836754/cant-cross-compile-c-library-for-arm-ios
- if(CORE_SYSTEM_NAME STREQUAL ios)
- set(cppflags "-arch ${CPU}")
- endif()
-
- ExternalProject_Add(libcpluff SOURCE_DIR ${CMAKE_SOURCE_DIR}/lib/cpluff
- BUILD_IN_SOURCE 1
- PREFIX ${CORE_BUILD_DIR}/cpluff
- CONFIGURE_COMMAND AR=${CMAKE_AR} RANLIB=${CMAKE_RANLIB} CC=${CMAKE_C_COMPILER} ${CMAKE_SOURCE_DIR}/lib/cpluff/configure
- --disable-nls
- --enable-static
- --disable-shared
- --with-pic
- --prefix=<INSTALL_DIR>
- --libdir=<INSTALL_DIR>/lib
- --host=${ARCH}
- CFLAGS=${defines}
- CPPFLAGS=${cppflags}
- LDFLAGS=${ldflags}
- BUILD_BYPRODUCTS <INSTALL_DIR>/lib/libcpluff.a)
- ExternalProject_Add_Step(libcpluff autoreconf
- DEPENDEES download update patch
- DEPENDERS configure
- COMMAND rm -f config.status
- COMMAND PATH=${NATIVEPREFIX}/bin:$ENV{PATH} autoreconf -vif
- WORKING_DIRECTORY <SOURCE_DIR>)
-
- set(CPLUFF_LIBRARIES ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/cpluff/lib/libcpluff.a ${EXPAT_LIBRARIES})
-endif()
-set(CPLUFF_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/cpluff/include)
-set(CPLUFF_FOUND 1)
-mark_as_advanced(CPLUFF_INCLUDE_DIRS CPLUFF_LIBRARIES)
-set_target_properties(libcpluff PROPERTIES FOLDER "External Projects")
diff --git a/cmake/modules/FindCrossGUID.cmake b/cmake/modules/FindCrossGUID.cmake
index 7384747b20..d84e33ba4c 100644
--- a/cmake/modules/FindCrossGUID.cmake
+++ b/cmake/modules/FindCrossGUID.cmake
@@ -34,9 +34,6 @@ if(ENABLE_INTERNAL_CROSSGUID)
<SOURCE_DIR> &&
${CMAKE_COMMAND} -E copy
${CMAKE_SOURCE_DIR}/tools/depends/target/crossguid/FindUUID.cmake
- <SOURCE_DIR> &&
- ${CMAKE_COMMAND} -E copy
- ${CMAKE_SOURCE_DIR}/tools/depends/target/crossguid/FindCXX11.cmake
<SOURCE_DIR>
BUILD_BYPRODUCTS ${CROSSGUID_LIBRARY})
set_target_properties(crossguid PROPERTIES FOLDER "External Projects")
diff --git a/cmake/modules/FindCurl.cmake b/cmake/modules/FindCurl.cmake
index 6ccf44ac23..6411a92915 100644
--- a/cmake/modules/FindCurl.cmake
+++ b/cmake/modules/FindCurl.cmake
@@ -25,6 +25,19 @@ find_library(CURL_LIBRARY NAMES curl libcurl libcurl_imp
set(CURL_VERSION ${PC_CURL_VERSION})
+set(CURL_LIB_TYPE SHARED)
+set(CURL_LDFLAGS ${PC_CURL_LDFLAGS})
+
+# check if curl is statically linked
+if(${CURL_LIBRARY} MATCHES ".+\.a$" AND PC_CURL_STATIC_LDFLAGS)
+ set(CURL_LIB_TYPE STATIC)
+ set(CURL_LDFLAGS ${PC_CURL_STATIC_LDFLAGS})
+
+ pkg_check_modules(PC_NGHTTP2 libnghttp2 QUIET)
+ find_library(NGHTTP2_LIBRARY NAMES libnghttp2 nghttp2
+ PATHS ${PC_NGHTTP2_LIBDIR})
+endif()
+
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Curl
REQUIRED_VARS CURL_LIBRARY CURL_INCLUDE_DIR
@@ -32,10 +45,10 @@ find_package_handle_standard_args(Curl
if(CURL_FOUND)
set(CURL_INCLUDE_DIRS ${CURL_INCLUDE_DIR})
- set(CURL_LIBRARIES ${CURL_LIBRARY})
+ set(CURL_LIBRARIES ${CURL_LIBRARY} ${NGHTTP2_LIBRARY})
if(NOT TARGET Curl::Curl)
- add_library(Curl::Curl UNKNOWN IMPORTED)
+ add_library(Curl::Curl ${CURL_LIB_TYPE} IMPORTED)
set_target_properties(Curl::Curl PROPERTIES
IMPORTED_LOCATION "${CURL_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${CURL_INCLUDE_DIR}")
@@ -46,4 +59,4 @@ if(CURL_FOUND)
endif()
endif()
-mark_as_advanced(CURL_INCLUDE_DIR CURL_LIBRARY)
+mark_as_advanced(CURL_INCLUDE_DIR CURL_LIBRARY CURL_LDFLAGS)
diff --git a/cmake/modules/FindFlatBuffers.cmake b/cmake/modules/FindFlatBuffers.cmake
index 6f7e6a2f25..5ca67c5748 100644
--- a/cmake/modules/FindFlatBuffers.cmake
+++ b/cmake/modules/FindFlatBuffers.cmake
@@ -11,7 +11,7 @@
if(ENABLE_INTERNAL_FLATBUFFERS)
include(ExternalProject)
- file(STRINGS ${CMAKE_SOURCE_DIR}/tools/depends/native/flatbuffers-native/Makefile VER REGEX "^[ ]*VERSION[ ]*=.+$")
+ file(STRINGS ${CMAKE_SOURCE_DIR}/tools/depends/native/flatbuffers/Makefile VER REGEX "^[ ]*VERSION[ ]*=.+$")
string(REGEX REPLACE "^[ ]*VERSION[ ]*=[ ]*" "" FLATBUFFERS_VER "${VER}")
# Allow user to override the download URL with a local tarball
@@ -43,7 +43,6 @@ if(ENABLE_INTERNAL_FLATBUFFERS)
-DFLATBUFFERS_BUILD_GRPCTEST=OFF
-DFLATBUFFERS_BUILD_SHAREDLIB=OFF
"${EXTRA_ARGS}"
- PATCH_COMMAND patch -p1 < ${CORE_SOURCE_DIR}/tools/depends/native/flatbuffers-native/0001-Fix-compiler-warning.patch
BUILD_BYPRODUCTS ${FLATBUFFERS_FLATC_EXECUTABLE})
set_target_properties(flatbuffers PROPERTIES FOLDER "External Projects"
INTERFACE_INCLUDE_DIRECTORIES ${FLATBUFFERS_INCLUDE_DIR})
diff --git a/cmake/modules/FindFriBidi.cmake b/cmake/modules/FindFriBidi.cmake
index 91f3994e81..7a135e7e85 100644
--- a/cmake/modules/FindFriBidi.cmake
+++ b/cmake/modules/FindFriBidi.cmake
@@ -17,7 +17,8 @@ if(PKG_CONFIG_FOUND)
pkg_check_modules(PC_FRIBIDI fribidi QUIET)
endif()
-find_path(FRIBIDI_INCLUDE_DIR NAMES fribidi/fribidi.h
+find_path(FRIBIDI_INCLUDE_DIR NAMES fribidi.h
+ PATH_SUFFIXES fribidi
PATHS ${PC_FRIBIDI_INCLUDEDIR})
find_library(FRIBIDI_LIBRARY NAMES fribidi libfribidi
PATHS ${PC_FRIBIDI_LIBDIR})
diff --git a/cmake/modules/FindLibDRM.cmake b/cmake/modules/FindLibDRM.cmake
index 5c899f69bf..4b39de31e9 100644
--- a/cmake/modules/FindLibDRM.cmake
+++ b/cmake/modules/FindLibDRM.cmake
@@ -14,7 +14,7 @@
# LibDRM::LibDRM - The LibDRM library
if(PKG_CONFIG_FOUND)
- pkg_check_modules(PC_LIBDRM libdrm>=2.4.74 QUIET)
+ pkg_check_modules(PC_LIBDRM libdrm>=2.4.82 QUIET)
endif()
find_path(LIBDRM_INCLUDE_DIR NAMES drm.h
diff --git a/cmake/modules/FindLibDvd.cmake b/cmake/modules/FindLibDvd.cmake
index bd08b942f5..7358e40ee7 100644
--- a/cmake/modules/FindLibDvd.cmake
+++ b/cmake/modules/FindLibDvd.cmake
@@ -233,6 +233,7 @@ else()
set(LIBDVD_TARGET_DIR dlls)
endif()
copy_file_to_buildtree(${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/libdvd/bin/libdvdnav.dll DIRECTORY ${LIBDVD_TARGET_DIR})
+ add_dependencies(export-files dvdnav)
endif()
set(LIBDVD_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/libdvd/include)
diff --git a/cmake/modules/FindMicroHttpd.cmake b/cmake/modules/FindMicroHttpd.cmake
index e6127f3d88..a0b91a0085 100644
--- a/cmake/modules/FindMicroHttpd.cmake
+++ b/cmake/modules/FindMicroHttpd.cmake
@@ -35,15 +35,7 @@ if(MICROHTTPD_FOUND)
set(MICROHTTPD_INCLUDE_DIRS ${MICROHTTPD_INCLUDE_DIR})
set(MICROHTTPD_DEFINITIONS -DHAS_WEB_SERVER=1 -DHAS_WEB_INTERFACE=1)
- if(KODI_DEPENDSBUILD AND NOT WIN32)
- find_library(GCRYPT_LIBRARY gcrypt)
- find_library(GPGERROR_LIBRARY gpg-error)
- list(APPEND MICROHTTPD_LIBRARIES ${GCRYPT_LIBRARY} ${GPGERROR_LIBRARY})
- mark_as_advanced(GCRYPT_LIBRARY GPGERROR_LIBRARY)
- if(NOT APPLE AND NOT CORE_SYSTEM_NAME STREQUAL android)
- list(APPEND MICROHTTPD_LIBRARIES rt)
- endif()
- else()
+ if(${MICROHTTPD_LIBRARY} MATCHES ".+\.a$" AND PC_MICROHTTPD_STATIC_LIBRARIES)
list(APPEND MICROHTTPD_LIBRARIES ${PC_MICROHTTPD_STATIC_LIBRARIES})
endif()
endif()
diff --git a/cmake/modules/FindOpenGLES.cmake b/cmake/modules/FindOpenGLES.cmake
index 0191d9e78c..43a1367a52 100644
--- a/cmake/modules/FindOpenGLES.cmake
+++ b/cmake/modules/FindOpenGLES.cmake
@@ -18,7 +18,7 @@ if(PKG_CONFIG_FOUND)
pkg_check_modules(PC_OPENGLES ${_brcmprefix}glesv2 QUIET)
endif()
-if(NOT CORE_SYSTEM_NAME STREQUAL ios)
+if(NOT CORE_SYSTEM_NAME STREQUAL darwin_embedded)
find_path(OPENGLES_INCLUDE_DIR GLES2/gl2.h
PATHS ${PC_OPENGLES_INCLUDEDIR})
find_library(OPENGLES_gl_LIBRARY NAMES ${_brcmprefix}GLESv2
diff --git a/cmake/modules/FindPlist.cmake b/cmake/modules/FindPlist.cmake
index cd143e982b..2c86b7493a 100644
--- a/cmake/modules/FindPlist.cmake
+++ b/cmake/modules/FindPlist.cmake
@@ -23,20 +23,13 @@ find_path(PLIST_INCLUDE_DIR plist/plist.h
set(PLIST_VERSION ${PC_PLIST_VERSION})
+find_library(PLIST_LIBRARY NAMES plist libplist
+ PATHS ${PC_PLIST_LIBDIR})
+
include(FindPackageHandleStandardArgs)
-if(NOT WIN32)
- find_library(PLIST_LIBRARY NAMES plist
- PATHS ${PC_PLIST_LIBDIR})
-
- find_package_handle_standard_args(Plist
- REQUIRED_VARS PLIST_LIBRARY PLIST_INCLUDE_DIR
- VERSION_VAR PLIST_VERSION)
-else()
- # Dynamically loaded DLL
- find_package_handle_standard_args(Plist
- REQUIRED_VARS PLIST_INCLUDE_DIR
- VERSION_VAR PLIST_VERSION)
-endif()
+find_package_handle_standard_args(Plist
+ REQUIRED_VARS PLIST_LIBRARY PLIST_INCLUDE_DIR
+ VERSION_VAR PLIST_VERSION)
if(PLIST_FOUND)
set(PLIST_LIBRARIES ${PLIST_LIBRARY})
diff --git a/cmake/modules/FindShairplay.cmake b/cmake/modules/FindShairplay.cmake
index bbb3372d6f..506cffd9af 100644
--- a/cmake/modules/FindShairplay.cmake
+++ b/cmake/modules/FindShairplay.cmake
@@ -17,32 +17,26 @@
find_path(SHAIRPLAY_INCLUDE_DIR shairplay/raop.h)
include(FindPackageHandleStandardArgs)
-if(NOT WIN32)
- find_library(SHAIRPLAY_LIBRARY NAMES shairplay)
-
- if(SHAIRPLAY_INCLUDE_DIR AND SHAIRPLAY_LIBRARY)
- include(CheckCSourceCompiles)
- set(CMAKE_REQUIRED_INCLUDES ${SHAIRPLAY_INCLUDE_DIRS})
- set(CMAKE_REQUIRED_LIBRARIES ${SHAIRPLAY_LIBRARIES})
- check_c_source_compiles("#include <shairplay/raop.h>
-
- int main()
- {
- struct raop_callbacks_s foo;
- foo.cls;
- return 0;
- }
- " HAVE_SHAIRPLAY_CALLBACK_CLS)
- endif()
-
- find_package_handle_standard_args(Shairplay
- REQUIRED_VARS SHAIRPLAY_LIBRARY SHAIRPLAY_INCLUDE_DIR HAVE_SHAIRPLAY_CALLBACK_CLS)
-else()
- # Dynamically loaded DLL
- find_package_handle_standard_args(Shairplay
- REQUIRED_VARS SHAIRPLAY_INCLUDE_DIR)
+find_library(SHAIRPLAY_LIBRARY NAMES shairplay libshairplay)
+
+if(SHAIRPLAY_INCLUDE_DIR AND SHAIRPLAY_LIBRARY)
+ include(CheckCSourceCompiles)
+ set(CMAKE_REQUIRED_INCLUDES ${SHAIRPLAY_INCLUDE_DIR})
+ set(CMAKE_REQUIRED_LIBRARIES ${SHAIRPLAY_LIBRARIES})
+ check_c_source_compiles("#include <shairplay/raop.h>
+
+ int main()
+ {
+ struct raop_callbacks_s foo;
+ foo.cls;
+ return 0;
+ }
+ " HAVE_SHAIRPLAY_CALLBACK_CLS)
endif()
+find_package_handle_standard_args(Shairplay
+ REQUIRED_VARS SHAIRPLAY_LIBRARY SHAIRPLAY_INCLUDE_DIR HAVE_SHAIRPLAY_CALLBACK_CLS)
+
if(SHAIRPLAY_FOUND)
set(SHAIRPLAY_LIBRARIES ${SHAIRPLAY_LIBRARY})
set(SHAIRPLAY_INCLUDE_DIRS ${SHAIRPLAY_INCLUDE_DIR})
diff --git a/cmake/modules/FindYajl.cmake b/cmake/modules/FindYajl.cmake
deleted file mode 100644
index d8793e6e9e..0000000000
--- a/cmake/modules/FindYajl.cmake
+++ /dev/null
@@ -1,62 +0,0 @@
-#.rst:
-# FindYajl
-# --------
-# Finds the Yajl library
-#
-# This will define the following variables::
-#
-# YAJL_FOUND - system has Yajl
-# YAJL_INCLUDE_DIRS - Yajl include directory
-# YAJL_LIBRARIES - the Yajl libraries
-#
-# and the following imported targets::
-#
-# Yajl::Yajl - The Yajl library
-
-if(NOT Yajl_FIND_VERSION)
- set(Yajl_FIND_VERSION 2.0.0)
-endif()
-
-if(PKG_CONFIG_FOUND)
- pkg_check_modules(PC_YAJL yajl>=${Yajl_FIND_VERSION} QUIET)
-endif()
-
-find_path(YAJL_INCLUDE_DIR NAMES yajl/yajl_common.h
- PATHS ${PC_YAJL_INCLUDEDIR})
-find_library(YAJL_LIBRARY NAMES yajl
- PATHS ${PC_YAJL_LIBDIR})
-
-if(PC_YAJL_VERSION)
- set(YAJL_VERSION_STRING ${PC_YAJL_VERSION})
-elseif(YAJL_INCLUDE_DIR AND EXISTS "${YAJL_INCLUDE_DIR}/yajl/yajl_version.h")
- file(STRINGS "${YAJL_INCLUDE_DIR}/yajl/yajl_version.h" yajl_version_str REGEX "^[ \t]*#define[ \t]+YAJL_(MAJOR|MINOR|MICRO)")
- string(REGEX REPLACE "YAJL_MAJOR ([0-9]+)" "\\1" YAJL_VERSION_MAJOR "${YAJL_VERSION_MAJOR}")
-
- string(REGEX REPLACE ".*YAJL_MAJOR ([0-9]+).*" "\\1" yajl_major "${yajl_version_str}")
- string(REGEX REPLACE ".*YAJL_MINOR ([0-9]+).*" "\\1" yajl_minor "${yajl_version_str}")
- string(REGEX REPLACE ".*YAJL_MICRO ([0-9]+).*" "\\1" yajl_micro "${yajl_version_str}")
- set(YAJL_VERSION_STRING "${yajl_major}.${yajl_minor}.${yajl_micro}")
- unset(yajl_version_str)
- unset(yajl_major)
- unset(yajl_minor)
- unset(yajl_micro)
-endif()
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(Yajl
- REQUIRED_VARS YAJL_LIBRARY YAJL_INCLUDE_DIR
- VERSION_VAR YAJL_VERSION_STRING)
-
-if(YAJL_FOUND)
- set(YAJL_INCLUDE_DIRS ${YAJL_INCLUDE_DIR})
- set(YAJL_LIBRARIES ${YAJL_LIBRARY})
-
- if(NOT TARGET Yajl::Yajl)
- add_library(Yajl::Yajl UNKNOWN IMPORTED)
- set_target_properties(Yajl::Yajl PROPERTIES
- IMPORTED_LOCATION "${YAJL_LIBRARY}"
- INTERFACE_INCLUDE_DIRECTORIES "${YAJL_INCLUDE_DIR}")
- endif()
-endif()
-
-mark_as_advanced(YAJL_INCLUDE_DIR YAJL_LIBRARY)
diff --git a/cmake/platform/android/android.cmake b/cmake/platform/android/android.cmake
index c857cba310..1450d2816b 100644
--- a/cmake/platform/android/android.cmake
+++ b/cmake/platform/android/android.cmake
@@ -1 +1,2 @@
set(PLATFORM_REQUIRED_DEPS OpenGLES EGL Zip)
+set(APP_RENDER_SYSTEM gles)
diff --git a/cmake/platform/android/defines.txt b/cmake/platform/android/defines.txt
index fa103d0060..4b70e5959a 100644
--- a/cmake/platform/android/defines.txt
+++ b/cmake/platform/android/defines.txt
@@ -1 +1 @@
--DTARGET_POSIX -DTARGET_LINUX -D_LINUX -DTARGET_ANDROID
+-DTARGET_POSIX -DTARGET_LINUX -DTARGET_ANDROID
diff --git a/cmake/platform/darwin_embedded/defines.txt b/cmake/platform/darwin_embedded/defines.txt
new file mode 100644
index 0000000000..603d749da2
--- /dev/null
+++ b/cmake/platform/darwin_embedded/defines.txt
@@ -0,0 +1 @@
+-DTARGET_POSIX -DTARGET_DARWIN -DTARGET_DARWIN_EMBEDDED
diff --git a/cmake/platform/darwin_embedded/ios.cmake b/cmake/platform/darwin_embedded/ios.cmake
new file mode 100644
index 0000000000..4c377b7ae6
--- /dev/null
+++ b/cmake/platform/darwin_embedded/ios.cmake
@@ -0,0 +1,3 @@
+set(PLATFORM_REQUIRED_DEPS OpenGLES)
+set(APP_RENDER_SYSTEM gles)
+list(APPEND PLATFORM_DEFINES -DTARGET_DARWIN_IOS)
diff --git a/cmake/platform/freebsd/defines.txt b/cmake/platform/freebsd/defines.txt
index 94835971a3..bd23e57fae 100644
--- a/cmake/platform/freebsd/defines.txt
+++ b/cmake/platform/freebsd/defines.txt
@@ -1 +1 @@
--DTARGET_POSIX -DTARGET_FREEBSD -D_LINUX
+-DTARGET_POSIX -DTARGET_FREEBSD
diff --git a/cmake/platform/freebsd/x11.cmake b/cmake/platform/freebsd/x11.cmake
index 656fd66572..09cebde3db 100644
--- a/cmake/platform/freebsd/x11.cmake
+++ b/cmake/platform/freebsd/x11.cmake
@@ -1,2 +1,3 @@
set(PLATFORM_REQUIRED_DEPS OpenGl EGL X XRandR LibDRM)
set(PLATFORM_OPTIONAL_DEPS VAAPI VDPAU GLX)
+set(APP_RENDER_SYSTEM gl)
diff --git a/cmake/platform/ios/defines.txt b/cmake/platform/ios/defines.txt
deleted file mode 100644
index d0989ea1ce..0000000000
--- a/cmake/platform/ios/defines.txt
+++ /dev/null
@@ -1 +0,0 @@
--DTARGET_POSIX -DTARGET_DARWIN -DTARGET_DARWIN_IOS -D_LINUX
diff --git a/cmake/platform/ios/ios.cmake b/cmake/platform/ios/ios.cmake
deleted file mode 100644
index ab0f361a92..0000000000
--- a/cmake/platform/ios/ios.cmake
+++ /dev/null
@@ -1 +0,0 @@
-set(PLATFORM_REQUIRED_DEPS OpenGLES)
diff --git a/cmake/platform/linux/aml.cmake b/cmake/platform/linux/aml.cmake
deleted file mode 100644
index a1512269a2..0000000000
--- a/cmake/platform/linux/aml.cmake
+++ /dev/null
@@ -1,3 +0,0 @@
-set(PLATFORM_REQUIRED_DEPS OpenGLES AML EGL LibInput Xkbcommon)
-set(APP_RENDER_SYSTEM gles)
-list(APPEND PLATFORM_DEFINES -DMESA_EGL_NO_X11_HEADERS)
diff --git a/cmake/platform/linux/defines.txt b/cmake/platform/linux/defines.txt
index 3fe9c5caad..88d2e6e88a 100644
--- a/cmake/platform/linux/defines.txt
+++ b/cmake/platform/linux/defines.txt
@@ -1 +1 @@
--DTARGET_POSIX -DTARGET_LINUX -D_LINUX -fPIC
+-DTARGET_POSIX -DTARGET_LINUX -fPIC
diff --git a/cmake/platform/osx/defines.txt b/cmake/platform/osx/defines.txt
index 33b009e3a7..8ebb2baa6b 100644
--- a/cmake/platform/osx/defines.txt
+++ b/cmake/platform/osx/defines.txt
@@ -1 +1 @@
--DTARGET_POSIX -DTARGET_DARWIN -DTARGET_DARWIN_OSX -D_LINUX
+-DTARGET_POSIX -DTARGET_DARWIN -DTARGET_DARWIN_OSX
diff --git a/cmake/platform/osx/osx.cmake b/cmake/platform/osx/osx.cmake
index e81703c70b..fbe8d96131 100644
--- a/cmake/platform/osx/osx.cmake
+++ b/cmake/platform/osx/osx.cmake
@@ -1 +1,2 @@
set(PLATFORM_REQUIRED_DEPS OpenGl Sdl)
+set(APP_RENDER_SYSTEM gl)
diff --git a/cmake/platform/windows/windows.cmake b/cmake/platform/windows/windows.cmake
index dbe9417db9..b0c2992d99 100644
--- a/cmake/platform/windows/windows.cmake
+++ b/cmake/platform/windows/windows.cmake
@@ -1 +1,2 @@
-# File intentionally left empty
+set(PLATFORM_REQUIRED_DEPS D3DX11Effects)
+set(APP_RENDER_SYSTEM dx11)
diff --git a/cmake/platform/windowsstore/windowsstore.cmake b/cmake/platform/windowsstore/windowsstore.cmake
index 266fb3ee0e..b0c2992d99 100644
--- a/cmake/platform/windowsstore/windowsstore.cmake
+++ b/cmake/platform/windowsstore/windowsstore.cmake
@@ -1 +1,2 @@
-set(PLATFORM_REQUIRED_DEPS zlib)
+set(PLATFORM_REQUIRED_DEPS D3DX11Effects)
+set(APP_RENDER_SYSTEM dx11)
diff --git a/cmake/scripts/android/ArchSetup.cmake b/cmake/scripts/android/ArchSetup.cmake
index 69bb88d471..f092409ce9 100644
--- a/cmake/scripts/android/ArchSetup.cmake
+++ b/cmake/scripts/android/ArchSetup.cmake
@@ -2,7 +2,7 @@ if(NOT CMAKE_TOOLCHAIN_FILE)
message(FATAL_ERROR "CMAKE_TOOLCHAIN_FILE required for android. See ${CMAKE_SOURCE_DIR}/cmake/README.md")
endif()
-set(ARCH_DEFINES -DTARGET_POSIX -DTARGET_LINUX -D_LINUX -DTARGET_ANDROID)
+set(ARCH_DEFINES -DTARGET_POSIX -DTARGET_LINUX -DTARGET_ANDROID)
set(SYSTEM_DEFINES -D__STDC_CONSTANT_MACROS -D_LARGEFILE64_SOURCE
-D_FILE_OFFSET_BITS=64 -D__USE_FILE_OFFSET64=1)
@@ -10,6 +10,7 @@ set(SYSTEM_DEFINES -D__STDC_CONSTANT_MACROS -D_LARGEFILE64_SOURCE
set(CORE_MAIN_SOURCE ${CMAKE_SOURCE_DIR}/xbmc/platform/android/activity/XBMCApp.cpp)
set(PLATFORM_DIR platform/linux)
+set(PLATFORMDEFS_DIR platform/posix)
if(WITH_ARCH)
set(ARCH ${WITH_ARCH})
else()
@@ -35,7 +36,6 @@ endif()
list(APPEND SYSTEM_DEFINES -DHAS_ZEROCONF -DHAS_LINUX_NETWORK)
set(ENABLE_X11 OFF CACHE BOOL "" FORCE)
-set(ENABLE_AML OFF CACHE BOOL "" FORCE)
set(ENABLE_OPTICAL OFF CACHE BOOL "" FORCE)
set(ENABLE_MDNS OFF CACHE BOOL "" FORCE)
diff --git a/cmake/scripts/android/Install.cmake b/cmake/scripts/android/Install.cmake
index a121295f31..0e557d1711 100644
--- a/cmake/scripts/android/Install.cmake
+++ b/cmake/scripts/android/Install.cmake
@@ -153,13 +153,12 @@ foreach(lib IN LISTS required_dyload dyload_optional ITEMS Shairplay)
endif()
endforeach()
add_bundle_file(${ASS_LIBRARY} ${libdir} "")
-add_bundle_file(${BLURAY_LIBRARY} ${libdir} "")
+add_bundle_file(${SHAIRPLAY_LIBRARY} ${libdir} "")
add_bundle_file(${SMBCLIENT_LIBRARY} ${libdir} "")
# Main targets from Makefile.in
if(CPU MATCHES i686)
set(CPU x86)
- set(ARCH x86)
endif()
foreach(target apk obb apk-unsigned apk-obb apk-obb-unsigned apk-noobb apk-clean apk-sign)
add_custom_target(${target}
@@ -168,7 +167,6 @@ foreach(target apk obb apk-unsigned apk-obb apk-obb-unsigned apk-noobb apk-clean
CMAKE_SOURCE_DIR=${CMAKE_SOURCE_DIR}
CC=${CMAKE_C_COMPILER}
CPU=${CPU}
- ARCH=${ARCH}
HOST=${HOST}
TOOLCHAIN=${TOOLCHAIN}
PREFIX=${prefix}
diff --git a/cmake/scripts/common/AddonHelpers.cmake b/cmake/scripts/common/AddonHelpers.cmake
index d90cc8ae37..b7b0e9c222 100644
--- a/cmake/scripts/common/AddonHelpers.cmake
+++ b/cmake/scripts/common/AddonHelpers.cmake
@@ -108,7 +108,8 @@ macro (build_addon target prefix libs)
if("${include_name}" MATCHES "_DEPENDS")
# Use start definition name as base for other value type
list(GET loop_var 0 list_name)
- string(REPLACE "_DEPENDS" "" depends_name ${list_name})
+ string(REPLACE "_DEPENDS" "_MIN" depends_minver ${list_name})
+ string(REPLACE "_DEPENDS" "" depends_ver ${list_name})
string(REPLACE "_DEPENDS" "_XML_ID" xml_entry_name ${list_name})
string(REPLACE "_DEPENDS" "_USED" used_type_name ${list_name})
@@ -126,7 +127,7 @@ macro (build_addon target prefix libs)
list(GET loop_var 1 include_name)
string(REGEX REPLACE "[<>\"]|kodi/" "" include_name "${include_name}")
if(include_name MATCHES ${depend_header})
- set(ADDON_DEPENDS "${ADDON_DEPENDS}\n<import addon=\"${${xml_entry_name}}\" version=\"${${depends_name}}\"/>")
+ set(ADDON_DEPENDS "${ADDON_DEPENDS}\n<import addon=\"${${xml_entry_name}}\" minversion=\"${${depends_minver}}\" version=\"${${depends_ver}}\"/>")
# Inform with them the addon header about used type
add_definitions(-D${used_type_name})
message(STATUS "Added usage definition: ${used_type_name}")
@@ -199,7 +200,7 @@ macro (build_addon target prefix libs)
endif()
# TODO: remove this hack after v18
- string(REPLACE "<platform>\@PLATFORM\@</platform>" "<platform>@PLATFORM_TAG@</platform>" addon_file "${addon_file}")
+ string(REPLACE "<platform>\@PLATFORM\@</platform>" "<platform>\@PLATFORM_TAG\@</platform>" addon_file "${addon_file}")
string(CONFIGURE "${addon_file}" addon_file_conf @ONLY)
file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${target}/addon.xml CONTENT "${addon_file_conf}")
@@ -276,6 +277,18 @@ macro (build_addon target prefix libs)
install(FILES ${${prefix}_ADDITIONAL_BINARY} DESTINATION ${target}
COMPONENT ${target}-${${prefix}_VERSION}-${PLATFORM_TAG})
endif()
+ if(${prefix}_ADDITIONAL_BINARY_EXE)
+ install(PROGRAMS ${${prefix}_ADDITIONAL_BINARY_EXE} DESTINATION ${target}
+ COMPONENT ${target}-${${prefix}_VERSION}-${PLATFORM_TAG})
+ endif()
+ if(${prefix}_ADDITIONAL_BINARY_PARTS)
+ install(FILES ${${prefix}_ADDITIONAL_BINARY_PARTS} DESTINATION ${target}
+ COMPONENT ${target}-${${prefix}_VERSION}-${PLATFORM_TAG})
+ endif()
+ if(${prefix}_ADDITIONAL_BINARY_DIRS)
+ install(DIRECTORY ${${prefix}_ADDITIONAL_BINARY_DIRS} DESTINATION ${target} USE_SOURCE_PERMISSIONS
+ COMPONENT ${target}-${${prefix}_VERSION}-${PLATFORM_TAG})
+ endif()
else() # NOT WIN32
if(NOT CPACK_PACKAGE_DIRECTORY)
set(CPACK_PACKAGE_DIRECTORY ${CMAKE_BINARY_DIR})
@@ -296,6 +309,18 @@ macro (build_addon target prefix libs)
install(FILES ${${prefix}_ADDITIONAL_BINARY} DESTINATION ${target}
COMPONENT ${target}-${${prefix}_VERSION}-${PLATFORM_TAG})
endif()
+ if(${prefix}_ADDITIONAL_BINARY_EXE)
+ install(PROGRAMS ${${prefix}_ADDITIONAL_BINARY_EXE} DESTINATION ${target}
+ COMPONENT ${target}-${${prefix}_VERSION}-${PLATFORM_TAG})
+ endif()
+ if(${prefix}_ADDITIONAL_BINARY_PARTS)
+ install(FILES ${${prefix}_ADDITIONAL_BINARY_PARTS} DESTINATION ${target}
+ COMPONENT ${target}-${${prefix}_VERSION}-${PLATFORM_TAG})
+ endif()
+ if(${prefix}_ADDITIONAL_BINARY_DIRS)
+ install(DIRECTORY ${${prefix}_ADDITIONAL_BINARY_DIRS} DESTINATION ${target} USE_SOURCE_PERMISSIONS
+ COMPONENT ${target}-${${prefix}_VERSION}-${PLATFORM_TAG})
+ endif()
endif()
add_cpack_workaround(${target} ${${prefix}_VERSION} ${ext})
else()
@@ -339,6 +364,15 @@ macro (build_addon target prefix libs)
if(${prefix}_ADDITIONAL_BINARY)
install(FILES ${${prefix}_ADDITIONAL_BINARY} DESTINATION ${CMAKE_INSTALL_LIBDIR}/addons/${target})
endif()
+ if(${prefix}_ADDITIONAL_BINARY_EXE)
+ install(PROGRAMS ${${prefix}_ADDITIONAL_BINARY_EXE} DESTINATION ${CMAKE_INSTALL_LIBDIR}/addons/${target})
+ endif()
+ if(${prefix}_ADDITIONAL_BINARY_PARTS)
+ install(FILES ${${prefix}_ADDITIONAL_BINARY_PARTS} DESTINATION ${CMAKE_INSTALL_LIBDIR}/addons/${target})
+ endif()
+ if(${prefix}_ADDITIONAL_BINARY_DIRS)
+ install(DIRECTORY ${${prefix}_ADDITIONAL_BINARY_DIRS} DESTINATION ${CMAKE_INSTALL_LIBDIR}/addons/${target} USE_SOURCE_PERMISSIONS)
+ endif()
endif()
if(${APP_NAME_UC}_BUILD_DIR)
file(GLOB_RECURSE files ${CMAKE_CURRENT_SOURCE_DIR}/${target}/*)
diff --git a/cmake/scripts/common/AddonHelpers.dox b/cmake/scripts/common/AddonHelpers.dox
new file mode 100644
index 0000000000..d3acec011d
--- /dev/null
+++ b/cmake/scripts/common/AddonHelpers.dox
@@ -0,0 +1,59 @@
+/*!
+\addtogroup cpp_cmake
+
+Kodi which uses it as a library for its binary addons has a special build
+system for this.
+
+To implement this, a CMake macro brought by Kodi is used, this is
+"build_addon (...)". This processes various definitions passed by the addon to
+process the construction.
+
+
+--------------------------------------------------------------------------------
+
+<b>Here a minmal example of the for addon used CMakeLists.txt:</b>
+
+~~~~~~~~~~~~~{.cmake}
+cmake_minimum_required(VERSION 3.5)
+project(example.addon)
+
+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR})
+
+find_package(Kodi REQUIRED)
+
+include_directories(${KODI_INCLUDE_DIR}
+
+set(DEPLIBS ) # Here empty
+set(EXAMPLE_SOURCES src/main.cpp)
+set(EXAMPLE_HEADERS src/main.h)
+
+build_addon((example.addon EXAMPLE DEPLIBS)
+
+include(CPack)
+~~~~~~~~~~~~~
+
+
+--------------------------------------------------------------------------------
+
+This is a list of special variables that can be passed to the macro.
+The parts defined with "*" must be given the second name given to the macro.
+
+Here to define the necessary creation and installation files on addon CMakeLists.txt:
+| Name | Description
+|-----------------------------|-------------------------------------------------
+| *_SOURCES | List of source code files to be complicated.
+| *_HEADERS | List of used source code header files.
+| *_CUSTOM_BINARY | For special cases where an already created library from an external source is inserted, the <b>"* _SOURCES"</b> and <b>"* _HEADERS"</b> are unused in this case.<br>This is currently used primarily on game addons.
+| *_CUSTOM_DATA | To add additional required data from a folder, which are stored in the shared folder of the addon.<br>With a "/" at the end of the content given to the folder is used, without the folder itself.
+| *_ADDITIONAL_BINARY | In case the additional library has to be installed for the addon, the path or CMake name can be given here.
+| *_ADDITIONAL_BINARY_EXE | In case you need to addon an additional application you can give the path or CMake name, it will be in the same folder as the addon library.<br>The mode bits are set there as EXE.
+| *_ADDITIONAL_BINARY_DIRS | To add complete folders additionally to folders containing the addon library.<br>With a "/" at the end of the content given to the folder is used, without the folder itself.
+
+External creation Options, given by `-D...`:
+| Name | Description
+|-----------------------------|-------------------------------------------------
+| PACKAGE_ZIP | To create a package as a ZIP file. This is also used to install locally addon together.<br>Default is OFF.
+| PACKAGE_TGZ | To create a package as a TGZ file.<br>Default is OFF.
+| BUILD_SHARED_LIBS | To define if addon library is shared or static.<br>Default is ON to have shared.
+| USE_LTO | Use link time optimization.<br>Default is OFF.
+*/
diff --git a/cmake/scripts/common/ArchSetup.cmake b/cmake/scripts/common/ArchSetup.cmake
index 470419352d..2e1eb128ad 100644
--- a/cmake/scripts/common/ArchSetup.cmake
+++ b/cmake/scripts/common/ArchSetup.cmake
@@ -18,24 +18,7 @@ include(CheckCXXSourceCompiles)
include(CheckSymbolExists)
include(CheckFunctionExists)
include(CheckIncludeFile)
-
-# Macro to check if a given type exists in a given header
-# Arguments:
-# header the header to check
-# type the type to check for existence
-# var the compiler definition to set if type exists
-# On return:
-# If type was found, the definition is added to SYSTEM_DEFINES
-macro(check_type header type var)
- check_cxx_source_compiles("#include <${header}>
- int main()
- {
- ${type} s;
- }" ${var})
- if(${var})
- list(APPEND SYSTEM_DEFINES -D${var}=1)
- endif()
-endmacro()
+include(CheckTypeSize)
# Macro to check if a given builtin function exists
# Arguments:
@@ -95,17 +78,12 @@ endif()
include(${CMAKE_SOURCE_DIR}/cmake/scripts/${CORE_SYSTEM_NAME}/ArchSetup.cmake)
message(STATUS "Core system type: ${CORE_SYSTEM_NAME}")
-message(STATUS "Platform: ${PLATFORM}")
+message(STATUS "Platform: ${CORE_PLATFORM_NAME}")
message(STATUS "CPU: ${CPU}, ARCH: ${ARCH}")
message(STATUS "Cross-Compiling: ${CMAKE_CROSSCOMPILING}")
message(STATUS "Execute build artefacts on host: ${CORE_HOST_IS_TARGET}")
message(STATUS "Depends based build: ${KODI_DEPENDSBUILD}")
-check_type(string std::u16string HAVE_STD__U16_STRING)
-check_type(string std::u32string HAVE_STD__U32_STRING)
-check_type(string char16_t HAVE_CHAR16_T)
-check_type(string char32_t HAVE_CHAR32_T)
-check_type(stdint.h uint_least16_t HAVE_STDINT_H)
check_symbol_exists(posix_fadvise fcntl.h HAVE_POSIX_FADVISE)
check_symbol_exists(PRIdMAX inttypes.h HAVE_INTTYPES_H)
check_builtin("long* temp=0; long ret=__sync_add_and_fetch(temp, 1)" HAS_BUILTIN_SYNC_ADD_AND_FETCH)
@@ -122,6 +100,10 @@ check_function_exists(localtime_r HAVE_LOCALTIME_R)
if(HAVE_LOCALTIME_R)
list(APPEND SYSTEM_DEFINES -DHAVE_LOCALTIME_R=1)
endif()
+check_function_exists(gmtime_r HAVE_GMTIME_R)
+if(HAVE_GMTIME_R)
+list(APPEND SYSTEM_DEFINES -DHAVE_GMTIME_R=1)
+endif()
if(HAVE_INTTYPES_H)
list(APPEND SYSTEM_DEFINES -DHAVE_INTTYPES_H=1)
endif()
diff --git a/cmake/scripts/common/CompilerSettings.cmake b/cmake/scripts/common/CompilerSettings.cmake
new file mode 100644
index 0000000000..b4e7e89220
--- /dev/null
+++ b/cmake/scripts/common/CompilerSettings.cmake
@@ -0,0 +1,7 @@
+# Languages and global compiler settings
+if(NOT DEFINED CMAKE_CXX_STANDARD OR CMAKE_CXX_STANDARD LESS 14)
+ set(CMAKE_CXX_STANDARD 14)
+endif()
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
+set(CMAKE_CXX_EXTENSIONS OFF)
+set(CMAKE_ASM_FLAGS "${CMAKE_C_FLAGS} -x assembler-with-cpp")
diff --git a/cmake/scripts/common/GenerateVersionedFiles.cmake b/cmake/scripts/common/GenerateVersionedFiles.cmake
index 1d324db9c5..d54b524219 100644
--- a/cmake/scripts/common/GenerateVersionedFiles.cmake
+++ b/cmake/scripts/common/GenerateVersionedFiles.cmake
@@ -24,9 +24,6 @@ foreach(loop_var ${ADDON_XML_IN_FILE})
string(REPLACE ${CORE_SOURCE_DIR} ${CMAKE_BINARY_DIR} dest_dir ${source_dir})
file(MAKE_DIRECTORY ${dest_dir})
- # copy everything except addon.xml.in to build folder
- file(COPY "${source_dir}" DESTINATION "${CMAKE_BINARY_DIR}/addons" REGEX ".xml.in" EXCLUDE)
-
configure_file(${source_dir}/addon.xml.in ${dest_dir}/addon.xml @ONLY)
unset(source_dir)
diff --git a/cmake/scripts/common/HandleDepends.cmake b/cmake/scripts/common/HandleDepends.cmake
index 47f7d9b768..6354010165 100644
--- a/cmake/scripts/common/HandleDepends.cmake
+++ b/cmake/scripts/common/HandleDepends.cmake
@@ -68,8 +68,8 @@ function(add_addon_depends addon searchpath)
-DCORE_SYSTEM_NAME=${CORE_SYSTEM_NAME}
-DENABLE_STATIC=1
-DBUILD_SHARED_LIBS=0)
- # windows store args
- if (CMAKE_SYSTEM_NAME STREQUAL WindowsStore)
+ # windows args
+ if (CMAKE_SYSTEM_NAME STREQUAL WindowsStore OR CMAKE_SYSTEM_NAME STREQUAL Windows)
list(APPEND BUILD_ARGS -DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME}
-DCMAKE_SYSTEM_VERSION=${CMAKE_SYSTEM_VERSION})
endif()
@@ -88,16 +88,23 @@ function(add_addon_depends addon searchpath)
message(${BUILD_ARGS})
endif()
- # prepare patchfile. ensure we have a clean file after reconfiguring
- set(PATCH_FILE ${BUILD_DIR}/${id}/tmp/patch.cmake)
- file(REMOVE ${PATCH_FILE})
+ # used for addons where need special folders to store there content (if
+ # not set the addon define it byself).
+ # e.g. Google Chromium addon where his git bring:
+ # - "unable to create file" ... "Filename too long"
+ # see also WARNING by Windows on: https://bitbucket.org/chromiumembedded/cef/wiki/MasterBuildQuickStart
+ if(THIRD_PARTY_PATH)
+ message(STATUS "Third party lib path specified")
+ message(STATUS ${THIRD_PARTY_PATH})
+ list(APPEND BUILD_ARGS -DTHIRD_PARTY_PATH=${THIRD_PARTY_PATH})
+ endif()
+
+ set(PATCH_COMMAND)
# if there's a CMakeLists.txt use it to prepare the build
if(EXISTS ${dir}/CMakeLists.txt)
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${dir}/CMakeLists.txt)
- file(APPEND ${PATCH_FILE}
- "file(COPY ${dir}/CMakeLists.txt
- DESTINATION ${BUILD_DIR}/${id}/src/${id})\n")
+ list(APPEND PATCH_COMMAND COMMAND ${CMAKE_COMMAND} -E copy_if_different ${dir}/CMakeLists.txt ${BUILD_DIR}/${id}/src/${id})
endif()
# check if we have patches to apply
@@ -124,14 +131,13 @@ function(add_addon_depends addon searchpath)
file(READ ${patch} patch_content_hex HEX)
# Force handle LF-only line endings
if(NOT patch_content_hex MATCHES "0d0a")
- set(PATCH_PROGRAM "\"${PATCH_PROGRAM}\" --binary")
+ list(APPEND PATCH_PROGRAM --binary)
endif()
endif()
endif()
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${patch})
- file(APPEND ${PATCH_FILE}
- "execute_process(COMMAND ${PATCH_PROGRAM} -p1 -i \"${patch}\")\n")
+ list(APPEND PATCH_COMMAND COMMAND ${PATCH_PROGRAM} -p1 -i ${patch})
endforeach()
@@ -168,18 +174,11 @@ function(add_addon_depends addon searchpath)
if(CROSS_AUTOCONF AND AUTOCONF_FILES)
foreach(afile ${AUTOCONF_FILES})
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${afile})
- file(APPEND ${PATCH_FILE}
- "message(STATUS \"AUTOCONF: copying ${afile} to ${BUILD_DIR}/${id}/src/${id}\")\n
- file(COPY ${afile} DESTINATION ${BUILD_DIR}/${id}/src/${id})\n")
+ list(APPEND PATCH_COMMAND COMMAND ${CMAKE_COMMAND} -E echo "AUTOCONF: copying ${afile} to ${BUILD_DIR}/${id}/src/${id}")
+ list(APPEND PATCH_COMMAND COMMAND ${CMAKE_COMMAND} -E copy_if_different ${afile} ${BUILD_DIR}/${id}/src/${id})
endforeach()
endif()
- # if the patch file exists we need to set the PATCH_COMMAND
- set(PATCH_COMMAND "")
- if(EXISTS ${PATCH_FILE})
- set(PATCH_COMMAND ${CMAKE_COMMAND} -P ${PATCH_FILE})
- endif()
-
# prepare the setup of the call to externalproject_add()
set(EXTERNALPROJECT_SETUP PREFIX ${BUILD_DIR}/${id}
CMAKE_ARGS ${extraflags} ${BUILD_ARGS}
diff --git a/cmake/scripts/common/Macros.cmake b/cmake/scripts/common/Macros.cmake
index eefd7c8803..1b658f0504 100644
--- a/cmake/scripts/common/Macros.cmake
+++ b/cmake/scripts/common/Macros.cmake
@@ -386,25 +386,6 @@ function(core_require_dep)
endforeach()
endfunction()
-# add required dyloaded dependencies of main application
-# Arguments:
-# dep_list One or many dependency specifications (see split_dependency_specification)
-# for syntax). The dependency name is used uppercased as variable prefix.
-# On return:
-# dependency added to ${SYSTEM_INCLUDES}, ${dep}_SONAME is set up
-function(core_require_dyload_dep)
- foreach(depspec ${ARGN})
- split_dependency_specification(${depspec} dep version)
- find_package_with_ver(${dep} ${version} REQUIRED)
- string(TOUPPER ${dep} depup)
- list(APPEND SYSTEM_INCLUDES ${${depup}_INCLUDE_DIRS})
- list(APPEND DEP_DEFINES ${${depup}_DEFINITIONS})
- find_soname(${depup} REQUIRED)
- export_dep()
- set(${depup}_SONAME ${${depup}_SONAME} PARENT_SCOPE)
- endforeach()
-endfunction()
-
# helper macro for optional deps
macro(setup_enable_switch)
string(TOUPPER ${dep} depup)
@@ -450,39 +431,6 @@ function(core_optional_dep)
set(final_message ${final_message} PARENT_SCOPE)
endfunction()
-# add optional dyloaded dependencies of main application
-# Arguments:
-# dep_list One or many dependency specifications (see split_dependency_specification)
-# for syntax). The dependency name is used uppercased as variable prefix.
-# On return:
-# dependency optionally added to ${SYSTEM_INCLUDES}, ${DEP_DEFINES}, ${dep}_SONAME is set up
-function(core_optional_dyload_dep)
- foreach(depspec ${ARGN})
- set(_required False)
- split_dependency_specification(${depspec} dep version)
- setup_enable_switch()
- if(${enable_switch} STREQUAL AUTO)
- find_package_with_ver(${dep} ${version})
- elseif(${${enable_switch}})
- find_package_with_ver(${dep} ${version} REQUIRED)
- set(_required True)
- endif()
-
- if(${depup}_FOUND)
- list(APPEND SYSTEM_INCLUDES ${${depup}_INCLUDE_DIRS})
- find_soname(${depup} REQUIRED)
- list(APPEND DEP_DEFINES ${${depup}_DEFINITIONS})
- set(final_message ${final_message} "${depup} enabled: Yes" PARENT_SCOPE)
- export_dep()
- set(${depup}_SONAME ${${depup}_SONAME} PARENT_SCOPE)
- elseif(_required)
- message(FATAL_ERROR "${depup} enabled but not found")
- else()
- set(final_message ${final_message} "${depup} enabled: No" PARENT_SCOPE)
- endif()
- endforeach()
-endfunction()
-
function(core_file_read_filtered result filepattern)
# Reads STRINGS from text files
# with comments filtered out
diff --git a/cmake/scripts/common/PrepareEnv.cmake b/cmake/scripts/common/PrepareEnv.cmake
index 20dbaf60af..ed0c11e02a 100644
--- a/cmake/scripts/common/PrepareEnv.cmake
+++ b/cmake/scripts/common/PrepareEnv.cmake
@@ -24,14 +24,6 @@ if(NOT EXISTS "${APP_INCLUDE_DIR}/")
file(MAKE_DIRECTORY ${APP_INCLUDE_DIR})
endif()
-# make sure C++11 is always set
-if(NOT WIN32)
- string(REGEX MATCH "-std=(gnu|c)\\+\\+11" cxx11flag "${CMAKE_CXX_FLAGS}")
- if(NOT cxx11flag)
- set(CXX11_SWITCH "-std=c++11")
- endif()
-endif()
-
if(NOT CORE_SYSTEM_NAME)
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
set(CORE_SYSTEM_NAME "osx")
@@ -42,6 +34,14 @@ endif()
set(PLATFORM_TAG ${CORE_SYSTEM_NAME})
+# The CPU variable is given either by ./tools/depends or by the
+# ./cmake/scripts/common/ArchSetup.cmake (which refers to the Kodi building
+# itself). However, this file is only used by addons, so CPU can not always
+# be defined, so in this case, if empty, the base CPU will be used.
+if(NOT CPU)
+ set(CPU ${CMAKE_SYSTEM_PROCESSOR})
+endif()
+
if(CORE_SYSTEM_NAME STREQUAL android)
if (CPU MATCHES "v7a")
set(PLATFORM_TAG ${PLATFORM_TAG}-armv7)
@@ -52,7 +52,8 @@ if(CORE_SYSTEM_NAME STREQUAL android)
else()
message(FATAL_ERROR "Unsupported architecture")
endif()
-elseif(CORE_SYSTEM_NAME STREQUAL ios)
+elseif(CORE_SYSTEM_NAME STREQUAL darwin_embedded)
+ set(PLATFORM_TAG ${CORE_PLATFORM_NAME})
if (CPU MATCHES armv7)
set(PLATFORM_TAG ${PLATFORM_TAG}-armv7)
elseif (CPU MATCHES arm64)
diff --git a/cmake/scripts/darwin/Macros.cmake b/cmake/scripts/darwin/Macros.cmake
new file mode 100644
index 0000000000..9a805c468c
--- /dev/null
+++ b/cmake/scripts/darwin/Macros.cmake
@@ -0,0 +1,8 @@
+macro(enable_arc)
+ if(CMAKE_GENERATOR STREQUAL Xcode)
+ set(CMAKE_XCODE_ATTRIBUTE_CLANG_ENABLE_OBJC_ARC YES)
+ else()
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fobjc-arc")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fobjc-arc")
+ endif()
+endmacro()
diff --git a/cmake/scripts/ios/ArchSetup.cmake b/cmake/scripts/darwin_embedded/ArchSetup.cmake
index 6b053dcaf3..fd1f750ed7 100644
--- a/cmake/scripts/ios/ArchSetup.cmake
+++ b/cmake/scripts/darwin_embedded/ArchSetup.cmake
@@ -1,35 +1,35 @@
if(NOT CMAKE_TOOLCHAIN_FILE)
- message(FATAL_ERROR "CMAKE_TOOLCHAIN_FILE required for ios. See ${CMAKE_SOURCE_DIR}/cmake/README.md")
+ message(FATAL_ERROR "CMAKE_TOOLCHAIN_FILE required for ios/tvos. See ${CMAKE_SOURCE_DIR}/cmake/README.md")
endif()
-set(CORE_MAIN_SOURCE ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/XBMCApplication.mm)
+set(CORE_MAIN_SOURCE ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/${CORE_PLATFORM_NAME_LC}/XBMCApplication.mm)
+set(PLATFORM_BUNDLE_INFO_PLIST ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/${CORE_PLATFORM_NAME_LC}/Info.plist.in)
-set(ARCH_DEFINES -D_LINUX -DTARGET_POSIX -DTARGET_DARWIN -DTARGET_DARWIN_IOS)
+set(ARCH_DEFINES -DTARGET_POSIX -DTARGET_DARWIN -DTARGET_DARWIN_EMBEDDED)
+if(CORE_PLATFORM_NAME_LC STREQUAL tvos)
+ list(APPEND ARCH_DEFINES -DTARGET_DARWIN_TVOS)
+else()
+ list(APPEND ARCH_DEFINES -DTARGET_DARWIN_IOS)
+endif()
set(SYSTEM_DEFINES -D_REENTRANT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE
- -D__STDC_CONSTANT_MACROS)
-set(PLATFORM_DIR platform/linux)
+ -D__STDC_CONSTANT_MACROS -DHAS_IOS_NETWORK -DHAS_ZEROCONF)
+set(PLATFORM_DIR platform/darwin)
+set(PLATFORMDEFS_DIR platform/posix)
set(CMAKE_SYSTEM_NAME Darwin)
if(WITH_ARCH)
set(ARCH ${WITH_ARCH})
else()
if(CPU STREQUAL armv7)
- set(CMAKE_OSX_ARCHITECTURES ${CPU})
set(ARCH arm)
- set(NEON True)
elseif(CPU STREQUAL arm64)
- set(CMAKE_OSX_ARCHITECTURES ${CPU})
set(ARCH aarch64)
- set(NEON True)
else()
message(SEND_ERROR "Unknown CPU: ${CPU}")
endif()
+ set(CMAKE_OSX_ARCHITECTURES ${CPU})
+ set(NEON True)
endif()
-# Additional SYSTEM_DEFINES
-list(APPEND SYSTEM_DEFINES -DHAS_LINUX_NETWORK -DHAS_ZEROCONF)
-
-find_package(CXX11 REQUIRED)
-
list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${NATIVEPREFIX})
list(APPEND DEPLIBS "-framework CoreFoundation" "-framework CoreVideo"
@@ -38,24 +38,21 @@ list(APPEND DEPLIBS "-framework CoreFoundation" "-framework CoreVideo"
"-framework CFNetwork" "-framework CoreGraphics"
"-framework Foundation" "-framework UIKit"
"-framework CoreMedia" "-framework AVFoundation"
- "-framework VideoToolbox")
+ "-framework VideoToolbox" "-lresolv")
set(ENABLE_OPTICAL OFF CACHE BOOL "" FORCE)
-set(CMAKE_XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET "9.0")
-set(CMAKE_XCODE_ATTRIBUTE_TARGETED_DEVICE_FAMILY "1,2")
-
set(CMAKE_XCODE_ATTRIBUTE_INLINES_ARE_PRIVATE_EXTERN OFF)
set(CMAKE_XCODE_ATTRIBUTE_GCC_SYMBOLS_PRIVATE_EXTERN OFF)
set(CMAKE_XCODE_ATTRIBUTE_COPY_PHASE_STRIP OFF)
+include(cmake/scripts/darwin/Macros.cmake)
+enable_arc()
+
# Xcode strips dead code by default which breaks wrapping
set(CMAKE_XCODE_ATTRIBUTE_DEAD_CODE_STRIPPING OFF)
-# Unify output directories for iOS packaging scripts
-if(NOT CMAKE_GENERATOR MATCHES Xcode)
- set(CORE_BUILD_CONFIG "${CORE_BUILD_CONFIG}-iphoneos")
-endif()
+# Unify output directories for iOS/tvOS packaging scripts
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CORE_BUILD_DIR}/${CORE_BUILD_CONFIG})
foreach(OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES})
string(TOUPPER ${OUTPUTCONFIG} OUTPUTCONFIG)
diff --git a/cmake/scripts/darwin_embedded/Install.cmake b/cmake/scripts/darwin_embedded/Install.cmake
new file mode 100644
index 0000000000..6b37fa2b78
--- /dev/null
+++ b/cmake/scripts/darwin_embedded/Install.cmake
@@ -0,0 +1,70 @@
+# IOS packaging
+
+set(BUNDLE_RESOURCES ${CMAKE_SOURCE_DIR}/media/splash.jpg
+ ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon29x29.png
+ ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon29x29@2x.png
+ ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon40x40.png
+ ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon40x40@2x.png
+ ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon50x50.png
+ ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon50x50@2x.png
+ ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon57x57.png
+ ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon57x57@2x.png
+ ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon60x60.png
+ ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon60x60@2x.png
+ ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon72x72.png
+ ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon72x72@2x.png
+ ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon76x76.png
+ ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon76x76@2x.png)
+
+target_sources(${APP_NAME_LC} PRIVATE ${BUNDLE_RESOURCES})
+foreach(file IN LISTS BUNDLE_RESOURCES)
+ set_source_files_properties(${file} PROPERTIES MACOSX_PACKAGE_LOCATION .)
+endforeach()
+
+target_sources(${APP_NAME_LC} PRIVATE ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchScreen.storyboard)
+set_source_files_properties(${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchScreen.storyboard PROPERTIES MACOSX_PACKAGE_LOCATION "Resources")
+
+# setup code signing
+
+# dev team ID / identity (certificate)
+set(DEVELOPMENT_TEAM "" CACHE STRING "Development Team")
+set(CODE_SIGN_IDENTITY $<IF:$<BOOL:${DEVELOPMENT_TEAM}>,iPhone\ Developer,> CACHE STRING "Code Sign Identity")
+
+# app provisioning profile
+set(CODE_SIGN_STYLE_APP Automatic)
+set(PROVISIONING_PROFILE_APP "" CACHE STRING "Provisioning profile name for the Kodi app")
+if(PROVISIONING_PROFILE_APP)
+ set(CODE_SIGN_STYLE_APP Manual)
+endif()
+set_target_properties(${APP_NAME_LC} PROPERTIES XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "${CODE_SIGN_IDENTITY}"
+ XCODE_ATTRIBUTE_CODE_SIGN_STYLE ${CODE_SIGN_STYLE_APP}
+ XCODE_ATTRIBUTE_DEVELOPMENT_TEAM "${DEVELOPMENT_TEAM}"
+ XCODE_ATTRIBUTE_PROVISIONING_PROFILE_SPECIFIER "${PROVISIONING_PROFILE_APP}")
+
+add_custom_command(TARGET ${APP_NAME_LC} POST_BUILD
+ # TODO: Remove in sync with CopyRootFiles-darwin_embedded expecting the ".bin" file
+ COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:${APP_NAME_LC}>
+ $<TARGET_FILE_DIR:${APP_NAME_LC}>/${APP_NAME}.bin
+
+ COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/DllPaths_generated.h
+ ${CMAKE_BINARY_DIR}/xbmc/DllPaths_generated.h
+ COMMAND "ACTION=build"
+ ${CMAKE_SOURCE_DIR}/tools/darwin/Support/CopyRootFiles-darwin_embedded.command
+ COMMAND "XBMC_DEPENDS=${DEPENDS_PATH}"
+ ${CMAKE_SOURCE_DIR}/tools/darwin/Support/copyframeworks-darwin_embedded.command
+ COMMAND "XBMC_DEPENDS=${DEPENDS_PATH}"
+ "NATIVEPREFIX=${NATIVEPREFIX}"
+ ${CMAKE_SOURCE_DIR}/tools/darwin/Support/Codesign.command
+)
+
+set(DEPENDS_ROOT_FOR_XCODE ${NATIVEPREFIX}/..)
+configure_file(${CMAKE_SOURCE_DIR}/tools/darwin/packaging/darwin_embedded/mkdeb-darwin_embedded.sh.in
+ ${CMAKE_BINARY_DIR}/tools/darwin/packaging/darwin_embedded/mkdeb-darwin_embedded.sh @ONLY)
+configure_file(${CMAKE_SOURCE_DIR}/tools/darwin/packaging/darwin_embedded/migrate_to_kodi.sh.in
+ ${CMAKE_BINARY_DIR}/tools/darwin/packaging/darwin_embedded/migrate_to_kodi.sh @ONLY)
+
+add_custom_target(deb
+ COMMAND sh ./mkdeb-darwin_embedded.sh ${CORE_BUILD_CONFIG}
+ WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/tools/darwin/packaging/darwin_embedded)
+add_dependencies(deb ${APP_NAME_LC})
+
diff --git a/cmake/scripts/ios/Macros.cmake b/cmake/scripts/darwin_embedded/Macros.cmake
index 54c1b280e0..54c1b280e0 120000
--- a/cmake/scripts/ios/Macros.cmake
+++ b/cmake/scripts/darwin_embedded/Macros.cmake
diff --git a/cmake/scripts/darwin_embedded/PathSetup.cmake b/cmake/scripts/darwin_embedded/PathSetup.cmake
new file mode 100644
index 0000000000..32373e3b9f
--- /dev/null
+++ b/cmake/scripts/darwin_embedded/PathSetup.cmake
@@ -0,0 +1,4 @@
+set(BUNDLE_IDENTIFIER_DESC "Bundle ID")
+set(PLATFORM_BUNDLE_IDENTIFIER "${APP_PACKAGE}-${CORE_PLATFORM_NAME_LC}" CACHE STRING "${BUNDLE_IDENTIFIER_DESC}")
+list(APPEND final_message "Bundle ID: ${PLATFORM_BUNDLE_IDENTIFIER}")
+include(cmake/scripts/osx/PathSetup.cmake)
diff --git a/cmake/scripts/freebsd/ArchSetup.cmake b/cmake/scripts/freebsd/ArchSetup.cmake
index 3d5599c986..dc28b9aed3 100644
--- a/cmake/scripts/freebsd/ArchSetup.cmake
+++ b/cmake/scripts/freebsd/ArchSetup.cmake
@@ -1,7 +1,8 @@
-set(ARCH_DEFINES -D_LINUX -DTARGET_POSIX -DTARGET_FREEBSD)
+set(ARCH_DEFINES -DTARGET_POSIX -DTARGET_FREEBSD)
set(SYSTEM_DEFINES -D__STDC_CONSTANT_MACROS -D_LARGEFILE64_SOURCE
-D_FILE_OFFSET_BITS=64)
set(PLATFORM_DIR platform/linux)
+set(PLATFORMDEFS_DIR platform/posix)
set(SYSTEM_LDFLAGS -L/usr/local/lib)
if(WITH_ARCH)
set(ARCH ${WITH_ARCH})
diff --git a/cmake/scripts/ios/Install.cmake b/cmake/scripts/ios/Install.cmake
deleted file mode 100644
index 7d8de72b9c..0000000000
--- a/cmake/scripts/ios/Install.cmake
+++ /dev/null
@@ -1,98 +0,0 @@
-# IOS packaging
-
-set(BUNDLE_RESOURCES ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-1100-Landscape-2436h@3x.png
- ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-1100-Portrait-2436h@3x.png
- ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-1200-Landscape-1792h@2x.png
- ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-1200-Portrait-2224h@2x.png
- ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-1200-Landscape-2224h@2x.png
- ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-1200-Portrait-2388h@2x.png
- ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-1200-Landscape-2388h@2x.png
- ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-1200-Landscape-2688h@3x.png
- ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-1200-Portrait-1792h@2x.png
- ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-1200-Portrait-2688h@3x.png
- ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-568h@2x.png
- ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-700-568h@2x.png
- ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-700-Landscape@2x~ipad.png
- ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-700-Portrait@2x~ipad.png
- ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-700@2x.png
- ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-800-667h@2x.png
- ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-800-Landscape-736h@3x.png
- ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-800-Portrait-736h@3x.png
- ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-Landscape@2x~ipad.png
- ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-Portrait@2x~ipad.png
- ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage@2x.png
- ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon29x29.png
- ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon29x29@2x.png
- ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon40x40.png
- ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon40x40@2x.png
- ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon50x50.png
- ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon50x50@2x.png
- ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon57x57.png
- ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon57x57@2x.png
- ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon60x60.png
- ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon60x60@2x.png
- ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon72x72.png
- ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon72x72@2x.png
- ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon76x76.png
- ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon76x76@2x.png)
-
-target_sources(${APP_NAME_LC} PRIVATE ${BUNDLE_RESOURCES})
-foreach(file IN LISTS BUNDLE_RESOURCES)
- set_source_files_properties(${file} PROPERTIES MACOSX_PACKAGE_LOCATION .)
-endforeach()
-
-target_sources(${APP_NAME_LC} PRIVATE ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/English.lproj/InfoPlist.strings)
-set_source_files_properties(${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/English.lproj/InfoPlist.strings PROPERTIES MACOSX_PACKAGE_LOCATION "./English.lproj")
-
-# Options for code signing propagated as env vars to Codesign.command via Xcode
-set(IOS_CODE_SIGN_IDENTITY "" CACHE STRING "Code Sign Identity")
-if(IOS_CODE_SIGN_IDENTITY)
- set_target_properties(${APP_NAME_LC} PROPERTIES XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED TRUE
- XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY ${IOS_CODE_SIGN_IDENTITY})
-endif()
-
-add_custom_command(TARGET ${APP_NAME_LC} POST_BUILD
- # TODO: Remove in sync with CopyRootFiles-ios expecting the ".bin" file
- COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:${APP_NAME_LC}>
- $<TARGET_FILE_DIR:${APP_NAME_LC}>/${APP_NAME}.bin
-
- COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/DllPaths_generated.h
- ${CMAKE_BINARY_DIR}/xbmc/DllPaths_generated.h
- COMMAND "ACTION=build"
- "TARGET_BUILD_DIR=$<TARGET_FILE_DIR:${APP_NAME_LC}>/.."
- "TARGET_NAME=${APP_NAME}.app"
- "APP_NAME=${APP_NAME}"
- "PRODUCT_NAME=${APP_NAME}"
- "WRAPPER_EXTENSION=app"
- "SRCROOT=${CMAKE_BINARY_DIR}"
- ${CMAKE_SOURCE_DIR}/tools/darwin/Support/CopyRootFiles-ios.command
- COMMAND "XBMC_DEPENDS=${DEPENDS_PATH}"
- "TARGET_BUILD_DIR=$<TARGET_FILE_DIR:${APP_NAME_LC}>/.."
- "TARGET_NAME=${APP_NAME}.app"
- "APP_NAME=${APP_NAME}"
- "PRODUCT_NAME=${APP_NAME}"
- "FULL_PRODUCT_NAME=${APP_NAME}.app"
- "WRAPPER_EXTENSION=app"
- "SRCROOT=${CMAKE_BINARY_DIR}"
- ${CMAKE_SOURCE_DIR}/tools/darwin/Support/copyframeworks-ios.command
- COMMAND "XBMC_DEPENDS=${DEPENDS_PATH}"
- "NATIVEPREFIX=${NATIVEPREFIX}"
- "PLATFORM_NAME=${PLATFORM}"
- "CODESIGNING_FOLDER_PATH=$<TARGET_FILE_DIR:${APP_NAME_LC}>"
- "BUILT_PRODUCTS_DIR=$<TARGET_FILE_DIR:${APP_NAME_LC}>/.."
- "WRAPPER_NAME=${APP_NAME}.app"
- "APP_NAME=${APP_NAME}"
- ${CMAKE_SOURCE_DIR}/tools/darwin/Support/Codesign.command
-)
-
-set(DEPENDS_ROOT_FOR_XCODE ${NATIVEPREFIX}/..)
-configure_file(${CMAKE_SOURCE_DIR}/tools/darwin/packaging/ios/mkdeb-ios.sh.in
- ${CMAKE_BINARY_DIR}/tools/darwin/packaging/ios/mkdeb-ios.sh @ONLY)
-configure_file(${CMAKE_SOURCE_DIR}/tools/darwin/packaging/migrate_to_kodi_ios.sh.in
- ${CMAKE_BINARY_DIR}/tools/darwin/packaging/migrate_to_kodi_ios.sh @ONLY)
-
-add_custom_target(deb
- COMMAND sh ./mkdeb-ios.sh ${CORE_BUILD_CONFIG}
- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/tools/darwin/packaging/ios)
-add_dependencies(deb ${APP_NAME_LC})
-
diff --git a/cmake/scripts/ios/PathSetup.cmake b/cmake/scripts/ios/PathSetup.cmake
deleted file mode 120000
index d7f25b2cad..0000000000
--- a/cmake/scripts/ios/PathSetup.cmake
+++ /dev/null
@@ -1 +0,0 @@
-../osx/PathSetup.cmake \ No newline at end of file
diff --git a/cmake/scripts/linux/ArchSetup.cmake b/cmake/scripts/linux/ArchSetup.cmake
index 624edf626d..35b5379da5 100644
--- a/cmake/scripts/linux/ArchSetup.cmake
+++ b/cmake/scripts/linux/ArchSetup.cmake
@@ -1,8 +1,8 @@
# we always want to use GNU features if available, so set _GNU_SOURCE
-set(ARCH_DEFINES -D_LINUX -DTARGET_POSIX -DTARGET_LINUX -D_GNU_SOURCE)
-set(SYSTEM_DEFINES -D__STDC_CONSTANT_MACROS -D_FILE_DEFINED
- -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64)
+set(ARCH_DEFINES -DTARGET_POSIX -DTARGET_LINUX -D_GNU_SOURCE)
+set(SYSTEM_DEFINES -D__STDC_CONSTANT_MACROS -D_FILE_OFFSET_BITS=64)
set(PLATFORM_DIR platform/linux)
+set(PLATFORMDEFS_DIR platform/posix)
set(CMAKE_SYSTEM_NAME Linux)
if(WITH_ARCH)
set(ARCH ${WITH_ARCH})
@@ -81,7 +81,6 @@ if(KODI_DEPENDSBUILD)
set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
endif()
-find_package(CXX11 REQUIRED)
include(LDGOLD)
include(CheckIncludeFiles)
diff --git a/cmake/scripts/linux/Install.cmake b/cmake/scripts/linux/Install.cmake
index 221612d4ea..36c02999d6 100644
--- a/cmake/scripts/linux/Install.cmake
+++ b/cmake/scripts/linux/Install.cmake
@@ -20,7 +20,6 @@ set(APP_PREFIX ${prefix})
set(APP_LIB_DIR ${libdir}/${APP_NAME_LC})
set(APP_DATA_DIR ${datarootdir}/${APP_NAME_LC})
set(APP_INCLUDE_DIR ${includedir}/${APP_NAME_LC})
-set(CXX11_SWITCH "-std=c++11")
# Set XBMC_STANDALONE_SH_PULSE so we can insert PulseAudio block into kodi-standalone
if(EXISTS ${CMAKE_SOURCE_DIR}/tools/Linux/kodi-standalone.sh.pulse)
diff --git a/cmake/scripts/osx/ArchSetup.cmake b/cmake/scripts/osx/ArchSetup.cmake
index 9ba0596c9c..f7ab9196bf 100644
--- a/cmake/scripts/osx/ArchSetup.cmake
+++ b/cmake/scripts/osx/ArchSetup.cmake
@@ -6,10 +6,11 @@ set(CORE_MAIN_SOURCE ${CMAKE_SOURCE_DIR}/xbmc/platform/posix/main.cpp
${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/osx/SDLMain.mm
${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/osx/SDLMain.h)
-set(ARCH_DEFINES -D_LINUX -DTARGET_POSIX -DTARGET_DARWIN -DTARGET_DARWIN_OSX)
+set(ARCH_DEFINES -DTARGET_POSIX -DTARGET_DARWIN -DTARGET_DARWIN_OSX)
set(SYSTEM_DEFINES -D_REENTRANT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE
-D__STDC_CONSTANT_MACROS)
-set(PLATFORM_DIR platform/linux)
+set(PLATFORM_DIR platform/darwin)
+set(PLATFORMDEFS_DIR platform/posix)
set(CMAKE_SYSTEM_NAME Darwin)
if(WITH_ARCH)
set(ARCH ${WITH_ARCH})
@@ -25,8 +26,6 @@ endif()
# Additional SYSTEM_DEFINES
list(APPEND SYSTEM_DEFINES -DHAS_LINUX_NETWORK -DHAS_SDL -DHAS_ZEROCONF)
-find_package(CXX11 REQUIRED)
-
list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${NATIVEPREFIX})
list(APPEND DEPLIBS "-framework DiskArbitration" "-framework IOKit"
@@ -38,3 +37,6 @@ list(APPEND DEPLIBS "-framework DiskArbitration" "-framework IOKit"
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.9)
set(CMAKE_XCODE_ATTRIBUTE_CLANG_LINK_OBJC_RUNTIME OFF)
+
+include(cmake/scripts/darwin/Macros.cmake)
+enable_arc()
diff --git a/cmake/scripts/osx/Macros.cmake b/cmake/scripts/osx/Macros.cmake
index 52f87d1ca2..251cc79ff6 100644
--- a/cmake/scripts/osx/Macros.cmake
+++ b/cmake/scripts/osx/Macros.cmake
@@ -20,7 +20,7 @@ function(core_link_library lib wraplib)
# iOS: EFFECTIVE_PLATFORM_NAME is not resolved
# http://public.kitware.com/pipermail/cmake/2016-March/063049.html
- if(CORE_SYSTEM_NAME STREQUAL ios AND CMAKE_GENERATOR STREQUAL Xcode)
+ if(CORE_SYSTEM_NAME STREQUAL darwin_embedded)
get_target_property(dir ${lib} BINARY_DIR)
set(link_lib ${dir}/${CORE_BUILD_CONFIG}/${CMAKE_STATIC_LIBRARY_PREFIX}${lib}${CMAKE_STATIC_LIBRARY_SUFFIX})
endif()
diff --git a/cmake/scripts/windowsstore/ArchSetup.cmake b/cmake/scripts/windowsstore/ArchSetup.cmake
index 928b731633..4f5fdda293 100644
--- a/cmake/scripts/windowsstore/ArchSetup.cmake
+++ b/cmake/scripts/windowsstore/ArchSetup.cmake
@@ -1,5 +1,5 @@
# Minimum SDK version we support
-set(VS_MINIMUM_SDK_VERSION 10.0.16299.0)
+set(VS_MINIMUM_SDK_VERSION 10.0.17763.0)
if(CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION VERSION_LESS VS_MINIMUM_SDK_VERSION)
message(FATAL_ERROR "Detected Windows SDK version is ${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION}.\n"
@@ -79,7 +79,8 @@ set(SYSTEM_DEFINES -DWIN32_LEAN_AND_MEAN -DNOMINMAX -DHAS_DX -D__STDC_CONSTANT_M
list(APPEND SYSTEM_DEFINES -DHAS_WIN10_NETWORK)
# The /MP option enables /FS by default.
-set(CMAKE_CXX_FLAGS "/MP ${CMAKE_CXX_FLAGS} /EHsc /await /std:c++latest")
+set(CMAKE_CXX_FLAGS "/MP ${CMAKE_CXX_FLAGS} /EHsc /await")
+set(CMAKE_CXX_STANDARD 17)
# Google Test needs to use shared version of runtime libraries
set(gtest_force_shared_crt ON CACHE STRING "" FORCE)
diff --git a/cmake/treedata/android/subdirs.txt b/cmake/treedata/android/subdirs.txt
index 036fd2401a..57c89ea843 100644
--- a/cmake/treedata/android/subdirs.txt
+++ b/cmake/treedata/android/subdirs.txt
@@ -1,17 +1,20 @@
-xbmc/cores/RetroPlayer/process/android cores/RetroPlayer/process/android
-xbmc/input/touch input/touch
-xbmc/input/touch/generic input/touch/generic
-xbmc/windowing/android windowing/android
-xbmc/platform/posix platform/posix
-xbmc/platform/posix/filesystem platform/posix/filesystem
-xbmc/platform/posix/utils platform/posix/utils
-xbmc/platform/linux platform/linux
-xbmc/platform/linux/peripherals platform/linux/peripherals
-xbmc/platform/android/activity platform/android/activity
-xbmc/platform/android/bionic_supplement platform/android/bionicsupplement
-xbmc/platform/android/drm platform/android/drm
-xbmc/platform/android/filesystem platform/android/filesystem
-xbmc/platform/android/network platform/android/network
-xbmc/platform/android/peripherals platform/android/peripherals
-xbmc/platform/android/powermanagement platform/android/powermanagement
-xbmc/platform/android/storage platform/android/storage
+xbmc/cores/RetroPlayer/process/android cores/RetroPlayer/process/android
+xbmc/cores/VideoPlayer/Process/android cores/VideoPlayer/Process/android
+xbmc/input/touch input/touch
+xbmc/input/touch/generic input/touch/generic
+xbmc/media/decoderfilter media/decoderfilter
+xbmc/platform/android platform/android
+xbmc/platform/android/activity platform/android/activity
+xbmc/platform/android/bionic_supplement platform/android/bionicsupplement
+xbmc/platform/android/filesystem platform/android/filesystem
+xbmc/platform/android/media/decoderfilter platform/android/media/decoderfilter
+xbmc/platform/android/media/drm platform/android/media/drm
+xbmc/platform/android/network platform/android/network
+xbmc/platform/android/peripherals platform/android/peripherals
+xbmc/platform/android/powermanagement platform/android/powermanagement
+xbmc/platform/android/storage platform/android/storage
+xbmc/platform/linux/peripherals platform/linux/peripherals
+xbmc/platform/posix platform/posix
+xbmc/platform/posix/filesystem platform/posix/filesystem
+xbmc/platform/posix/utils platform/posix/utils
+xbmc/windowing/android windowing/android
diff --git a/cmake/treedata/common/drm.txt b/cmake/treedata/common/drm.txt
deleted file mode 100644
index fbcc906b9b..0000000000
--- a/cmake/treedata/common/drm.txt
+++ /dev/null
@@ -1 +0,0 @@
-xbmc/drm drm
diff --git a/cmake/treedata/common/filesystem.txt b/cmake/treedata/common/filesystem.txt
index 1c49a74d4b..37a2536c3e 100644
--- a/cmake/treedata/common/filesystem.txt
+++ b/cmake/treedata/common/filesystem.txt
@@ -1,3 +1,3 @@
xbmc/filesystem filesystem
-xbmc/filesystem/VideoDatabaseDirectory filesystem/videodatabase
xbmc/filesystem/MusicDatabaseDirectory filesystem/musicdatabase
+xbmc/filesystem/VideoDatabaseDirectory filesystem/videodatabase
diff --git a/cmake/treedata/common/gbm/gbm.txt b/cmake/treedata/common/gbm/gbm.txt
new file mode 100644
index 0000000000..113c47ba8b
--- /dev/null
+++ b/cmake/treedata/common/gbm/gbm.txt
@@ -0,0 +1,3 @@
+xbmc/cores/RetroPlayer/process/gbm cores/RetroPlayer/process/gbm
+xbmc/cores/VideoPlayer/Process/gbm cores/VideoPlayer/Process/gbm
+xbmc/windowing/gbm windowing/gbm
diff --git a/cmake/treedata/common/media.txt b/cmake/treedata/common/media.txt
new file mode 100644
index 0000000000..519fece955
--- /dev/null
+++ b/cmake/treedata/common/media.txt
@@ -0,0 +1,2 @@
+xbmc/media media
+xbmc/media/drm drm
diff --git a/cmake/treedata/common/pvr.txt b/cmake/treedata/common/pvr.txt
index decdabb559..74e766f2d0 100644
--- a/cmake/treedata/common/pvr.txt
+++ b/cmake/treedata/common/pvr.txt
@@ -1,8 +1,12 @@
-xbmc/pvr pvr
-xbmc/pvr/addons pvr/addons
-xbmc/pvr/channels pvr/channels
-xbmc/pvr/dialogs pvr/dialogs
-xbmc/pvr/epg pvr/epg
-xbmc/pvr/recordings pvr/recordings
-xbmc/pvr/timers pvr/timers
-xbmc/pvr/windows pvr/windows
+xbmc/pvr pvr
+xbmc/pvr/addons pvr/addons
+xbmc/pvr/channels pvr/channels
+xbmc/pvr/dialogs pvr/dialogs
+xbmc/pvr/epg pvr/epg
+xbmc/pvr/filesystem pvr/filesystem
+xbmc/pvr/guilib pvr/guilib
+xbmc/pvr/guilib/guiinfo pvr/guilib/guiinfo
+xbmc/pvr/recordings pvr/recordings
+xbmc/pvr/settings pvr/settings
+xbmc/pvr/timers pvr/timers
+xbmc/pvr/windows pvr/windows
diff --git a/cmake/treedata/common/rbpi/rbpi.txt b/cmake/treedata/common/rbpi/rbpi.txt
new file mode 100644
index 0000000000..dc268e773c
--- /dev/null
+++ b/cmake/treedata/common/rbpi/rbpi.txt
@@ -0,0 +1,2 @@
+xbmc/cores/omxplayer cores/omxplayer
+xbmc/windowing/rpi windowing/rpi
diff --git a/cmake/treedata/common/subdirs.txt b/cmake/treedata/common/subdirs.txt
index 4a5f3a8434..fdbddef8e0 100644
--- a/cmake/treedata/common/subdirs.txt
+++ b/cmake/treedata/common/subdirs.txt
@@ -1,5 +1,6 @@
xbmc xbmc
xbmc/addons addons
+xbmc/addons/addoninfo addons_addoninfo
xbmc/addons/binary-addons addons_binary-addons
xbmc/addons/interfaces addons_interfaces
xbmc/addons/interfaces/Addon addons_interfaces_addon
@@ -11,6 +12,7 @@ xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance addons_kodi-addon-dev
xbmc/addons/kodi-addon-dev-kit/include/kodi/gui addons_kodi-addon-dev-kit_include_kodi_gui
xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls addons_kodi-addon-dev-kit_include_kodi_gui_controls
xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs addons_kodi-addon-dev-kit_include_kodi_gui_dialogs
+xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/gl addons_kodi-addon-dev-kit_include_kodi_gui_gl
xbmc/addons/kodi-addon-dev-kit/include/kodi/tools addons_kodi-addon-dev-kit_include_kodi_tools
xbmc/addons/settings addons_settings
xbmc/commons commons
@@ -30,7 +32,6 @@ xbmc/input/keyboard/generic input/keyboard/generic
xbmc/input/mouse input/mouse
xbmc/input/mouse/generic input/mouse/generic
xbmc/listproviders listproviders
-xbmc/media media
xbmc/messaging messaging
xbmc/messaging/helpers messagingHelpers
xbmc/pictures pictures
diff --git a/cmake/treedata/common/tests.txt b/cmake/treedata/common/tests.txt
index 6889cc1d74..9573812a5a 100644
--- a/cmake/treedata/common/tests.txt
+++ b/cmake/treedata/common/tests.txt
@@ -1,11 +1,12 @@
-xbmc/test test
xbmc/addons/test test/addons
+xbmc/cores/AudioEngine/Sinks/test test/audioengine_sinks
xbmc/filesystem/test test/filesystem
xbmc/interfaces/python/test test/python
xbmc/music/tags/test test/music_tags
xbmc/network/test test/network
xbmc/playlists/test test/playlists
+xbmc/pvr/channels/test test/pvrchannels
+xbmc/test test
xbmc/threads/test test/threads
xbmc/utils/test test/utils
xbmc/video/test test/video
-xbmc/cores/AudioEngine/Sinks/test test/audioengine_sinks
diff --git a/cmake/treedata/common/videoplayer.txt b/cmake/treedata/common/videoplayer.txt
index 8c8d45d1ad..ce6a7579ca 100644
--- a/cmake/treedata/common/videoplayer.txt
+++ b/cmake/treedata/common/videoplayer.txt
@@ -8,5 +8,5 @@ xbmc/cores/VideoPlayer/DVDInputStreams cores/VideoPlayer/inputstream
xbmc/cores/VideoPlayer/DVDSubtitles cores/VideoPlayer/subtitles
xbmc/cores/VideoPlayer/Process cores/VideoPlayer/process
xbmc/cores/VideoPlayer/VideoRenderers cores/VideoPlayer/videorenderers
-xbmc/cores/VideoPlayer/VideoRenderers/VideoShaders cores/VideoPlayer/videorenderers/shaders
xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender cores/VideoPlayer/videorenderers/hwdec
+xbmc/cores/VideoPlayer/VideoRenderers/VideoShaders cores/VideoPlayer/videorenderers/shaders
diff --git a/cmake/treedata/optional/common/wayland.txt b/cmake/treedata/common/wayland/wayland.txt
index 4664b35dd7..bbbb14e7d6 100644
--- a/cmake/treedata/optional/common/wayland.txt
+++ b/cmake/treedata/common/wayland/wayland.txt
@@ -1,3 +1,3 @@
-xbmc/windowing/wayland windowing/wayland # WAYLANDPP
-xbmc/cores/RetroPlayer/process/wayland cores/RetroPlayer/process/wayland # WAYLANDPP
-xbmc/cores/VideoPlayer/Process/wayland cores/VideoPlayer/Process/wayland # WAYLANDPP \ No newline at end of file
+xbmc/cores/RetroPlayer/process/wayland cores/RetroPlayer/process/wayland
+xbmc/cores/VideoPlayer/Process/wayland cores/VideoPlayer/Process/wayland
+xbmc/windowing/wayland windowing/wayland
diff --git a/cmake/treedata/optional/common/X.txt b/cmake/treedata/common/x11/X.txt
index e66ad80f37..548c9dd148 100644
--- a/cmake/treedata/optional/common/X.txt
+++ b/cmake/treedata/common/x11/X.txt
@@ -1,3 +1,3 @@
-xbmc/windowing/X11 windowing/X11 # X
-xbmc/cores/RetroPlayer/process/X11 cores/RetroPlayer/process/X11 # X
-xbmc/cores/VideoPlayer/Process/X11 cores/VideoPlayer/Process/X11 # X
+xbmc/cores/RetroPlayer/process/X11 cores/RetroPlayer/process/X11
+xbmc/cores/VideoPlayer/Process/X11 cores/VideoPlayer/Process/X11
+xbmc/windowing/X11 windowing/X11
diff --git a/cmake/treedata/darwin_embedded/ios/ios.txt b/cmake/treedata/darwin_embedded/ios/ios.txt
new file mode 100644
index 0000000000..c02a0c4ede
--- /dev/null
+++ b/cmake/treedata/darwin_embedded/ios/ios.txt
@@ -0,0 +1,4 @@
+xbmc/cores/RetroPlayer/process/ios cores/RetroPlayer/process/ios
+xbmc/cores/VideoPlayer/Process/ios cores/VideoPlayer/Process/ios
+xbmc/platform/darwin/ios platform/ios
+xbmc/windowing/ios windowing/ios
diff --git a/cmake/treedata/darwin_embedded/subdirs.txt b/cmake/treedata/darwin_embedded/subdirs.txt
new file mode 100644
index 0000000000..8a60dc490c
--- /dev/null
+++ b/cmake/treedata/darwin_embedded/subdirs.txt
@@ -0,0 +1,10 @@
+xbmc/input/touch input/touch
+xbmc/input/touch/generic input/touch/generic
+xbmc/platform/darwin platform/darwin
+xbmc/platform/darwin/ios-common platform/ios-common
+xbmc/platform/darwin/ios-common/network platform/ios-common/network
+xbmc/platform/darwin/ios-common/storage platform/ios-common/storage
+xbmc/platform/darwin/network platform/darwin/network
+xbmc/platform/posix posix
+xbmc/platform/posix/filesystem platform/posix/filesystem
+xbmc/platform/posix/utils platform/posix/utils
diff --git a/cmake/treedata/freebsd/subdirs.txt b/cmake/treedata/freebsd/subdirs.txt
index e4edf23a70..e10d348d74 100644
--- a/cmake/treedata/freebsd/subdirs.txt
+++ b/cmake/treedata/freebsd/subdirs.txt
@@ -1,15 +1,16 @@
-xbmc/platform/posix platform/posix
-xbmc/platform/posix/filesystem platform/posix/filesystem
-xbmc/platform/posix/utils platform/posix/utils
+xbmc/cores/RetroPlayer/process/rbpi cores/RetroPlayer/process/rbpi
+xbmc/cores/VideoPlayer/Process/rbpi cores/VideoPlayer/Process/rbpi
+xbmc/input/touch input/touch
+xbmc/input/touch/generic input/touch/generic
xbmc/platform/freebsd platform/freebsd
-xbmc/platform/linux platform/linux
xbmc/platform/linux/input platform/linux/input
xbmc/platform/linux/network platform/linux/network
xbmc/platform/linux/peripherals platform/linux/peripherals
xbmc/platform/linux/powermanagement platform/linux/powermanagement
+xbmc/platform/linux/sse4 platform/linux/sse4
xbmc/platform/linux/storage platform/linux/storage
-xbmc/input/touch input/touch
-xbmc/input/touch/generic input/touch/generic
-xbmc/cores/RetroPlayer/process/rbpi cores/RetroPlayer/process/rbpi
-xbmc/cores/VideoPlayer/Process/rbpi cores/VideoPlayer/Process/rbpi
+xbmc/platform/posix platform/posix
+xbmc/platform/posix/filesystem platform/posix/filesystem
+xbmc/platform/posix/network platform/posix/network
+xbmc/platform/posix/utils platform/posix/utils
xbmc/windowing/linux windowing/linux
diff --git a/cmake/treedata/ios/subdirs.txt b/cmake/treedata/ios/subdirs.txt
deleted file mode 100644
index a287418eb8..0000000000
--- a/cmake/treedata/ios/subdirs.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-xbmc/platform/linux platform/linux
-xbmc/platform/linux/network platform/linux/network
-xbmc/input/touch input/touch
-xbmc/input/touch/generic input/touch/generic
-xbmc/platform/posix posix
-xbmc/platform/posix/filesystem platform/posix/filesystem
-xbmc/platform/posix/utils platform/posix/utils
-xbmc/platform/darwin platform/darwin
-xbmc/platform/darwin/ios platform/ios
-xbmc/platform/darwin/ios-common platform/ios-common
-xbmc/platform/darwin/osx/network platform/osx/network
-xbmc/platform/darwin/osx/peripherals platform/osx/peripherals
-xbmc/platform/darwin/osx/powermanagement platform/darwin/osx/powermanagement
-xbmc/platform/darwin/osx/storage platform/osx/storage
-xbmc/windowing/osx windowing/osx
-xbmc/cores/RetroPlayer/process/ios cores/RetroPlayer/process/ios
-xbmc/cores/VideoPlayer/Process/ios cores/VideoPlayer/Process/ios
diff --git a/cmake/treedata/linux/subdirs.txt b/cmake/treedata/linux/subdirs.txt
index 6e1d013de1..51a7cbd73a 100644
--- a/cmake/treedata/linux/subdirs.txt
+++ b/cmake/treedata/linux/subdirs.txt
@@ -1,14 +1,16 @@
-xbmc/platform/posix platform/posix
-xbmc/platform/posix/filesystem platform/posix/filesystem
-xbmc/platform/posix/utils platform/posix/utils
+xbmc/cores/RetroPlayer/process/rbpi cores/RetroPlayer/process/rbpi
+xbmc/cores/VideoPlayer/Process/rbpi cores/VideoPlayer/Process/rbpi
+xbmc/input/touch input/touch
+xbmc/input/touch/generic input/touch/generic
xbmc/platform/linux platform/linux
xbmc/platform/linux/input platform/linux/input
xbmc/platform/linux/network platform/linux/network
xbmc/platform/linux/peripherals platform/linux/peripherals
xbmc/platform/linux/powermanagement platform/linux/powermanagement
+xbmc/platform/linux/sse4 platform/linux/sse4
xbmc/platform/linux/storage platform/linux/storage
-xbmc/input/touch input/touch
-xbmc/input/touch/generic input/touch/generic
-xbmc/cores/RetroPlayer/process/rbpi cores/RetroPlayer/process/rbpi
-xbmc/cores/VideoPlayer/Process/rbpi cores/VideoPlayer/Process/rbpi
+xbmc/platform/posix platform/posix
+xbmc/platform/posix/filesystem platform/posix/filesystem
+xbmc/platform/posix/network platform/posix/network
+xbmc/platform/posix/utils platform/posix/utils
xbmc/windowing/linux windowing/linux
diff --git a/cmake/treedata/optional/common/aml.txt b/cmake/treedata/optional/common/aml.txt
deleted file mode 100644
index 3d412d0190..0000000000
--- a/cmake/treedata/optional/common/aml.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-xbmc/cores/RetroPlayer/process/amlogic cores/RetroPlayer/process/amlogic # AML
-xbmc/windowing/amlogic windowing/amlogic # AML
-
diff --git a/cmake/treedata/optional/common/gbm.txt b/cmake/treedata/optional/common/gbm.txt
deleted file mode 100644
index 196b32357f..0000000000
--- a/cmake/treedata/optional/common/gbm.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-xbmc/cores/RetroPlayer/process/gbm cores/RetroPlayer/process/gbm # GBM
-xbmc/windowing/gbm windowing/gbm # GBM \ No newline at end of file
diff --git a/cmake/treedata/osx/subdirs.txt b/cmake/treedata/osx/subdirs.txt
index 166a966d72..f53a6e1d49 100644
--- a/cmake/treedata/osx/subdirs.txt
+++ b/cmake/treedata/osx/subdirs.txt
@@ -1,14 +1,13 @@
-xbmc/platform/posix posix
-xbmc/platform/posix/filesystem platform/posix/filesystem
-xbmc/platform/posix/utils platform/posix/utils
-xbmc/platform/linux platform/linux
-xbmc/platform/linux/network platform/linux/network
+xbmc/cores/RetroPlayer/process/osx cores/RetroPlayer/process/osx
+xbmc/cores/VideoPlayer/Process/osx cores/VideoPlayer/Process/osx
xbmc/platform/darwin platform/darwin
+xbmc/platform/darwin/network platform/darwin/network
xbmc/platform/darwin/osx platform/osx
-xbmc/platform/darwin/osx/network platform/osx/network
xbmc/platform/darwin/osx/peripherals platform/osx/peripherals
xbmc/platform/darwin/osx/powermanagement platform/darwin/osx/powermanagement
xbmc/platform/darwin/osx/storage platform/osx/storage
+xbmc/platform/posix posix
+xbmc/platform/posix/filesystem platform/posix/filesystem
+xbmc/platform/posix/network platform/posix/network
+xbmc/platform/posix/utils platform/posix/utils
xbmc/windowing/osx windowing/osx
-xbmc/cores/RetroPlayer/process/osx cores/RetroPlayer/process/osx
-xbmc/cores/VideoPlayer/Process/osx cores/VideoPlayer/Process/osx
diff --git a/cmake/treedata/windows/subdirs.txt b/cmake/treedata/windows/subdirs.txt
index a2c8c29f14..c63397758a 100644
--- a/cmake/treedata/windows/subdirs.txt
+++ b/cmake/treedata/windows/subdirs.txt
@@ -1,17 +1,18 @@
+xbmc/cores/RetroPlayer/process/windows cores/RetroPlayer/process/windows
+xbmc/cores/RetroPlayer/rendering/VideoShaders/windows cores/RetroPlayer/rendering/VideoShaders/windows
+xbmc/cores/VideoPlayer/Process/windows cores/VideoPlayer/Process/windows
+xbmc/cores/VideoPlayer/VideoRenderers/windows cores/VideoPlayer/VideoRenderers/windows
+xbmc/input/touch input/touch
+xbmc/input/touch/generic input/touch/generic
+xbmc/network/mdns network/mdns
xbmc/platform/win32 platform/win32
-xbmc/platform/win32/input platform/win32/input
xbmc/platform/win32/filesystem platform/win32/filesystem
+xbmc/platform/win32/input platform/win32/input
xbmc/platform/win32/network platform/win32/network
xbmc/platform/win32/peripherals platform/win32/peripherals
xbmc/platform/win32/powermanagement platform/win32/powermanagement
xbmc/platform/win32/storage platform/win32/storage
xbmc/platform/win32/utils platform/win32/utils
-xbmc/input/touch input/touch
-xbmc/input/touch/generic input/touch/generic
-xbmc/network/mdns network/mdns
xbmc/rendering/dx rendering/dx
xbmc/threads/platform/win threads/win
xbmc/windowing/windows windowing/windows
-xbmc/cores/RetroPlayer/process/windows cores/RetroPlayer/process/windows
-xbmc/cores/RetroPlayer/rendering/VideoShaders/windows cores/RetroPlayer/rendering/VideoShaders/windows
-xbmc/cores/VideoPlayer/Process/windows cores/VideoPlayer/Process/windows
diff --git a/cmake/treedata/windowsstore/subdirs.txt b/cmake/treedata/windowsstore/subdirs.txt
index 604be08cd3..da42566b58 100644
--- a/cmake/treedata/windowsstore/subdirs.txt
+++ b/cmake/treedata/windowsstore/subdirs.txt
@@ -1,3 +1,8 @@
+xbmc/cores/VideoPlayer/Process/windows cores/VideoPlayer/Process/windows
+xbmc/cores/VideoPlayer/VideoRenderers/windows cores/VideoPlayer/VideoRenderers/windows
+xbmc/input/touch input/touch
+xbmc/input/touch/generic input/touch/generic
+xbmc/network/mdns network/mdns
xbmc/platform/win10 platform/win10
xbmc/platform/win10/filesystem platform/win10/filesystem
xbmc/platform/win10/network platform/win10/network
@@ -6,10 +11,6 @@ xbmc/platform/win10/powermanagement platfrom/win10/powermanagement
xbmc/platform/win10/storage platfrom/win10/storage
xbmc/platform/win32/filesystem platform/win32/filesystem
xbmc/platform/win32/utils platform/win32/utils
-xbmc/input/touch input/touch
-xbmc/input/touch/generic input/touch/generic
-xbmc/network/mdns network/mdns
xbmc/rendering/dx rendering/dx
xbmc/threads/platform/win threads/win
xbmc/windowing/win10 windowing/win10
-xbmc/cores/VideoPlayer/Process/windows cores/VideoPlayer/Process/windows