diff options
Diffstat (limited to 'cmake')
| -rw-r--r-- | cmake/KodiConfig.cmake.in | 10 | ||||
| -rw-r--r-- | cmake/README.md | 20 | ||||
| -rw-r--r-- | cmake/addons/README.md | 22 | ||||
| -rw-r--r-- | cmake/addons/depends/README | 35 | ||||
| -rw-r--r-- | cmake/installdata/common/addons.txt | 1 | ||||
| -rw-r--r-- | cmake/modules/FindNFS.cmake | 19 | ||||
| -rw-r--r-- | cmake/scripts/android/Install.cmake | 1 | ||||
| -rw-r--r-- | cmake/scripts/common/AddonHelpers.cmake | 30 | ||||
| -rw-r--r-- | cmake/scripts/common/PrepareEnv.cmake | 47 | ||||
| -rw-r--r-- | cmake/scripts/ios/ArchSetup.cmake | 9 | ||||
| -rw-r--r-- | cmake/treedata/common/retroplayer.txt | 1 |
11 files changed, 107 insertions, 88 deletions
diff --git a/cmake/KodiConfig.cmake.in b/cmake/KodiConfig.cmake.in index 2a572e7..560374d 100644 --- a/cmake/KodiConfig.cmake.in +++ b/cmake/KodiConfig.cmake.in | |||
| @@ -25,12 +25,8 @@ list(APPEND CMAKE_MODULE_PATH @APP_LIB_DIR@ @APP_DATA_DIR@/cmake) | |||
| 25 | string(REPLACE ";" " " ARCH_DEFINES "@ARCH_DEFINES@") | 25 | string(REPLACE ";" " " ARCH_DEFINES "@ARCH_DEFINES@") |
| 26 | add_definitions(${ARCH_DEFINES} -DBUILD_KODI_ADDON) | 26 | add_definitions(${ARCH_DEFINES} -DBUILD_KODI_ADDON) |
| 27 | 27 | ||
| 28 | if(NOT CORE_SYSTEM_NAME) | 28 | set(CORE_SYSTEM_NAME @CORE_SYSTEM_NAME@) |
| 29 | if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") | 29 | set(PLATFORM @CORE_SYSTEM_NAME@) |
| 30 | set(CORE_SYSTEM_NAME "osx") | 30 | set(PLATFORM_TAG @PLATFORM_TAG@) |
| 31 | else() | ||
| 32 | string(TOLOWER ${CMAKE_SYSTEM_NAME} CORE_SYSTEM_NAME) | ||
| 33 | endif() | ||
| 34 | endif() | ||
| 35 | 31 | ||
| 36 | include(AddonHelpers) | 32 | include(AddonHelpers) |
diff --git a/cmake/README.md b/cmake/README.md index 8637da6..2febe48 100644 --- a/cmake/README.md +++ b/cmake/README.md | |||
| @@ -21,6 +21,26 @@ cmake ... -DENABLE_VAAPI=ON -DENABLE_VDPAU=OFF ... | |||
| 21 | 21 | ||
| 22 | Unfortunately, Kodi's CMake gazillion options are not fully documented yet. For more information and an updated list of options, please check the main **[CMakeLists.txt](../CMakeLists.txt)**. | 22 | Unfortunately, Kodi's CMake gazillion options are not fully documented yet. For more information and an updated list of options, please check the main **[CMakeLists.txt](../CMakeLists.txt)**. |
| 23 | 23 | ||
| 24 | ## Buildsystem variables | ||
| 25 | The buildsystem uses the following variables (which can be passed into it when executing cmake with the -D`<variable-name>=<value>` format) to manipulate the build process (see READMEs in sub-directories for additional variables): | ||
| 26 | - `CMAKE_BUILD_TYPE` specifies the type of the build. This can be either *Debug* or *Release* (default is *Release*) | ||
| 27 | - `CMAKE_TOOLCHAIN_FILE` can be used to pass a toolchain file | ||
| 28 | - `ARCH_DEFINES` specifies the platform-specific C/C++ preprocessor defines (defaults to empty) | ||
| 29 | |||
| 30 | ## Building | ||
| 31 | To trigger the cmake-based buildsystem the following command must be executed with `<path>` set to this directory (absolute or relative) allowing for in-source and out-of-source builds | ||
| 32 | |||
| 33 | `cmake <path> -G <generator>` | ||
| 34 | |||
| 35 | CMake supports multiple generators. See [here] (https://cmake.org/cmake/help/v3.1/manual/cmake-generators.7.html) for a list. | ||
| 36 | |||
| 37 | In case of additional options the call might look like this: | ||
| 38 | |||
| 39 | cmake `<path>` [-G `<generator>`] \ | ||
| 40 | -DCMAKE_BUILD_TYPE=Release \ | ||
| 41 | -DARCH_DEFINES="-DTARGET_LINUX" \ | ||
| 42 | -DCMAKE_INSTALL_PREFIX="`<path-to-install-directory`" | ||
| 43 | |||
| 24 | ## Tests | 44 | ## Tests |
| 25 | Kodi uses Google Test as its testing framework. Each test file is scanned for tests and these are added to CTest, which is the native test driver for CMake. | 45 | Kodi uses Google Test as its testing framework. Each test file is scanned for tests and these are added to CTest, which is the native test driver for CMake. |
| 26 | 46 | ||
diff --git a/cmake/addons/README.md b/cmake/addons/README.md index e04c834..dd222f5 100644 --- a/cmake/addons/README.md +++ b/cmake/addons/README.md | |||
| @@ -24,21 +24,18 @@ Available platforms are: linux, windows, osx, ios, android, rbpi and freebsd. | |||
| 24 | If no add-on definitions could be found, the buildsystem assumes that the bootstrapping of the add-on definition repositories hasn't been performed yet and automatically executes the add-on bootstrapping buildsystem located in the *bootstrap* sub-directory with the default settings (i.e. *all* add-ons from all pre-defined add-on definition repositories are bootstrapped into the directory pointed to by the *ADDONS_DEFINITION_DIR* option). | 24 | If no add-on definitions could be found, the buildsystem assumes that the bootstrapping of the add-on definition repositories hasn't been performed yet and automatically executes the add-on bootstrapping buildsystem located in the *bootstrap* sub-directory with the default settings (i.e. *all* add-ons from all pre-defined add-on definition repositories are bootstrapped into the directory pointed to by the *ADDONS_DEFINITION_DIR* option). |
| 25 | 25 | ||
| 26 | ## Buildsystem variables | 26 | ## Buildsystem variables |
| 27 | The buildsystem uses the following variables (which can be passed into it when executing cmake with the -D`<variable-name>=<value>` format) to manipulate the build process: | 27 | The buildsystem uses the following addon-related variables (which can be passed into it when executing cmake with the -D`<variable-name>=<value>` format) to manipulate the build process: |
| 28 | - `ADDONS_TO_BUILD` has two variations, which are tested in order: | 28 | - `ADDONS_TO_BUILD` has two variations, which are tested in order: |
| 29 | - a quoted, space delimited list of `<addon-id>s` that you want to build (default is *all*) | 29 | - a quoted, space delimited list of `<addon-id>s` that you want to build (default is *all*) |
| 30 | - a regular expression that every `<addon-id>` is matched against (e.g. `ADDONS_TO_BUILD="pvr.*"`) to build all pvr add-ons | 30 | - a regular expression that every `<addon-id>` is matched against (e.g. `ADDONS_TO_BUILD="pvr.*"`) to build all pvr add-ons |
| 31 | - `ADDONS_DEFINITION_DIR` points to the directory containing the definitions for the addons to be built | 31 | - `ADDONS_DEFINITION_DIR` points to the directory containing the definitions for the addons to be built |
| 32 | - `ADDON_SRC_PREFIX` can be used to override the add-on repository location. It must point to the locally available parent directory of the add-on(s) to build. `<addon-id>` will be appended to this path automatically | 32 | - `ADDON_SRC_PREFIX` can be used to override the add-on repository location. It must point to the locally available parent directory of the add-on(s) to build. `<addon-id>` will be appended to this path automatically |
| 33 | - `CMAKE_BUILD_TYPE` specifies the type of the build. This can be either *Debug* or *Release* (default is *Release*) | ||
| 34 | - `CMAKE_INSTALL_PREFIX` points to the directory where the built add-ons and their additional files (addon.xml, resources, ...) will be installed to (defaults to `<ADDON_DEPENDS_PATH>`) | 33 | - `CMAKE_INSTALL_PREFIX` points to the directory where the built add-ons and their additional files (addon.xml, resources, ...) will be installed to (defaults to `<ADDON_DEPENDS_PATH>`) |
| 35 | - `CMAKE_TOOLCHAIN_FILE` can be used to pass a toolchain file into the add-on builds | ||
| 36 | - `ADDON_DEPENDS_PATH` points to the directory containing the *include* and *lib* directories of the add-ons' dependencies. | 34 | - `ADDON_DEPENDS_PATH` points to the directory containing the *include* and *lib* directories of the add-ons' dependencies. |
| 37 | - `CORE_SOURCE_DIR` points to the root directory of the project (default is the absolute representation of ../../.. starting from this directory) | 35 | - `CORE_SOURCE_DIR` points to the root directory of the project (default is the absolute representation of ../../.. starting from this directory) |
| 38 | - `BUILD_DIR` points to the directory where the add-ons and their dependencies will be downloaded and built | 36 | - `BUILD_DIR` points to the directory where the add-ons and their dependencies will be downloaded and built |
| 39 | - `PACKAGE_ZIP=ON` means that the add-ons will be 'packaged' into a common folder, rather than being placed in `<CMAKE_INSTALL_PREFIX>/lib/kodi/addons` and `<CMAKE_INSTALL_PREFIX>/share/kodi/addons` | 37 | - `PACKAGE_ZIP=ON` means that the add-ons will be 'packaged' into a common folder, rather than being placed in `<CMAKE_INSTALL_PREFIX>/lib/kodi/addons` and `<CMAKE_INSTALL_PREFIX>/share/kodi/addons` |
| 40 | - `PACKAGE_DIR` points to the directory where the ZIP archived add-ons will be stored after they have been packaged (defaults to `<BUILD_DIR>/zips`) | 38 | - `PACKAGE_DIR` points to the directory where the ZIP archived add-ons will be stored after they have been packaged (defaults to `<BUILD_DIR>/zips`) |
| 41 | - `ARCH_DEFINES` specifies the platform-specific C/C++ preprocessor defines (defaults to empty) | ||
| 42 | - `ADDON_TARBALL_CACHING` specifies whether downloaded add-on source tarballs should be cached or not (defaults to *ON*) | 39 | - `ADDON_TARBALL_CACHING` specifies whether downloaded add-on source tarballs should be cached or not (defaults to *ON*) |
| 43 | 40 | ||
| 44 | ## Deprecated buildsystem variables | 41 | ## Deprecated buildsystem variables |
| @@ -47,19 +44,4 @@ Buildsystem will print a warning if you use any of the below-listed variables. F | |||
| 47 | 44 | ||
| 48 | ## Building | 45 | ## Building |
| 49 | The buildsystem makes some assumptions about the environment which must be met by whoever uses it: | 46 | The buildsystem makes some assumptions about the environment which must be met by whoever uses it: |
| 50 | - Any dependencies of the add-ons must already be built and their include and library files must be present in the path pointed to by `<CMAKE_PREFIX_PATH>` (in *include* and *lib* sub-directories) | 47 | - Any dependencies of the add-ons must already be built and their include and library files must be present in the path pointed to by `<CMAKE_PREFIX_PATH>` (in *include* and *lib* sub-directories) \ No newline at end of file |
| 51 | |||
| 52 | To trigger the cmake-based buildsystem the following command must be executed with `<path>` set to this directory (absolute or relative) allowing for in-source and out-of-source builds | ||
| 53 | |||
| 54 | `cmake <path> -G <generator>` | ||
| 55 | |||
| 56 | CMake supports multiple generators. See [here] (https://cmake.org/cmake/help/v3.1/manual/cmake-generators.7.html) for a list. | ||
| 57 | |||
| 58 | In case of additional options the call might look like this: | ||
| 59 | |||
| 60 | cmake `<path>` [-G `<generator>`] \ | ||
| 61 | -DCMAKE_BUILD_TYPE=Release \ | ||
| 62 | -DCORE_SOURCE_DIR="`<path-to-app-root>`" \ | ||
| 63 | -DARCH_DEFINES="-DTARGET_LINUX" \ | ||
| 64 | -DADDON_DEPENDS_PATH=`<path-to-built-depends>` \ | ||
| 65 | -DCMAKE_INSTALL_PREFIX="`<path-to-install-directory`" | ||
diff --git a/cmake/addons/depends/README b/cmake/addons/depends/README index 584a167..6fcec8f 100644 --- a/cmake/addons/depends/README +++ b/cmake/addons/depends/README | |||
| @@ -25,37 +25,8 @@ are: | |||
| 25 | * flags.txt: additional build flags | 25 | * flags.txt: additional build flags |
| 26 | * deps.txt: whitespace separated list of dependencies of this dependency | 26 | * deps.txt: whitespace separated list of dependencies of this dependency |
| 27 | 27 | ||
| 28 | The buildsystem uses the following variables (which can be passed into it when | 28 | The buildsystem uses the following depends-related variables (which can be passed |
| 29 | executing cmake with the -D<variable-name>=<value> option) to e.g. access | 29 | into it when executing cmake with the -D<variable-name>=<value> option) to e.g. |
| 30 | specific paths: | 30 | access specific paths: |
| 31 | * CMAKE_BUILD_TYPE specifies the type of the build. This can be either "Debug" | ||
| 32 | or "Release" (default is "Release"). | ||
| 33 | * CMAKE_TOOLCHAIN_FILE can be used to pass a toolchain file into the add-on | ||
| 34 | builds. | ||
| 35 | * CORE_SYSTEM_NAME is the name of the platform (e.g. "linux" or "android") in | ||
| 36 | lower-case (defaults to lowercase(CMAKE_SYSTEM_NAME)). | ||
| 37 | * CORE_SOURCE_DIR points to the root directory of the project (default is the | ||
| 38 | absolute representation of ../../.. starting from this directory). | ||
| 39 | * ADDON_DEPENDS_PATH points to the directory where the built dependencies | ||
| 40 | (their include and library file) will be installed to. | ||
| 41 | * ARCH_DEFINES specifies the platform-specific C/C++ preprocessor defines | ||
| 42 | (defaults to empty). | ||
| 43 | * DEPENDS_TO_BUILD is a quoted, space delimited list of <dependency>s that | 31 | * DEPENDS_TO_BUILD is a quoted, space delimited list of <dependency>s that |
| 44 | you want to build (default is "all"). | 32 | you want to build (default is "all"). |
| 45 | |||
| 46 | To trigger the cmake-based buildsystem the following command must be executed | ||
| 47 | with <path> being the path to this directory (absolute or relative, allowing for | ||
| 48 | in-source and out-of-source builds). | ||
| 49 | |||
| 50 | cmake <path> -G <generator> | ||
| 51 | |||
| 52 | cmake supports multiple generators, see | ||
| 53 | http://www.cmake.org/cmake/help/v2.8.8/cmake.html#section_Generators for a list. | ||
| 54 | |||
| 55 | In case of additional options the call might look like this | ||
| 56 | |||
| 57 | cmake <path> [-G <generator>] \ | ||
| 58 | -DCMAKE_BUILD_TYPE=Release \ | ||
| 59 | -DCORE_SOURCE_DIR="<path-to-project-root>" \ | ||
| 60 | -DARCH_DEFINES="-DTARGET_LINUX" \ | ||
| 61 | -DCMAKE_INSTALL_PREFIX="<path-to-install-directory" | ||
diff --git a/cmake/installdata/common/addons.txt b/cmake/installdata/common/addons.txt index b8f763c..c0ffb72 100644 --- a/cmake/installdata/common/addons.txt +++ b/cmake/installdata/common/addons.txt | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | addons/audioencoder.kodi.builtin.aac/* | 1 | addons/audioencoder.kodi.builtin.aac/* |
| 2 | addons/audioencoder.kodi.builtin.wma/* | 2 | addons/audioencoder.kodi.builtin.wma/* |
| 3 | addons/game.controller.default/* | 3 | addons/game.controller.default/* |
| 4 | addons/game.controller.snes/* | ||
| 4 | addons/kodi.audiodecoder/* | 5 | addons/kodi.audiodecoder/* |
| 5 | addons/kodi.game/* | 6 | addons/kodi.game/* |
| 6 | addons/kodi.imagedecoder/* | 7 | addons/kodi.imagedecoder/* |
diff --git a/cmake/modules/FindNFS.cmake b/cmake/modules/FindNFS.cmake index 36727c0..c2414a1 100644 --- a/cmake/modules/FindNFS.cmake +++ b/cmake/modules/FindNFS.cmake | |||
| @@ -23,20 +23,13 @@ find_path(NFS_INCLUDE_DIR nfsc/libnfs.h | |||
| 23 | 23 | ||
| 24 | set(NFS_VERSION ${PC_NFS_VERSION}) | 24 | set(NFS_VERSION ${PC_NFS_VERSION}) |
| 25 | 25 | ||
| 26 | find_library(NFS_LIBRARY NAMES nfs libnfs | ||
| 27 | PATHS ${PC_NFS_LIBDIR}) | ||
| 28 | |||
| 26 | include(FindPackageHandleStandardArgs) | 29 | include(FindPackageHandleStandardArgs) |
| 27 | if(NOT WIN32) | 30 | find_package_handle_standard_args(NFS |
| 28 | find_library(NFS_LIBRARY NAMES nfs | 31 | REQUIRED_VARS NFS_LIBRARY NFS_INCLUDE_DIR |
| 29 | PATHS ${PC_NFS_LIBDIR}) | 32 | VERSION_VAR NFS_VERSION) |
| 30 | |||
| 31 | find_package_handle_standard_args(NFS | ||
| 32 | REQUIRED_VARS NFS_LIBRARY NFS_INCLUDE_DIR | ||
| 33 | VERSION_VAR NFS_VERSION) | ||
| 34 | else() | ||
| 35 | # Dynamically loaded DLL | ||
| 36 | find_package_handle_standard_args(NFS | ||
| 37 | REQUIRED_VARS NFS_INCLUDE_DIR | ||
| 38 | VERSION_VAR NFS_VERSION) | ||
| 39 | endif() | ||
| 40 | 33 | ||
| 41 | if(NFS_FOUND) | 34 | if(NFS_FOUND) |
| 42 | set(NFS_LIBRARIES ${NFS_LIBRARY}) | 35 | set(NFS_LIBRARIES ${NFS_LIBRARY}) |
diff --git a/cmake/scripts/android/Install.cmake b/cmake/scripts/android/Install.cmake index a0fa155..a121295 100644 --- a/cmake/scripts/android/Install.cmake +++ b/cmake/scripts/android/Install.cmake | |||
| @@ -82,6 +82,7 @@ set(package_files strings.xml | |||
| 82 | src/interfaces/XBMCNsdManagerRegistrationListener.java | 82 | src/interfaces/XBMCNsdManagerRegistrationListener.java |
| 83 | src/interfaces/XBMCNsdManagerDiscoveryListener.java | 83 | src/interfaces/XBMCNsdManagerDiscoveryListener.java |
| 84 | src/interfaces/XBMCMediaDrmOnEventListener.java | 84 | src/interfaces/XBMCMediaDrmOnEventListener.java |
| 85 | src/interfaces/XBMCDisplayManagerDisplayListener.java | ||
| 85 | src/model/TVEpisode.java | 86 | src/model/TVEpisode.java |
| 86 | src/model/Movie.java | 87 | src/model/Movie.java |
| 87 | src/model/TVShow.java | 88 | src/model/TVShow.java |
diff --git a/cmake/scripts/common/AddonHelpers.cmake b/cmake/scripts/common/AddonHelpers.cmake index 4bb4c98..a91e366 100644 --- a/cmake/scripts/common/AddonHelpers.cmake +++ b/cmake/scripts/common/AddonHelpers.cmake | |||
| @@ -21,7 +21,7 @@ macro(add_cpack_workaround target version ext) | |||
| 21 | 21 | ||
| 22 | add_custom_command(TARGET addon-package POST_BUILD | 22 | add_custom_command(TARGET addon-package POST_BUILD |
| 23 | COMMAND ${CMAKE_COMMAND} -E make_directory ${PACKAGE_DIR} | 23 | COMMAND ${CMAKE_COMMAND} -E make_directory ${PACKAGE_DIR} |
| 24 | COMMAND ${CMAKE_COMMAND} -E copy ${CPACK_PACKAGE_DIRECTORY}/addon-${target}-${version}.${ext} ${PACKAGE_DIR}/${target}-${version}.${ext}) | 24 | COMMAND ${CMAKE_COMMAND} -E copy ${CPACK_PACKAGE_DIRECTORY}/addon-${target}-${version}-${PLATFORM_TAG}.${ext} ${PACKAGE_DIR}/${target}+${PLATFORM_TAG}/${target}-${version}.${ext}) |
| 25 | endmacro() | 25 | endmacro() |
| 26 | 26 | ||
| 27 | # Grab the version from a given add-on's addon.xml | 27 | # Grab the version from a given add-on's addon.xml |
| @@ -153,7 +153,7 @@ macro (build_addon target prefix libs) | |||
| 153 | endif() | 153 | endif() |
| 154 | endforeach() | 154 | endforeach() |
| 155 | 155 | ||
| 156 | add_library(${target} ${${prefix}_SOURCES}) | 156 | add_library(${target} ${${prefix}_SOURCES} ${${prefix}_HEADERS}) |
| 157 | target_link_libraries(${target} ${${libs}}) | 157 | target_link_libraries(${target} ${${libs}}) |
| 158 | set_target_properties(${target} PROPERTIES VERSION ${${prefix}_VERSION} | 158 | set_target_properties(${target} PROPERTIES VERSION ${${prefix}_VERSION} |
| 159 | SOVERSION ${APP_VERSION_MAJOR}.${APP_VERSION_MINOR} | 159 | SOVERSION ${APP_VERSION_MAJOR}.${APP_VERSION_MINOR} |
| @@ -187,7 +187,6 @@ macro (build_addon target prefix libs) | |||
| 187 | # if there's an addon.xml.in we need to generate the addon.xml | 187 | # if there's an addon.xml.in we need to generate the addon.xml |
| 188 | if(EXISTS ${PROJECT_SOURCE_DIR}/${target}/addon.xml.in) | 188 | if(EXISTS ${PROJECT_SOURCE_DIR}/${target}/addon.xml.in) |
| 189 | set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${PROJECT_SOURCE_DIR}/${target}/addon.xml.in) | 189 | set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${PROJECT_SOURCE_DIR}/${target}/addon.xml.in) |
| 190 | set(PLATFORM ${CORE_SYSTEM_NAME}) | ||
| 191 | 190 | ||
| 192 | file(READ ${PROJECT_SOURCE_DIR}/${target}/addon.xml.in addon_file) | 191 | file(READ ${PROJECT_SOURCE_DIR}/${target}/addon.xml.in addon_file) |
| 193 | 192 | ||
| @@ -199,6 +198,9 @@ macro (build_addon target prefix libs) | |||
| 199 | endif() | 198 | endif() |
| 200 | endif() | 199 | endif() |
| 201 | 200 | ||
| 201 | # TODO: remove this hack after v18 | ||
| 202 | string(REPLACE "<platform>\@PLATFORM\@</platform>" "<platform>@PLATFORM_TAG@</platform>" addon_file "${addon_file}") | ||
| 203 | |||
| 202 | string(CONFIGURE "${addon_file}" addon_file_conf @ONLY) | 204 | string(CONFIGURE "${addon_file}" addon_file_conf @ONLY) |
| 203 | file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${target}/addon.xml CONTENT "${addon_file_conf}") | 205 | file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${target}/addon.xml CONTENT "${addon_file_conf}") |
| 204 | if(${APP_NAME_UC}_BUILD_DIR) | 206 | if(${APP_NAME_UC}_BUILD_DIR) |
| @@ -209,7 +211,6 @@ macro (build_addon target prefix libs) | |||
| 209 | # if there's an settings.xml.in we need to generate the settings.xml | 211 | # if there's an settings.xml.in we need to generate the settings.xml |
| 210 | if(EXISTS ${PROJECT_SOURCE_DIR}/${target}/resources/settings.xml.in) | 212 | if(EXISTS ${PROJECT_SOURCE_DIR}/${target}/resources/settings.xml.in) |
| 211 | set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${PROJECT_SOURCE_DIR}/${target}/resources/settings.xml.in) | 213 | set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${PROJECT_SOURCE_DIR}/${target}/resources/settings.xml.in) |
| 212 | set(PLATFORM ${CORE_SYSTEM_NAME}) | ||
| 213 | 214 | ||
| 214 | file(READ ${PROJECT_SOURCE_DIR}/${target}/resources/settings.xml.in settings_file) | 215 | file(READ ${PROJECT_SOURCE_DIR}/${target}/resources/settings.xml.in settings_file) |
| 215 | string(CONFIGURE "${settings_file}" settings_file_conf @ONLY) | 216 | string(CONFIGURE "${settings_file}" settings_file_conf @ONLY) |
| @@ -234,10 +235,10 @@ macro (build_addon target prefix libs) | |||
| 234 | endif() | 235 | endif() |
| 235 | set(CPACK_ARCHIVE_COMPONENT_INSTALL ON) | 236 | set(CPACK_ARCHIVE_COMPONENT_INSTALL ON) |
| 236 | set(CPACK_COMPONENTS_IGNORE_GROUPS 1) | 237 | set(CPACK_COMPONENTS_IGNORE_GROUPS 1) |
| 237 | list(APPEND CPACK_COMPONENTS_ALL ${target}-${${prefix}_VERSION}) | 238 | list(APPEND CPACK_COMPONENTS_ALL ${target}-${${prefix}_VERSION}-${PLATFORM_TAG}) |
| 238 | # Pack files together to create an archive | 239 | # Pack files together to create an archive |
| 239 | install(DIRECTORY ${target} ${CMAKE_CURRENT_BINARY_DIR}/${target} DESTINATION ./ | 240 | install(DIRECTORY ${target} ${CMAKE_CURRENT_BINARY_DIR}/${target} DESTINATION ./ |
| 240 | COMPONENT ${target}-${${prefix}_VERSION} | 241 | COMPONENT ${target}-${${prefix}_VERSION}-${PLATFORM_TAG} |
| 241 | REGEX ".+\\.xml\\.in(clude)?$" EXCLUDE) | 242 | REGEX ".+\\.xml\\.in(clude)?$" EXCLUDE) |
| 242 | if(WIN32) | 243 | if(WIN32) |
| 243 | if(NOT CPACK_PACKAGE_DIRECTORY) | 244 | if(NOT CPACK_PACKAGE_DIRECTORY) |
| @@ -256,21 +257,24 @@ macro (build_addon target prefix libs) | |||
| 256 | if(${prefix}_SOURCES) | 257 | if(${prefix}_SOURCES) |
| 257 | # install the generated DLL file | 258 | # install the generated DLL file |
| 258 | install(PROGRAMS ${LIBRARY_LOCATION} DESTINATION ${target} | 259 | install(PROGRAMS ${LIBRARY_LOCATION} DESTINATION ${target} |
| 259 | COMPONENT ${target}-${${prefix}_VERSION}) | 260 | COMPONENT ${target}-${${prefix}_VERSION}-${PLATFORM_TAG}) |
| 260 | 261 | ||
| 261 | # for debug builds also install the PDB file | 262 | # for debug builds also install the PDB file |
| 262 | install(FILES $<TARGET_PDB_FILE:${target}> DESTINATION ${target} | 263 | install(FILES $<TARGET_PDB_FILE:${target}> DESTINATION ${target} |
| 263 | CONFIGURATIONS Debug RelWithDebInfo | 264 | CONFIGURATIONS Debug RelWithDebInfo |
| 264 | COMPONENT ${target}-${${prefix}_VERSION}) | 265 | COMPONENT ${target}-${${prefix}_VERSION}-${PLATFORM_TAG}) |
| 265 | endif() | 266 | endif() |
| 266 | if(${prefix}_CUSTOM_BINARY) | 267 | if(${prefix}_CUSTOM_BINARY) |
| 267 | install(FILES ${LIBRARY_LOCATION} DESTINATION ${target} RENAME ${LIBRARY_FILENAME}) | 268 | install(FILES ${LIBRARY_LOCATION} DESTINATION ${target} RENAME ${LIBRARY_FILENAME} |
| 269 | COMPONENT ${target}-${${prefix}_VERSION}-${PLATFORM_TAG}) | ||
| 268 | endif() | 270 | endif() |
| 269 | if(${prefix}_CUSTOM_DATA) | 271 | if(${prefix}_CUSTOM_DATA) |
| 270 | install(DIRECTORY ${${prefix}_CUSTOM_DATA} DESTINATION ${target}/resources) | 272 | install(DIRECTORY ${${prefix}_CUSTOM_DATA} DESTINATION ${target}/resources |
| 273 | COMPONENT ${target}-${${prefix}_VERSION}-${PLATFORM_TAG}) | ||
| 271 | endif() | 274 | endif() |
| 272 | if(${prefix}_ADDITIONAL_BINARY) | 275 | if(${prefix}_ADDITIONAL_BINARY) |
| 273 | install(FILES ${${prefix}_ADDITIONAL_BINARY} DESTINATION ${target}) | 276 | install(FILES ${${prefix}_ADDITIONAL_BINARY} DESTINATION ${target} |
| 277 | COMPONENT ${target}-${${prefix}_VERSION}-${PLATFORM_TAG}) | ||
| 274 | endif() | 278 | endif() |
| 275 | else() # NOT WIN32 | 279 | else() # NOT WIN32 |
| 276 | if(NOT CPACK_PACKAGE_DIRECTORY) | 280 | if(NOT CPACK_PACKAGE_DIRECTORY) |
| @@ -278,11 +282,11 @@ macro (build_addon target prefix libs) | |||
| 278 | endif() | 282 | endif() |
| 279 | if(${prefix}_SOURCES) | 283 | if(${prefix}_SOURCES) |
| 280 | install(TARGETS ${target} DESTINATION ${target} | 284 | install(TARGETS ${target} DESTINATION ${target} |
| 281 | COMPONENT ${target}-${${prefix}_VERSION}) | 285 | COMPONENT ${target}-${${prefix}_VERSION}-${PLATFORM_TAG}) |
| 282 | endif() | 286 | endif() |
| 283 | if(${prefix}_CUSTOM_BINARY) | 287 | if(${prefix}_CUSTOM_BINARY) |
| 284 | install(FILES ${LIBRARY_LOCATION} DESTINATION ${target} RENAME ${LIBRARY_FILENAME} | 288 | install(FILES ${LIBRARY_LOCATION} DESTINATION ${target} RENAME ${LIBRARY_FILENAME} |
| 285 | COMPONENT ${target}-${${prefix}_VERSION}) | 289 | COMPONENT ${target}-${${prefix}_VERSION}-${PLATFORM_TAG}) |
| 286 | endif() | 290 | endif() |
| 287 | if(${prefix}_CUSTOM_DATA) | 291 | if(${prefix}_CUSTOM_DATA) |
| 288 | install(DIRECTORY ${${prefix}_CUSTOM_DATA} DESTINATION ${target}/resources) | 292 | install(DIRECTORY ${${prefix}_CUSTOM_DATA} DESTINATION ${target}/resources) |
diff --git a/cmake/scripts/common/PrepareEnv.cmake b/cmake/scripts/common/PrepareEnv.cmake index 1426148..20dbaf6 100644 --- a/cmake/scripts/common/PrepareEnv.cmake +++ b/cmake/scripts/common/PrepareEnv.cmake | |||
| @@ -32,6 +32,53 @@ if(NOT WIN32) | |||
| 32 | endif() | 32 | endif() |
| 33 | endif() | 33 | endif() |
| 34 | 34 | ||
| 35 | if(NOT CORE_SYSTEM_NAME) | ||
| 36 | if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") | ||
| 37 | set(CORE_SYSTEM_NAME "osx") | ||
| 38 | else() | ||
| 39 | string(TOLOWER ${CMAKE_SYSTEM_NAME} CORE_SYSTEM_NAME) | ||
| 40 | endif() | ||
| 41 | endif() | ||
| 42 | |||
| 43 | set(PLATFORM_TAG ${CORE_SYSTEM_NAME}) | ||
| 44 | |||
| 45 | if(CORE_SYSTEM_NAME STREQUAL android) | ||
| 46 | if (CPU MATCHES "v7a") | ||
| 47 | set(PLATFORM_TAG ${PLATFORM_TAG}-armv7) | ||
| 48 | elseif (CPU MATCHES "arm64") | ||
| 49 | set(PLATFORM_TAG ${PLATFORM_TAG}-aarch64) | ||
| 50 | elseif (CPU MATCHES "i686") | ||
| 51 | set(PLATFORM_TAG ${PLATFORM_TAG}-i686) | ||
| 52 | else() | ||
| 53 | message(FATAL_ERROR "Unsupported architecture") | ||
| 54 | endif() | ||
| 55 | elseif(CORE_SYSTEM_NAME STREQUAL ios) | ||
| 56 | if (CPU MATCHES armv7) | ||
| 57 | set(PLATFORM_TAG ${PLATFORM_TAG}-armv7) | ||
| 58 | elseif (CPU MATCHES arm64) | ||
| 59 | set(PLATFORM_TAG ${PLATFORM_TAG}-aarch64) | ||
| 60 | else() | ||
| 61 | message(FATAL_ERROR "Unsupported architecture") | ||
| 62 | endif() | ||
| 63 | elseif(CORE_SYSTEM_NAME STREQUAL osx) | ||
| 64 | set(PLATFORM_TAG ${PLATFORM_TAG}-${CPU}) | ||
| 65 | elseif(CORE_SYSTEM_NAME STREQUAL windows) | ||
| 66 | include(CheckSymbolExists) | ||
| 67 | check_symbol_exists(_X86_ "Windows.h" _X86_) | ||
| 68 | check_symbol_exists(_AMD64_ "Windows.h" _AMD64_) | ||
| 69 | |||
| 70 | if(_X86_) | ||
| 71 | set(PLATFORM_TAG ${PLATFORM_TAG}-i686) | ||
| 72 | elseif(_AMD64_) | ||
| 73 | set(PLATFORM_TAG ${PLATFORM_TAG}-x86_64) | ||
| 74 | else() | ||
| 75 | message(FATAL_ERROR "Unsupported architecture") | ||
| 76 | endif() | ||
| 77 | |||
| 78 | unset(_X86_) | ||
| 79 | unset(_AMD64_) | ||
| 80 | endif() | ||
| 81 | |||
| 35 | # generate the proper KodiConfig.cmake file | 82 | # generate the proper KodiConfig.cmake file |
| 36 | configure_file(${CORE_SOURCE_DIR}/cmake/KodiConfig.cmake.in ${APP_LIB_DIR}/KodiConfig.cmake @ONLY) | 83 | configure_file(${CORE_SOURCE_DIR}/cmake/KodiConfig.cmake.in ${APP_LIB_DIR}/KodiConfig.cmake @ONLY) |
| 37 | 84 | ||
diff --git a/cmake/scripts/ios/ArchSetup.cmake b/cmake/scripts/ios/ArchSetup.cmake index bec8a7c..6b053dc 100644 --- a/cmake/scripts/ios/ArchSetup.cmake +++ b/cmake/scripts/ios/ArchSetup.cmake | |||
| @@ -12,9 +12,13 @@ set(CMAKE_SYSTEM_NAME Darwin) | |||
| 12 | if(WITH_ARCH) | 12 | if(WITH_ARCH) |
| 13 | set(ARCH ${WITH_ARCH}) | 13 | set(ARCH ${WITH_ARCH}) |
| 14 | else() | 14 | else() |
| 15 | if(CPU STREQUAL armv7 OR CPU STREQUAL arm64) | 15 | if(CPU STREQUAL armv7) |
| 16 | set(CMAKE_OSX_ARCHITECTURES ${CPU}) | 16 | set(CMAKE_OSX_ARCHITECTURES ${CPU}) |
| 17 | set(ARCH arm-osx) | 17 | set(ARCH arm) |
| 18 | set(NEON True) | ||
| 19 | elseif(CPU STREQUAL arm64) | ||
| 20 | set(CMAKE_OSX_ARCHITECTURES ${CPU}) | ||
| 21 | set(ARCH aarch64) | ||
| 18 | set(NEON True) | 22 | set(NEON True) |
| 19 | else() | 23 | else() |
| 20 | message(SEND_ERROR "Unknown CPU: ${CPU}") | 24 | message(SEND_ERROR "Unknown CPU: ${CPU}") |
| @@ -36,7 +40,6 @@ list(APPEND DEPLIBS "-framework CoreFoundation" "-framework CoreVideo" | |||
| 36 | "-framework CoreMedia" "-framework AVFoundation" | 40 | "-framework CoreMedia" "-framework AVFoundation" |
| 37 | "-framework VideoToolbox") | 41 | "-framework VideoToolbox") |
| 38 | 42 | ||
| 39 | set(ENABLE_DVDCSS OFF CACHE BOOL "" FORCE) | ||
| 40 | set(ENABLE_OPTICAL OFF CACHE BOOL "" FORCE) | 43 | set(ENABLE_OPTICAL OFF CACHE BOOL "" FORCE) |
| 41 | 44 | ||
| 42 | set(CMAKE_XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET "9.0") | 45 | set(CMAKE_XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET "9.0") |
diff --git a/cmake/treedata/common/retroplayer.txt b/cmake/treedata/common/retroplayer.txt index cf9c9c5..97fc849 100644 --- a/cmake/treedata/common/retroplayer.txt +++ b/cmake/treedata/common/retroplayer.txt | |||
| @@ -4,6 +4,7 @@ xbmc/cores/RetroPlayer/buffers cores/RetroPlaye | |||
| 4 | xbmc/cores/RetroPlayer/buffers/video cores/RetroPlayer/buffers/video | 4 | xbmc/cores/RetroPlayer/buffers/video cores/RetroPlayer/buffers/video |
| 5 | xbmc/cores/RetroPlayer/guibridge cores/RetroPlayer/guibridge | 5 | xbmc/cores/RetroPlayer/guibridge cores/RetroPlayer/guibridge |
| 6 | xbmc/cores/RetroPlayer/guicontrols cores/RetroPlayer/guicontrols | 6 | xbmc/cores/RetroPlayer/guicontrols cores/RetroPlayer/guicontrols |
| 7 | xbmc/cores/RetroPlayer/guiplayback cores/RetroPlayer/guiplayback | ||
| 7 | xbmc/cores/RetroPlayer/guiwindows cores/RetroPlayer/guiwindows | 8 | xbmc/cores/RetroPlayer/guiwindows cores/RetroPlayer/guiwindows |
| 8 | xbmc/cores/RetroPlayer/playback cores/RetroPlayer/playback | 9 | xbmc/cores/RetroPlayer/playback cores/RetroPlayer/playback |
| 9 | xbmc/cores/RetroPlayer/process cores/RetroPlayer/process | 10 | xbmc/cores/RetroPlayer/process cores/RetroPlayer/process |
