diff options
| author | manuel <manuel@mausz.at> | 2016-05-01 18:06:14 +0200 |
|---|---|---|
| committer | manuel <manuel@mausz.at> | 2016-05-01 18:06:14 +0200 |
| commit | 5823b05feb29a59510c32a9c28ca18b50b9b6399 (patch) | |
| tree | ac1603a592af9415b722b2669e04e417bd13c45c | |
| parent | 88de33e1836c646ccf594ef162c258d1210fd24e (diff) | |
| download | kodi-pvr-build-5823b05feb29a59510c32a9c28ca18b50b9b6399.tar.gz kodi-pvr-build-5823b05feb29a59510c32a9c28ca18b50b9b6399.tar.bz2 kodi-pvr-build-5823b05feb29a59510c32a9c28ca18b50b9b6399.zip | |
sync with upstream
42 files changed, 367 insertions, 247 deletions
diff --git a/project/cmake/CMakeLists.txt b/project/cmake/CMakeLists.txt index ea0f622..de0ea20 100644 --- a/project/cmake/CMakeLists.txt +++ b/project/cmake/CMakeLists.txt | |||
| @@ -57,6 +57,9 @@ endif() | |||
| 57 | get_filename_component(CORE_SOURCE_DIR ${PROJECT_SOURCE_DIR}/../.. ABSOLUTE) | 57 | get_filename_component(CORE_SOURCE_DIR ${PROJECT_SOURCE_DIR}/../.. ABSOLUTE) |
| 58 | set(CORE_BUILD_DIR build) | 58 | set(CORE_BUILD_DIR build) |
| 59 | 59 | ||
| 60 | message(STATUS "Source directory: ${CORE_SOURCE_DIR}") | ||
| 61 | message(STATUS "Build directory: ${CMAKE_BINARY_DIR}") | ||
| 62 | |||
| 60 | include(scripts/common/generatorsetup.cmake) | 63 | include(scripts/common/generatorsetup.cmake) |
| 61 | include(scripts/common/addoptions.cmake) | 64 | include(scripts/common/addoptions.cmake) |
| 62 | include(scripts/common/archsetup.cmake) | 65 | include(scripts/common/archsetup.cmake) |
| @@ -205,6 +208,8 @@ endif() | |||
| 205 | 208 | ||
| 206 | # Compile Info | 209 | # Compile Info |
| 207 | add_custom_command(OUTPUT ${CORE_BUILD_DIR}/xbmc/CompileInfo.cpp | 210 | add_custom_command(OUTPUT ${CORE_BUILD_DIR}/xbmc/CompileInfo.cpp |
| 211 | ${CMAKE_BINARY_DIR}/addons/xbmc.addon/addon.xml | ||
| 212 | ${CMAKE_BINARY_DIR}/addons/kodi.guilib/addon.xml | ||
| 208 | COMMAND ${CMAKE_COMMAND} -DCORE_SOURCE_DIR=${CORE_SOURCE_DIR} | 213 | COMMAND ${CMAKE_COMMAND} -DCORE_SOURCE_DIR=${CORE_SOURCE_DIR} |
| 209 | -DCORE_SYSTEM_NAME=${CORE_SYSTEM_NAME} | 214 | -DCORE_SYSTEM_NAME=${CORE_SYSTEM_NAME} |
| 210 | -DCORE_BUILD_DIR=${CORE_BUILD_DIR} | 215 | -DCORE_BUILD_DIR=${CORE_BUILD_DIR} |
| @@ -218,6 +223,8 @@ add_custom_command(OUTPUT ${CORE_BUILD_DIR}/xbmc/CompileInfo.cpp | |||
| 218 | ${CORE_SOURCE_DIR}/addons/kodi.guilib/addon.xml.in | 223 | ${CORE_SOURCE_DIR}/addons/kodi.guilib/addon.xml.in |
| 219 | ${CORE_SOURCE_DIR}/xbmc/CompileInfo.cpp.in) | 224 | ${CORE_SOURCE_DIR}/xbmc/CompileInfo.cpp.in) |
| 220 | list(APPEND install_data addons/xbmc.addon/addon.xml) | 225 | list(APPEND install_data addons/xbmc.addon/addon.xml) |
| 226 | list(APPEND install_data addons/xbmc.json/addon.xml) | ||
| 227 | list(APPEND install_data addons/kodi.guilib/addon.xml) | ||
| 221 | add_library(compileinfo OBJECT ${CORE_BUILD_DIR}/xbmc/CompileInfo.cpp) | 228 | add_library(compileinfo OBJECT ${CORE_BUILD_DIR}/xbmc/CompileInfo.cpp) |
| 222 | target_compile_options(compileinfo PRIVATE "${SYSTEM_DEFINES}") | 229 | target_compile_options(compileinfo PRIVATE "${SYSTEM_DEFINES}") |
| 223 | 230 | ||
| @@ -245,6 +252,11 @@ foreach(binding ${bindings}) | |||
| 245 | list(APPEND addon_bindings ${CORE_SOURCE_DIR}/${binding}) | 252 | list(APPEND addon_bindings ${CORE_SOURCE_DIR}/${binding}) |
| 246 | endforeach() | 253 | endforeach() |
| 247 | 254 | ||
| 255 | file(STRINGS ${PROJECT_SOURCE_DIR}/installdata/cmake-files.txt cmakefiles) | ||
| 256 | foreach(cmakefile ${cmakefiles}) | ||
| 257 | list(APPEND cmake_files ${CORE_SOURCE_DIR}/${cmakefile}) | ||
| 258 | endforeach() | ||
| 259 | |||
| 248 | add_subdirectory(${CORE_SOURCE_DIR}/lib/gtest ${CORE_BUILD_DIR}/gtest EXCLUDE_FROM_ALL) | 260 | add_subdirectory(${CORE_SOURCE_DIR}/lib/gtest ${CORE_BUILD_DIR}/gtest EXCLUDE_FROM_ALL) |
| 249 | 261 | ||
| 250 | # Subdirs | 262 | # Subdirs |
| @@ -277,9 +289,10 @@ endif() | |||
| 277 | 289 | ||
| 278 | core_link_library(XBMC_addon addons/library.xbmc.addon/libXBMC_addon) | 290 | core_link_library(XBMC_addon addons/library.xbmc.addon/libXBMC_addon) |
| 279 | core_link_library(XBMC_codec addons/library.xbmc.codec/libXBMC_codec) | 291 | core_link_library(XBMC_codec addons/library.xbmc.codec/libXBMC_codec) |
| 280 | core_link_library(KODI_guilib addons/library.kodi.guilib/libKODI_guilib) | 292 | core_link_library(XBMC_pvr addons/library.xbmc.pvr/libXBMC_pvr) |
| 281 | core_link_library(KODI_adsp addons/library.kodi.adsp/libKODI_adsp) | 293 | core_link_library(KODI_adsp addons/library.kodi.adsp/libKODI_adsp) |
| 282 | core_link_library(XBMC_pvr addons/library.xbmc.pvr/libXBMC_pvr) | 294 | core_link_library(KODI_audioengine addons/library.kodi.audioengine/libKODI_audioengine) |
| 295 | core_link_library(KODI_guilib addons/library.kodi.guilib/libKODI_guilib) | ||
| 283 | core_link_library(KODI_inputstream addons/library.kodi.inputstream/libKODI_inputstream) | 296 | core_link_library(KODI_inputstream addons/library.kodi.inputstream/libKODI_inputstream) |
| 284 | core_link_library(KODI_peripheral addons/library.kodi.peripheral/libKODI_peripheral) | 297 | core_link_library(KODI_peripheral addons/library.kodi.peripheral/libKODI_peripheral) |
| 285 | 298 | ||
| @@ -315,7 +328,7 @@ else() | |||
| 315 | endif() | 328 | endif() |
| 316 | 329 | ||
| 317 | # testing | 330 | # testing |
| 318 | copy_files_from_filelist_to_buildtree(${PROJECT_SOURCE_DIR}/installdata/test-reference-data.txt 1) | 331 | copy_files_from_filelist_to_buildtree(${PROJECT_SOURCE_DIR}/installdata/test-reference-data.txt NO_INSTALL) |
| 319 | add_executable(${APP_NAME_LC}-test EXCLUDE_FROM_ALL ${CORE_SOURCE_DIR}/xbmc/test/xbmc-test.cpp $<TARGET_OBJECTS:compileinfo>) | 332 | add_executable(${APP_NAME_LC}-test EXCLUDE_FROM_ALL ${CORE_SOURCE_DIR}/xbmc/test/xbmc-test.cpp $<TARGET_OBJECTS:compileinfo>) |
| 320 | whole_archive(_TEST_LIBRARIES ${core_DEPENDS} gtest ${test_archives}) | 333 | whole_archive(_TEST_LIBRARIES ${core_DEPENDS} gtest ${test_archives}) |
| 321 | target_link_libraries(${APP_NAME_LC}-test ${SYSTEM_LDFLAGS} ${_TEST_LIBRARIES} ${DEPLIBS} ${CMAKE_DL_LIBS}) | 334 | target_link_libraries(${APP_NAME_LC}-test ${SYSTEM_LDFLAGS} ${_TEST_LIBRARIES} ${DEPLIBS} ${CMAKE_DL_LIBS}) |
| @@ -359,11 +372,22 @@ foreach(msg ${final_message}) | |||
| 359 | endforeach() | 372 | endforeach() |
| 360 | 373 | ||
| 361 | if(VERBOSE) | 374 | if(VERBOSE) |
| 362 | message(STATUS "\n#---- Internal Variables ----# ") | 375 | message(STATUS "\n#--------------- Internal Variables -------------#") |
| 363 | message(STATUS "DEPLIBS: ${DEPLIBS}") | 376 | message(STATUS "DEPLIBS: ${DEPLIBS}") |
| 364 | message(STATUS "SYSTEM_LDFLAGS: ${SYSTEM_LDFLAGS}") | ||
| 365 | message(STATUS "core_DEPENDS: ${core_DEPENDS}") | 377 | message(STATUS "core_DEPENDS: ${core_DEPENDS}") |
| 366 | message(STATUS "CMAKE_DL_LIBS: ${CMAKE_DL_LIBS}") | 378 | message(STATUS "#---------------------------------------------#") |
| 379 | message(STATUS "SYSTEM_LDFLAGS : ${SYSTEM_LDFLAGS}") | ||
| 380 | message(STATUS "CMAKE_DL_LIBS : ${CMAKE_DL_LIBS}") | ||
| 381 | message(STATUS "CMAKE_C_FLAGS : ${CMAKE_C_FLAGS}") | ||
| 382 | message(STATUS "CMAKE_CXX_FLAGS : ${CMAKE_CXX_FLAGS}") | ||
| 383 | message(STATUS "CMAKE_EXE_LINKER_FLAGS: ${CMAKE_EXE_LINKER_FLAGS}") | ||
| 384 | message(STATUS "#---------------------------------------------#") | ||
| 385 | message(STATUS "bindir : ${bindir}") | ||
| 386 | message(STATUS "includedir : ${includedir}") | ||
| 387 | message(STATUS "libdir : ${libdir}") | ||
| 388 | message(STATUS "datarootdir: ${datarootdir}") | ||
| 389 | message(STATUS "#---------------------------------------------#") | ||
| 390 | message(STATUS "GIT_REV: ${APP_SCMID}") | ||
| 367 | endif() | 391 | endif() |
| 368 | message(STATUS "#-----------------------#") | 392 | message(STATUS "#---------------------------------------------#") |
| 369 | 393 | ||
diff --git a/project/cmake/README.md b/project/cmake/README.md index c0f94d8..28af525 100644 --- a/project/cmake/README.md +++ b/project/cmake/README.md | |||
| @@ -8,7 +8,7 @@ executable (but no packaging or dependency management yet) for the following | |||
| 8 | platforms: | 8 | platforms: |
| 9 | 9 | ||
| 10 | - Linux (GNU Makefiles) | 10 | - Linux (GNU Makefiles) |
| 11 | - Windows (NMake Makefiles, Visual Studio 12 (2013)) | 11 | - Windows (NMake Makefiles, Visual Studio 14 (2015)) |
| 12 | - OSX (GNU Makefiles, Xcode) | 12 | - OSX (GNU Makefiles, Xcode) |
| 13 | - Android (GNU Makefiles) | 13 | - Android (GNU Makefiles) |
| 14 | 14 | ||
| @@ -107,7 +107,7 @@ kodi.exe | |||
| 107 | ### Windows with Visual Studio project files | 107 | ### Windows with Visual Studio project files |
| 108 | 108 | ||
| 109 | ``` | 109 | ``` |
| 110 | cmake -G "Visual Studio 12" <KODI_SRC>/project/cmake/ | 110 | cmake -G "Visual Studio 14" <KODI_SRC>/project/cmake/ |
| 111 | cmake --build . --config "Debug" # or: Build solution with Visual Studio | 111 | cmake --build . --config "Debug" # or: Build solution with Visual Studio |
| 112 | set KODI_HOME="%CD%" && Debug\kodi.exe | 112 | set KODI_HOME="%CD%" && Debug\kodi.exe |
| 113 | ``` | 113 | ``` |
diff --git a/project/cmake/addons/CMakeLists.txt b/project/cmake/addons/CMakeLists.txt index 8fc1a23..982d977 100644 --- a/project/cmake/addons/CMakeLists.txt +++ b/project/cmake/addons/CMakeLists.txt | |||
| @@ -120,6 +120,7 @@ endif() | |||
| 120 | if(NOT ADDONS_TO_BUILD) | 120 | if(NOT ADDONS_TO_BUILD) |
| 121 | set(ADDONS_TO_BUILD "all") | 121 | set(ADDONS_TO_BUILD "all") |
| 122 | else() | 122 | else() |
| 123 | string(STRIP "${ADDONS_TO_BUILD}" ADDONS_TO_BUILD) | ||
| 123 | message(STATUS "Building following addons: ${ADDONS_TO_BUILD}") | 124 | message(STATUS "Building following addons: ${ADDONS_TO_BUILD}") |
| 124 | separate_arguments(ADDONS_TO_BUILD) | 125 | separate_arguments(ADDONS_TO_BUILD) |
| 125 | endif() | 126 | endif() |
| @@ -132,6 +133,7 @@ endif() | |||
| 132 | get_filename_component(ADDONS_DEFINITION_DIR "${ADDONS_DEFINITION_DIR}" ABSOLUTE) | 133 | get_filename_component(ADDONS_DEFINITION_DIR "${ADDONS_DEFINITION_DIR}" ABSOLUTE) |
| 133 | 134 | ||
| 134 | if(ADDON_SRC_PREFIX) | 135 | if(ADDON_SRC_PREFIX) |
| 136 | get_filename_component(ADDON_SRC_PREFIX "${ADDON_SRC_PREFIX}" ABSOLUTE) | ||
| 135 | message(STATUS "Overriding addon source directory prefix: ${ADDON_SRC_PREFIX}") | 137 | message(STATUS "Overriding addon source directory prefix: ${ADDON_SRC_PREFIX}") |
| 136 | endif() | 138 | endif() |
| 137 | 139 | ||
| @@ -196,12 +198,12 @@ if(NOT addons) | |||
| 196 | file(MAKE_DIRECTORY ${BOOTSTRAP_BUILD_DIR}) | 198 | file(MAKE_DIRECTORY ${BOOTSTRAP_BUILD_DIR}) |
| 197 | endif() | 199 | endif() |
| 198 | 200 | ||
| 201 | string (REPLACE ";" " " ADDONS_TO_BUILD_STR "${ADDONS_TO_BUILD}") | ||
| 199 | # generate the bootstrap buildsystem | 202 | # generate the bootstrap buildsystem |
| 200 | execute_process(COMMAND ${CMAKE_COMMAND} ${PROJECT_SOURCE_DIR}/bootstrap | 203 | execute_process(COMMAND ${CMAKE_COMMAND} ${PROJECT_SOURCE_DIR}/bootstrap |
| 201 | -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} | ||
| 202 | -DCMAKE_INSTALL_PREFIX:PATH=${ADDONS_DEFINITION_DIR} | 204 | -DCMAKE_INSTALL_PREFIX:PATH=${ADDONS_DEFINITION_DIR} |
| 203 | -DBUILD_DIR:PATH=${BOOTSTRAP_BUILD_DIR} | 205 | -DBUILD_DIR:PATH=${BOOTSTRAP_BUILD_DIR} |
| 204 | -DADDONS_TO_BUILD=${ADDONS_TO_BUILD} | 206 | -DADDONS_TO_BUILD:STRING=${ADDONS_TO_BUILD_STR} |
| 205 | WORKING_DIRECTORY ${BOOTSTRAP_BUILD_DIR}) | 207 | WORKING_DIRECTORY ${BOOTSTRAP_BUILD_DIR}) |
| 206 | 208 | ||
| 207 | # execute the generated bootstrap buildsystem | 209 | # execute the generated bootstrap buildsystem |
diff --git a/project/cmake/addons/README b/project/cmake/addons/README deleted file mode 100644 index a0f2c32..0000000 --- a/project/cmake/addons/README +++ /dev/null | |||
| @@ -1,94 +0,0 @@ | |||
| 1 | KODI ADDONS | ||
| 2 | =========== | ||
| 3 | This directory contains the cmake-based buildsystem for addons. It looks into | ||
| 4 | the directory pointed to by the ADDONS_DEFINITION_DIR option (which defaults to | ||
| 5 | the "addons" sub-directory) and parses all *.txt files recursively. Each addon | ||
| 6 | must have its own <addon-id>.txt file in a separate sub-directory which must | ||
| 7 | follow one of the defined format: | ||
| 8 | <addon-id> <git-url> <git-revision> | ||
| 9 | <addon-id> <tarball-url> | ||
| 10 | <addon-id> <file://path> | ||
| 11 | where | ||
| 12 | * <addon-id> must be identical to the addon's ID as defined in the addon's | ||
| 13 | addon.xml | ||
| 14 | * <git-url> must be the URL of the git repository containing the addon | ||
| 15 | * <git-revision> must be a valid git tag/branch/commit in the addon's git | ||
| 16 | repository which will be used for the build. | ||
| 17 | * <tarball-url> must be the URL to a .tar.gz tarball containing the addon | ||
| 18 | * <file://path> must be a file:// based path to the directory containing the | ||
| 19 | addon | ||
| 20 | |||
| 21 | Reserved filenames (for additional information on how to build an addon) | ||
| 22 | are: | ||
| 23 | * platforms.txt: List of platforms to build an addon for (or "all"). It is | ||
| 24 | also supported to specify negated platforms with a leading exclamation mark | ||
| 25 | (i), e.g. "!windows". | ||
| 26 | Available platforms are: linux, windows, osx, ios, android, rbpi, freebsd | ||
| 27 | |||
| 28 | ATTENTION: If no addon definitions could be found the buildsystem assumes that | ||
| 29 | the bootstrapping of the addon definition repositories hasn't been | ||
| 30 | performed yet and automatically executes the addon bootstrapping | ||
| 31 | buildsystem located in the "bootstrap" sub-directory with the default | ||
| 32 | settings (i.e. all addons from all pre-defined addon definition | ||
| 33 | repositories are bootstrapped into the directory pointed to by the | ||
| 34 | ADDONS_DEFINITION_DIR option). | ||
| 35 | |||
| 36 | The buildsystem uses the following variables (which can be passed into it when | ||
| 37 | executing cmake with the -D<variable-name>=<value> option) to e.g. access | ||
| 38 | specific paths: | ||
| 39 | * ADDONS_TO_BUILD has two variations, which are tested in order: | ||
| 40 | - a quoted, space delimited list of <addon-id>s that | ||
| 41 | you want to build (default is "all"). | ||
| 42 | - a regular expression that every <addon-id> is matched against | ||
| 43 | e.g.: ADDONS_TO_BUILD=pvr.* to build all pvr addons | ||
| 44 | * ADDONS_DEFINITION_DIR points to the directory containing the definitions | ||
| 45 | for the addons to be built. | ||
| 46 | * ADDON_SRC_PREFIX can be used to override the addon repository location. | ||
| 47 | It must point to the locally available parent directory of the addon(s) to build | ||
| 48 | <addon-id> will be appended to this path automatically | ||
| 49 | * CMAKE_BUILD_TYPE specifies the type of the build. This can be either "Debug" | ||
| 50 | or "Release" (default is "Release"). | ||
| 51 | * CMAKE_INSTALL_PREFIX points to the directory where the built addons and their | ||
| 52 | additional files (addon.xml, resources ...) will be installed to (defaults | ||
| 53 | to <DEPENDS_PATH>). | ||
| 54 | * CMAKE_TOOLCHAIN_FILE can be used to pass a toolchain file into the add-on | ||
| 55 | builds. | ||
| 56 | * DEPENDS_PATH points to the directory containing the "include" and "lib" | ||
| 57 | directories of the addons' dependencies. | ||
| 58 | * APP_ROOT points to the root directory of the project (default is the | ||
| 59 | absolute representation of ../../.. starting from this directory). | ||
| 60 | * BUILD_DIR points to the directory where the addons and their dependencies | ||
| 61 | will be downloaded and built. | ||
| 62 | * PACKAGE_ZIP=ON means that the add-ons will be 'packaged' into a common folder, | ||
| 63 | rather than being placed in <CMAKE_INSTALL_PREFIX>/lib/kodi/addons and | ||
| 64 | <CMAKE_INSTALL_PREFIX>/share/kodi/addons. | ||
| 65 | * PACKAGE_DIR points to the directory where the ZIP archived addons will be | ||
| 66 | stored after they have been packaged (defaults to <BUILD_DIR>/zips) | ||
| 67 | * ARCH_DEFINES specifies the platform-specific C/C++ preprocessor defines | ||
| 68 | (defaults to empty). | ||
| 69 | * ADDON_TARBALL_CACHING specifies whether downloaded addon source tarballs | ||
| 70 | should be cached or not (defaults to ON). | ||
| 71 | |||
| 72 | The buildsystem makes some assumptions about the environment which must be met | ||
| 73 | by whoever uses it: | ||
| 74 | * Any dependencies of the addons must already be built and their include and | ||
| 75 | library files must be present in the path pointed to by <CMAKE_PREFIX_PATH> (in | ||
| 76 | "include" and "lib" sub-directories). | ||
| 77 | |||
| 78 | To trigger the cmake-based buildsystem the following command must be executed | ||
| 79 | with <path> being the path to this directory (absolute or relative, allowing for | ||
| 80 | in-source and out-of-source builds). | ||
| 81 | |||
| 82 | cmake <path> -G <generator> | ||
| 83 | |||
| 84 | cmake supports multiple generators, see | ||
| 85 | http://www.cmake.org/cmake/help/v2.8.8/cmake.html#section_Generators for a list. | ||
| 86 | |||
| 87 | In case of additional options the call might look like this | ||
| 88 | |||
| 89 | cmake <path> [-G <generator>] \ | ||
| 90 | -DCMAKE_BUILD_TYPE=Release \ | ||
| 91 | -DAPP_ROOT="<path-to-app-root>" \ | ||
| 92 | -DARCH_DEFINES="-DTARGET_LINUX" \ | ||
| 93 | -DDEPENDS_PATH="<path-to-built-depends>" \ | ||
| 94 | -DCMAKE_INSTALL_PREFIX="<path-to-install-directory" | ||
diff --git a/project/cmake/addons/README.md b/project/cmake/addons/README.md new file mode 100644 index 0000000..c75ead7 --- /dev/null +++ b/project/cmake/addons/README.md | |||
| @@ -0,0 +1,61 @@ | |||
| 1 |  | ||
| 2 | # Kodi add-ons CMake based buildsystem | ||
| 3 | This directory contains the cmake-based buildsystem for Kodi add-ons. It looks into the directory pointed to by the *ADDONS_DEFINITION_DIR* option (which defaults to the *addons* sub-directory) and parses all *.txt files recursively. Each add-on must have its own `<addon-id>.txt` file in a separate sub-directory that must follow one of the defined formats: | ||
| 4 | |||
| 5 | - `<addon-id> <git-url> <git-revision>` | ||
| 6 | - `<addon-id> <tarball-url>` | ||
| 7 | - `<addon-id> <file://path>` | ||
| 8 | |||
| 9 | where | ||
| 10 | - `<addon-id>` must be identical to the add-on's ID as defined in the add-on's addon.xml | ||
| 11 | - `<git-url>` must be the URL of the git repository containing the add-on | ||
| 12 | - `<git-revision>` must be a valid git tag/branch/commit in the add-on's git repository which will be used for the build | ||
| 13 | - `<tarball-url>` must be the URL to a .tar.gz tarball containing the add-on | ||
| 14 | - `<file://path>` must be a *file://* based path to the directory containing the add-on | ||
| 15 | |||
| 16 | ## Reserved filenames | ||
| 17 | - **platforms.txt** | ||
| 18 | |||
| 19 | List of platforms to build an add-on for (or *all*). Negating platforms is supported using a leading exclamation mark, e.g. *!windows*. | ||
| 20 | |||
| 21 | Available platforms are: linux, windows, osx, ios, android, rbpi and freebsd. | ||
| 22 | |||
| 23 | #### Attention | ||
| 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 | |||
| 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: | ||
| 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*) | ||
| 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 | ||
| 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 `<DEPENDS_PATH>`) | ||
| 35 | - `CMAKE_TOOLCHAIN_FILE` can be used to pass a toolchain file into the add-on builds | ||
| 36 | - `DEPENDS_PATH` points to the directory containing the *include* and *lib* directories of the add-ons' dependencies. | ||
| 37 | - `APP_ROOT` 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 | ||
| 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` | ||
| 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`) | ||
| 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*) | ||
| 43 | |||
| 44 | ## Building | ||
| 45 | The buildsystem makes some assumptions about the environment which must be met by whoever uses it: | ||
| 46 | - 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 | |||
| 48 | 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 | ||
| 49 | |||
| 50 | `cmake <path> -G <generator>` | ||
| 51 | |||
| 52 | CMake supports multiple generators. See [here] (https://cmake.org/cmake/help/v3.1/manual/cmake-generators.7.html) for a list. | ||
| 53 | |||
| 54 | In case of additional options the call might look like this: | ||
| 55 | |||
| 56 | cmake `<path>` [-G `<generator>`] \ | ||
| 57 | -DCMAKE_BUILD_TYPE=Release \ | ||
| 58 | -DAPP_ROOT="`<path-to-app-root>`" \ | ||
| 59 | -DARCH_DEFINES="-DTARGET_LINUX" \ | ||
| 60 | -DDEPENDS_PATH=`<path-to-built-depends>` \ | ||
| 61 | -DCMAKE_INSTALL_PREFIX="`<path-to-install-directory`" | ||
diff --git a/project/cmake/addons/bootstrap/bootstrap.cmake b/project/cmake/addons/bootstrap/bootstrap.cmake index c78910c..25e8aa2 100644 --- a/project/cmake/addons/bootstrap/bootstrap.cmake +++ b/project/cmake/addons/bootstrap/bootstrap.cmake | |||
| @@ -9,6 +9,8 @@ endif() | |||
| 9 | if(NOT ADDONS_TO_BUILD) | 9 | if(NOT ADDONS_TO_BUILD) |
| 10 | set(ADDONS_TO_BUILD "all") | 10 | set(ADDONS_TO_BUILD "all") |
| 11 | else() | 11 | else() |
| 12 | string(STRIP "${ADDONS_TO_BUILD}" ADDONS_TO_BUILD) | ||
| 13 | message(STATUS "Bootstrapping following addons: ${ADDONS_TO_BUILD}") | ||
| 12 | separate_arguments(ADDONS_TO_BUILD) | 14 | separate_arguments(ADDONS_TO_BUILD) |
| 13 | endif() | 15 | endif() |
| 14 | 16 | ||
diff --git a/project/cmake/installdata/addon-bindings.txt b/project/cmake/installdata/addon-bindings.txt index 61d2bc1..5655da5 100644 --- a/project/cmake/installdata/addon-bindings.txt +++ b/project/cmake/installdata/addon-bindings.txt | |||
| @@ -13,10 +13,11 @@ xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_epg_types.h | |||
| 13 | xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_inputstream_dll.h | 13 | xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_inputstream_dll.h |
| 14 | xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_inputstream_types.h | 14 | xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_inputstream_types.h |
| 15 | xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_vfs_types.h | 15 | xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_vfs_types.h |
| 16 | xbmc/addons/kodi-addon-dev-kit/include/kodi_peripheral_callbacks.h | 16 | xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_vfs_utils.hpp |
| 17 | xbmc/addons/kodi-addon-dev-kit/include/kodi_peripheral_dll.h | 17 | xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_peripheral_callbacks.h |
| 18 | xbmc/addons/kodi-addon-dev-kit/include/kodi_peripheral_types.h | 18 | xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_peripheral_dll.h |
| 19 | xbmc/addons/kodi-addon-dev-kit/include/kodi_peripheral_utils.hpp | 19 | xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_peripheral_types.h |
| 20 | xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_peripheral_utils.hpp | ||
| 20 | xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_dll.h | 21 | xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_dll.h |
| 21 | xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_types.h | 22 | xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_types.h |
| 22 | xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_scr_dll.h | 23 | xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_scr_dll.h |
| @@ -28,6 +29,9 @@ xbmc/addons/kodi-addon-dev-kit/include/kodi/libKODI_audioengine.h | |||
| 28 | xbmc/addons/kodi-addon-dev-kit/include/kodi/libKODI_adsp.h | 29 | xbmc/addons/kodi-addon-dev-kit/include/kodi/libKODI_adsp.h |
| 29 | xbmc/addons/kodi-addon-dev-kit/include/kodi/libKODI_guilib.h | 30 | xbmc/addons/kodi-addon-dev-kit/include/kodi/libKODI_guilib.h |
| 30 | xbmc/addons/kodi-addon-dev-kit/include/kodi/libKODI_inputstream.h | 31 | xbmc/addons/kodi-addon-dev-kit/include/kodi/libKODI_inputstream.h |
| 31 | xbmc/addons/kodi-addon-dev-kit-include/kodi/libKODI_peripheral.h | 32 | xbmc/addons/kodi-addon-dev-kit/include/kodi/libKODI_peripheral.h |
| 32 | xbmc/addons/kodi-addon-dev-kit/include/kodi/libXBMC_pvr.h | 33 | xbmc/addons/kodi-addon-dev-kit/include/kodi/libXBMC_pvr.h |
| 33 | xbmc/addons/kodi-addon-dev-kit/include/kodi/libXBMC_codec.h | 34 | xbmc/addons/kodi-addon-dev-kit/include/kodi/libXBMC_codec.h |
| 35 | xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxPacket.h | ||
| 36 | xbmc/cores/AudioEngine/Utils/AEChannelData.h | ||
| 37 | xbmc/filesystem/IFileTypes.h | ||
diff --git a/project/cmake/installdata/cmake-files.txt b/project/cmake/installdata/cmake-files.txt new file mode 100644 index 0000000..8dda8cd --- /dev/null +++ b/project/cmake/installdata/cmake-files.txt | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | project/cmake/scripts/common/addon-helpers.cmake | ||
| 2 | project/cmake/scripts/common/addoptions.cmake | ||
| 3 | project/cmake/scripts/common/archsetup.cmake | ||
| 4 | project/cmake/scripts/common/checkcommits.cmake | ||
| 5 | project/cmake/scripts/common/check_target_platform.cmake | ||
| 6 | project/cmake/scripts/common/generateversionedfiles.cmake | ||
| 7 | project/cmake/scripts/common/generatorsetup.cmake | ||
| 8 | project/cmake/scripts/common/handle-depends.cmake | ||
| 9 | project/cmake/scripts/common/macros.cmake | ||
| 10 | project/cmake/scripts/common/managestring.cmake | ||
| 11 | project/cmake/scripts/common/pathsetup.cmake | ||
| 12 | project/cmake/scripts/common/prepare-env.cmake | ||
| 13 | project/cmake/scripts/common/projectmacros.cmake | ||
diff --git a/project/cmake/installdata/common/addons.txt b/project/cmake/installdata/common/addons.txt index 7d406ad..3f86c78 100644 --- a/project/cmake/installdata/common/addons.txt +++ b/project/cmake/installdata/common/addons.txt | |||
| @@ -1,7 +1,14 @@ | |||
| 1 | addons/audioencoder.xbmc.builtin.aac/* | ||
| 2 | addons/audioencoder.xbmc.builtin.wma/* | ||
| 3 | addons/game.controller.default/* | ||
| 1 | addons/kodi.adsp/* | 4 | addons/kodi.adsp/* |
| 2 | addons/kodi.audiodecoder/* | 5 | addons/kodi.audiodecoder/* |
| 6 | addons/kodi.game/* | ||
| 7 | addons/kodi.inputstream/* | ||
| 8 | addons/kodi.peripheral/* | ||
| 3 | addons/kodi.resource/* | 9 | addons/kodi.resource/* |
| 4 | addons/kodi.vfs/* | 10 | addons/xbmc.addon/metadata.xsd |
| 11 | addons/xbmc.addon/repository.xsd | ||
| 5 | addons/xbmc.audioencoder/* | 12 | addons/xbmc.audioencoder/* |
| 6 | addons/xbmc.codec/* | 13 | addons/xbmc.codec/* |
| 7 | addons/xbmc.core/* | 14 | addons/xbmc.core/* |
| @@ -10,9 +17,13 @@ addons/xbmc.metadata/* | |||
| 10 | addons/xbmc.pvr/* | 17 | addons/xbmc.pvr/* |
| 11 | addons/xbmc.python/* | 18 | addons/xbmc.python/* |
| 12 | addons/xbmc.webinterface/* | 19 | addons/xbmc.webinterface/* |
| 20 | addons/library.kodi.adsp/* | ||
| 21 | addons/library.kodi.audioengine/* | ||
| 22 | addons/library.kodi.guilib/* | ||
| 23 | addons/library.kodi.inputstream/* | ||
| 24 | addons/library.kodi.peripheral/* | ||
| 13 | addons/library.xbmc.addon/* | 25 | addons/library.xbmc.addon/* |
| 14 | addons/library.xbmc.codec/* | 26 | addons/library.xbmc.codec/* |
| 15 | addons/library.xbmc.gui/* | ||
| 16 | addons/library.xbmc.pvr/* | 27 | addons/library.xbmc.pvr/* |
| 17 | addons/repository.xbmc.org/* | 28 | addons/repository.xbmc.org/* |
| 18 | addons/webinterface.default/* | 29 | addons/webinterface.default/* |
| @@ -26,6 +37,9 @@ addons/audioencoder.xbmc.builtin.wma/* | |||
| 26 | addons/resource.language.en_gb/* | 37 | addons/resource.language.en_gb/* |
| 27 | addons/resource.uisounds.confluence/* | 38 | addons/resource.uisounds.confluence/* |
| 28 | addons/resource.images.weathericons.default/* | 39 | addons/resource.images.weathericons.default/* |
| 40 | addons/service.xbmc.versioncheck/* | ||
| 41 | addons/skin.estuary/* | ||
| 42 | addons/skin.estouchy/* | ||
| 29 | addons/metadata.local/* | 43 | addons/metadata.local/* |
| 30 | addons/metadata.album.universal/* | 44 | addons/metadata.album.universal/* |
| 31 | addons/metadata.artists.universal/* | 45 | addons/metadata.artists.universal/* |
diff --git a/project/cmake/modules/FindCpluff.cmake b/project/cmake/modules/FindCpluff.cmake index b8fa22d..c6693fa 100644 --- a/project/cmake/modules/FindCpluff.cmake +++ b/project/cmake/modules/FindCpluff.cmake | |||
| @@ -11,6 +11,7 @@ if(NOT WIN32) | |||
| 11 | get_filename_component(expat_dir ${EXPAT_LIBRARY} PATH) | 11 | get_filename_component(expat_dir ${EXPAT_LIBRARY} PATH) |
| 12 | set(ldflags "-L${expat_dir}") | 12 | set(ldflags "-L${expat_dir}") |
| 13 | ExternalProject_Add(libcpluff SOURCE_DIR ${CORE_SOURCE_DIR}/lib/cpluff | 13 | ExternalProject_Add(libcpluff SOURCE_DIR ${CORE_SOURCE_DIR}/lib/cpluff |
| 14 | BUILD_IN_SOURCE 1 | ||
| 14 | PREFIX ${CORE_BUILD_DIR}/cpluff | 15 | PREFIX ${CORE_BUILD_DIR}/cpluff |
| 15 | PATCH_COMMAND rm -f config.status | 16 | PATCH_COMMAND rm -f config.status |
| 16 | UPDATE_COMMAND PATH=${NATIVEPREFIX}/bin:$ENV{PATH} autoreconf -vif | 17 | UPDATE_COMMAND PATH=${NATIVEPREFIX}/bin:$ENV{PATH} autoreconf -vif |
| @@ -34,11 +35,9 @@ else() | |||
| 34 | CONFIGURE_COMMAND "" | 35 | CONFIGURE_COMMAND "" |
| 35 | # TODO: Building the project directly from lib/cpluff/libcpluff/win32/cpluff.vcxproj | 36 | # TODO: Building the project directly from lib/cpluff/libcpluff/win32/cpluff.vcxproj |
| 36 | # fails becaue it imports XBMC.defaults.props | 37 | # fails becaue it imports XBMC.defaults.props |
| 37 | BUILD_COMMAND devenv /build ${CORE_BUILD_CONFIG} | 38 | BUILD_COMMAND msbuild ${CORE_SOURCE_DIR}/project/VS2010Express/XBMC\ for\ Windows.sln |
| 38 | ${CORE_SOURCE_DIR}/project/VS2010Express/XBMC\ for\ Windows.sln | 39 | /t:cpluff /p:Configuration=${CORE_BUILD_CONFIG} |
| 39 | /project cpluff | ||
| 40 | INSTALL_COMMAND "") | 40 | INSTALL_COMMAND "") |
| 41 | # TODO: core_link_library | ||
| 42 | endif() | 41 | endif() |
| 43 | 42 | ||
| 44 | set(CPLUFF_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/cpluff/include) | 43 | set(CPLUFF_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/cpluff/include) |
diff --git a/project/cmake/modules/FindCrossGUID.cmake b/project/cmake/modules/FindCrossGUID.cmake index 0d4a915..df40c9e 100644 --- a/project/cmake/modules/FindCrossGUID.cmake +++ b/project/cmake/modules/FindCrossGUID.cmake | |||
| @@ -30,10 +30,8 @@ if(ENABLE_INTERNAL_CROSSGUID) | |||
| 30 | else() | 30 | else() |
| 31 | find_path(CROSSGUID_INCLUDE_DIR guid.h) | 31 | find_path(CROSSGUID_INCLUDE_DIR guid.h) |
| 32 | 32 | ||
| 33 | find_library(CROSSGUID_LIBRARY_RELEASE NAMES crossguid | 33 | find_library(CROSSGUID_LIBRARY_RELEASE NAMES crossguid) |
| 34 | ${CONFIGURATION_LIBDIR_RELEASE}) | 34 | find_library(CROSSGUID_LIBRARY_DEBUG NAMES crossguidd) |
| 35 | find_library(CROSSGUID_LIBRARY_DEBUG NAMES crossguidd | ||
| 36 | ${CONFIGURATION_LIBDIR_DEBUG}) | ||
| 37 | 35 | ||
| 38 | include(SelectLibraryConfigurations) | 36 | include(SelectLibraryConfigurations) |
| 39 | select_library_configurations(CROSSGUID) | 37 | select_library_configurations(CROSSGUID) |
diff --git a/project/cmake/modules/FindD3DX11Effects.cmake b/project/cmake/modules/FindD3DX11Effects.cmake index 2b2de85..9de8c2b 100644 --- a/project/cmake/modules/FindD3DX11Effects.cmake +++ b/project/cmake/modules/FindD3DX11Effects.cmake | |||
| @@ -10,8 +10,8 @@ ExternalProject_Add(d3dx11effects | |||
| 10 | SOURCE_DIR ${CORE_SOURCE_DIR}/lib/win32/Effects11 | 10 | SOURCE_DIR ${CORE_SOURCE_DIR}/lib/win32/Effects11 |
| 11 | PREFIX ${CORE_BUILD_DIR}/Effects11 | 11 | PREFIX ${CORE_BUILD_DIR}/Effects11 |
| 12 | CONFIGURE_COMMAND "" | 12 | CONFIGURE_COMMAND "" |
| 13 | BUILD_COMMAND devenv /build ${CORE_BUILD_CONFIG} | 13 | BUILD_COMMAND msbuild ${CORE_SOURCE_DIR}/lib/win32/Effects11/Effects11_2013.sln |
| 14 | ${CORE_SOURCE_DIR}/lib/win32/Effects11/Effects11_2013.sln | 14 | /t:Effects11 /p:Configuration=${CORE_BUILD_CONFIG} |
| 15 | INSTALL_COMMAND "") | 15 | INSTALL_COMMAND "") |
| 16 | 16 | ||
| 17 | set(D3DX11EFFECTS_FOUND 1) | 17 | set(D3DX11EFFECTS_FOUND 1) |
diff --git a/project/cmake/modules/FindFFMPEG.cmake b/project/cmake/modules/FindFFMPEG.cmake index 711845a..7f8e37f 100644 --- a/project/cmake/modules/FindFFMPEG.cmake +++ b/project/cmake/modules/FindFFMPEG.cmake | |||
| @@ -31,7 +31,7 @@ if(ENABLE_INTERNAL_FFMPEG) | |||
| 31 | URL ${FFMPEG_BASE_URL}/${FFMPEG_VER}.tar.gz | 31 | URL ${FFMPEG_BASE_URL}/${FFMPEG_VER}.tar.gz |
| 32 | PREFIX ${CORE_BUILD_DIR}/ffmpeg | 32 | PREFIX ${CORE_BUILD_DIR}/ffmpeg |
| 33 | CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR} | 33 | CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR} |
| 34 | -DCMAKE_BUILD_TYPE=${DCMAKE_BUILD_TYPE} | 34 | -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} |
| 35 | -DFFMPEG_VER=${FFMPEG_VER} | 35 | -DFFMPEG_VER=${FFMPEG_VER} |
| 36 | -DCORE_SYSTEM_NAME=${CORE_SYSTEM_NAME} | 36 | -DCORE_SYSTEM_NAME=${CORE_SYSTEM_NAME} |
| 37 | ${CROSS_ARGS} | 37 | ${CROSS_ARGS} |
| @@ -54,8 +54,7 @@ then | |||
| 54 | swresample=`PKG_CONFIG_PATH=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/lib/pkgconfig ${PKG_CONFIG_EXECUTABLE} --libs --static libswresample` | 54 | swresample=`PKG_CONFIG_PATH=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/lib/pkgconfig ${PKG_CONFIG_EXECUTABLE} --libs --static libswresample` |
| 55 | gnutls=`PKG_CONFIG_PATH=${DEPENDS_PATH}/lib/pkgconfig/ ${PKG_CONFIG_EXECUTABLE} --libs-only-l --static --silence-errors gnutls` | 55 | gnutls=`PKG_CONFIG_PATH=${DEPENDS_PATH}/lib/pkgconfig/ ${PKG_CONFIG_EXECUTABLE} --libs-only-l --static --silence-errors gnutls` |
| 56 | vorbisenc=`PKG_CONFIG_PATH=${DEPENDS_PATH}/lib/pkgconfig/ ${PKG_CONFIG_EXECUTABLE} --libs-only-l --static --silence-errors vorbisenc` | 56 | vorbisenc=`PKG_CONFIG_PATH=${DEPENDS_PATH}/lib/pkgconfig/ ${PKG_CONFIG_EXECUTABLE} --libs-only-l --static --silence-errors vorbisenc` |
| 57 | dcadec=`PKG_CONFIG_PATH=${DEPENDS_PATH}/lib/pkgconfig/ ${PKG_CONFIG_EXECUTABLE} --libs-only-l --static --silence-errors dcadec` | 57 | $@ $avcodec $avformat $avcodec $avfilter $swscale $swresample -lpostproc $gnutls $vorbisenc |
| 58 | $@ $avcodec $avformat $avcodec $avfilter $swscale $swresample -lpostproc $gnutls $vorbisenc $dcadec | ||
| 59 | else | 58 | else |
| 60 | $@ | 59 | $@ |
| 61 | fi") | 60 | fi") |
diff --git a/project/cmake/modules/FindMySqlClient.cmake b/project/cmake/modules/FindMySqlClient.cmake index 12fee5c..2295c81 100644 --- a/project/cmake/modules/FindMySqlClient.cmake +++ b/project/cmake/modules/FindMySqlClient.cmake | |||
| @@ -15,10 +15,10 @@ | |||
| 15 | # MySqlClient::MySqlClient - The MySqlClient library | 15 | # MySqlClient::MySqlClient - The MySqlClient library |
| 16 | 16 | ||
| 17 | find_path(MYSQLCLIENT_INCLUDE_DIR mysql/mysql_time.h) | 17 | find_path(MYSQLCLIENT_INCLUDE_DIR mysql/mysql_time.h) |
| 18 | find_library(MYSQLCLIENT_LIBRARY_RELEASE NAMES mysqlclient mysqlclient_r | 18 | find_library(MYSQLCLIENT_LIBRARY_RELEASE NAMES mysqlclient libmysql |
| 19 | PATH_SUFFIXES ${CONFIGURATION_LIBDIR_RELEASE} mysql) | 19 | PATH_SUFFIXES mysql) |
| 20 | find_library(MYSQLCLIENT_LIBRARY_DEBUG NAMES mysqlclient | 20 | find_library(MYSQLCLIENT_LIBRARY_DEBUG NAMES mysqlclient libmysql |
| 21 | PATH_SUFFIXES ${CONFIGURATION_LIBDIR_DEBUG} mysql) | 21 | PATH_SUFFIXES mysql) |
| 22 | 22 | ||
| 23 | include(SelectLibraryConfigurations) | 23 | include(SelectLibraryConfigurations) |
| 24 | select_library_configurations(MYSQLCLIENT) | 24 | select_library_configurations(MYSQLCLIENT) |
diff --git a/project/cmake/modules/FindPCRE.cmake b/project/cmake/modules/FindPCRE.cmake index 54c4ab4..8babed3 100644 --- a/project/cmake/modules/FindPCRE.cmake +++ b/project/cmake/modules/FindPCRE.cmake | |||
| @@ -22,16 +22,12 @@ endif() | |||
| 22 | find_path(PCRE_INCLUDE_DIR pcrecpp.h | 22 | find_path(PCRE_INCLUDE_DIR pcrecpp.h |
| 23 | PATHS ${PC_PCRE_INCLUDEDIR}) | 23 | PATHS ${PC_PCRE_INCLUDEDIR}) |
| 24 | find_library(PCRECPP_LIBRARY_RELEASE NAMES pcrecpp | 24 | find_library(PCRECPP_LIBRARY_RELEASE NAMES pcrecpp |
| 25 | PATH_SUFFIXES ${CONFIGURATION_LIBDIR_RELEASE} | ||
| 26 | PATHS ${PC_PCRE_LIBDIR}) | 25 | PATHS ${PC_PCRE_LIBDIR}) |
| 27 | find_library(PCRE_LIBRARY_RELEASE NAMES pcre | 26 | find_library(PCRE_LIBRARY_RELEASE NAMES pcre |
| 28 | PATH_SUFFIXES ${CONFIGURATION_LIBDIR_RELEASE} | ||
| 29 | PATHS ${PC_PCRE_LIBDIR}) | 27 | PATHS ${PC_PCRE_LIBDIR}) |
| 30 | find_library(PCRECPP_LIBRARY_DEBUG NAMES pcrecppd | 28 | find_library(PCRECPP_LIBRARY_DEBUG NAMES pcrecppd |
| 31 | PATH_SUFFIXES ${CONFIGURATION_LIBDIR_DEBUG} | ||
| 32 | PATHS ${PC_PCRE_LIBDIR}) | 29 | PATHS ${PC_PCRE_LIBDIR}) |
| 33 | find_library(PCRE_LIBRARY_DEBUG NAMES pcred | 30 | find_library(PCRE_LIBRARY_DEBUG NAMES pcred |
| 34 | PATH_SUFFIXES ${CONFIGURATION_LIBDIR_DEBUG} | ||
| 35 | PATHS ${PC_PCRE_LIBDIR}) | 31 | PATHS ${PC_PCRE_LIBDIR}) |
| 36 | set(PCRE_VERSION ${PC_PCRE_VERSION}) | 32 | set(PCRE_VERSION ${PC_PCRE_VERSION}) |
| 37 | 33 | ||
diff --git a/project/cmake/modules/FindTagLib.cmake b/project/cmake/modules/FindTagLib.cmake index b515e81..06b615d 100644 --- a/project/cmake/modules/FindTagLib.cmake +++ b/project/cmake/modules/FindTagLib.cmake | |||
| @@ -20,10 +20,8 @@ endif() | |||
| 20 | find_path(TAGLIB_INCLUDE_DIR taglib/tag.h | 20 | find_path(TAGLIB_INCLUDE_DIR taglib/tag.h |
| 21 | PATHS ${PC_TAGLIB_INCLUDEDIR}) | 21 | PATHS ${PC_TAGLIB_INCLUDEDIR}) |
| 22 | find_library(TAGLIB_LIBRARY_RELEASE NAMES tag | 22 | find_library(TAGLIB_LIBRARY_RELEASE NAMES tag |
| 23 | PATH_SUFFIXES ${CONFIGURATION_LIBDIR_RELEASE} | ||
| 24 | PATHS ${PC_TAGLIB_LIBDIR}) | 23 | PATHS ${PC_TAGLIB_LIBDIR}) |
| 25 | find_library(TAGLIB_LIBRARY_DEBUG NAMES tag | 24 | find_library(TAGLIB_LIBRARY_DEBUG NAMES tagd |
| 26 | PATH_SUFFIXES ${CONFIGURATION_LIBDIR_DEBUG} | ||
| 27 | PATHS ${PC_TAGLIB_LIBDIR}) | 25 | PATHS ${PC_TAGLIB_LIBDIR}) |
| 28 | set(TAGLIB_VERSION ${PC_TAGLIB_VERSION}) | 26 | set(TAGLIB_VERSION ${PC_TAGLIB_VERSION}) |
| 29 | 27 | ||
diff --git a/project/cmake/modules/FindTinyXML.cmake b/project/cmake/modules/FindTinyXML.cmake index 0168f40..54ec946 100644 --- a/project/cmake/modules/FindTinyXML.cmake +++ b/project/cmake/modules/FindTinyXML.cmake | |||
| @@ -22,10 +22,10 @@ find_path(TINYXML_INCLUDE_DIR tinyxml.h | |||
| 22 | PATH_SUFFIXES tinyxml | 22 | PATH_SUFFIXES tinyxml |
| 23 | PATHS ${PC_TINYXML_INCLUDEDIR}) | 23 | PATHS ${PC_TINYXML_INCLUDEDIR}) |
| 24 | find_library(TINYXML_LIBRARY_RELEASE NAMES tinyxml tinyxmlSTL | 24 | find_library(TINYXML_LIBRARY_RELEASE NAMES tinyxml tinyxmlSTL |
| 25 | PATH_SUFFIXES tinyxml ${CONFIGURATION_LIBDIR_RELEASE} | 25 | PATH_SUFFIXES tinyxml |
| 26 | PATHS ${PC_TINYXML_LIBDIR}) | 26 | PATHS ${PC_TINYXML_LIBDIR}) |
| 27 | find_library(TINYXML_LIBRARY_DEBUG NAMES tinyxml tinyxmlSTL | 27 | find_library(TINYXML_LIBRARY_DEBUG NAMES tinyxmld tinyxmlSTLd |
| 28 | PATH_SUFFIXES tinyxml ${CONFIGURATION_LIBDIR_DEBUG} | 28 | PATH_SUFFIXES tinyxml |
| 29 | PATHS ${PC_TINYXML_LIBDIR}) | 29 | PATHS ${PC_TINYXML_LIBDIR}) |
| 30 | set(TINYXML_VERSION ${PC_TINYXML_VERSION}) | 30 | set(TINYXML_VERSION ${PC_TINYXML_VERSION}) |
| 31 | 31 | ||
diff --git a/project/cmake/scripts/common/generateversionedfiles.cmake b/project/cmake/scripts/common/generateversionedfiles.cmake index 9a4080a..ea1fad5 100644 --- a/project/cmake/scripts/common/generateversionedfiles.cmake +++ b/project/cmake/scripts/common/generateversionedfiles.cmake | |||
| @@ -9,5 +9,3 @@ configure_file(${CORE_SOURCE_DIR}/addons/kodi.guilib/addon.xml.in | |||
| 9 | ${CMAKE_BINARY_DIR}/addons/kodi.guilib/addon.xml @ONLY) | 9 | ${CMAKE_BINARY_DIR}/addons/kodi.guilib/addon.xml @ONLY) |
| 10 | configure_file(${CORE_SOURCE_DIR}/xbmc/CompileInfo.cpp.in | 10 | configure_file(${CORE_SOURCE_DIR}/xbmc/CompileInfo.cpp.in |
| 11 | ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/xbmc/CompileInfo.cpp @ONLY) | 11 | ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/xbmc/CompileInfo.cpp @ONLY) |
| 12 | set(prefix ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}) | ||
| 13 | set(APP_LIBDIR ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/lib/kodi) | ||
diff --git a/project/cmake/scripts/common/macros.cmake b/project/cmake/scripts/common/macros.cmake index dd2233b..0900740 100644 --- a/project/cmake/scripts/common/macros.cmake +++ b/project/cmake/scripts/common/macros.cmake | |||
| @@ -16,6 +16,12 @@ include(${CORE_SOURCE_DIR}/project/cmake/scripts/${CORE_SYSTEM_NAME}/macros.cmak | |||
| 16 | # Library will be built, optionally added to ${core_DEPENDS} | 16 | # Library will be built, optionally added to ${core_DEPENDS} |
| 17 | function(core_add_library name) | 17 | function(core_add_library name) |
| 18 | cmake_parse_arguments(arg "NO_MAIN_DEPENDS" "" "" ${ARGN}) | 18 | cmake_parse_arguments(arg "NO_MAIN_DEPENDS" "" "" ${ARGN}) |
| 19 | |||
| 20 | if(NOT SOURCES) | ||
| 21 | message(STATUS "No sources added to ${name} skipping") | ||
| 22 | return() | ||
| 23 | endif() | ||
| 24 | |||
| 19 | add_library(${name} STATIC ${SOURCES} ${HEADERS} ${OTHERS}) | 25 | add_library(${name} STATIC ${SOURCES} ${HEADERS} ${OTHERS}) |
| 20 | set_target_properties(${name} PROPERTIES PREFIX "") | 26 | set_target_properties(${name} PROPERTIES PREFIX "") |
| 21 | if(NOT arg_NO_MAIN_DEPENDS) | 27 | if(NOT arg_NO_MAIN_DEPENDS) |
| @@ -53,48 +59,52 @@ endfunction() | |||
| 53 | # Arguments: | 59 | # Arguments: |
| 54 | # file full path to file to mirror | 60 | # file full path to file to mirror |
| 55 | # relative the relative base of file path in the build/install tree | 61 | # relative the relative base of file path in the build/install tree |
| 56 | # give another parameter to exclude from install target | 62 | # Optional Arguments: |
| 63 | # NO_INSTALL: exclude file from installation target | ||
| 57 | # Implicit arguments: | 64 | # Implicit arguments: |
| 58 | # CORE_SOURCE_DIR - root of source tree | 65 | # CORE_SOURCE_DIR - root of source tree |
| 59 | # On return: | 66 | # On return: |
| 60 | # file is added to ${install_data} and mirrored in build tree | 67 | # Files is mirrored to the build tree and added to ${install_data} |
| 68 | # (if NO_INSTALL is not given). | ||
| 61 | function(copy_file_to_buildtree file relative) | 69 | function(copy_file_to_buildtree file relative) |
| 62 | if(NOT WIN32) | 70 | cmake_parse_arguments(arg "NO_INSTALL" "" "" ${ARGN}) |
| 63 | string(REPLACE "\(" "\\(" file ${file}) | ||
| 64 | string(REPLACE "\)" "\\)" file ${file}) | ||
| 65 | endif() | ||
| 66 | string(REPLACE "${relative}/" "" outfile ${file}) | 71 | string(REPLACE "${relative}/" "" outfile ${file}) |
| 72 | get_filename_component(outdir ${outfile} DIRECTORY) | ||
| 67 | 73 | ||
| 68 | if(NOT TARGET export-files) | 74 | if(NOT TARGET export-files) |
| 69 | add_custom_target(export-files ALL COMMENT "Copying files into build tree") | 75 | file(REMOVE ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/ExportFiles.cmake) |
| 76 | add_custom_target(export-files ALL COMMENT "Copying files into build tree" | ||
| 77 | COMMAND ${CMAKE_COMMAND} -P ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/ExportFiles.cmake) | ||
| 70 | endif() | 78 | endif() |
| 71 | if(NOT ${CORE_SOURCE_DIR} MATCHES ${CMAKE_BINARY_DIR}) | 79 | if(NOT ${CORE_SOURCE_DIR} MATCHES ${CMAKE_BINARY_DIR}) |
| 72 | if(VERBOSE) | 80 | if(VERBOSE) |
| 73 | message(STATUS "copy_file_to_buildtree - copying file: ${file} -> ${CMAKE_CURRENT_BINARY_DIR}/${outfile}") | 81 | message(STATUS "copy_file_to_buildtree - copying file: ${file} -> ${CMAKE_BINARY_DIR}/${outfile}") |
| 74 | endif() | 82 | endif() |
| 75 | add_custom_command(TARGET export-files COMMAND ${CMAKE_COMMAND} -E copy_if_different "${file}" "${CMAKE_CURRENT_BINARY_DIR}/${outfile}") | 83 | file(APPEND ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/ExportFiles.cmake |
| 84 | "file(COPY \"${file}\" DESTINATION \"${CMAKE_BINARY_DIR}/${outdir}\")\n") | ||
| 76 | endif() | 85 | endif() |
| 77 | if(NOT ARGN) | 86 | if(NOT arg_NO_INSTALL) |
| 78 | list(APPEND install_data ${outfile}) | 87 | list(APPEND install_data ${outfile}) |
| 79 | set(install_data ${install_data} PARENT_SCOPE) | 88 | set(install_data ${install_data} PARENT_SCOPE) |
| 80 | endif() | 89 | endif() |
| 81 | endfunction() | 90 | endfunction() |
| 82 | 91 | ||
| 83 | # add data files to installation list with a mirror in build tree. | 92 | # Add data files to installation list with a mirror in build tree. |
| 84 | # reads list of files to install from a given list of text files. | 93 | # reads list of files to install from a given list of text files. |
| 85 | # Arguments: | 94 | # Arguments: |
| 86 | # pattern globbing pattern for text files to read | 95 | # pattern globbing pattern for text files to read |
| 87 | # give another parameter to exclude from installation target | 96 | # Optional Arguments: |
| 97 | # NO_INSTALL: exclude files from installation target | ||
| 88 | # Implicit arguments: | 98 | # Implicit arguments: |
| 89 | # CORE_SOURCE_DIR - root of source tree | 99 | # CORE_SOURCE_DIR - root of source tree |
| 90 | # On return: | 100 | # On return: |
| 91 | # files are added to ${install_data} and mirrored in build tree | 101 | # Files are mirrored to the build tree and added to ${install_data} |
| 102 | # (if NO_INSTALL is not given). | ||
| 92 | function(copy_files_from_filelist_to_buildtree pattern) | 103 | function(copy_files_from_filelist_to_buildtree pattern) |
| 93 | foreach(arg ${ARGN}) | ||
| 94 | list(APPEND pattern ${arg}) | ||
| 95 | endforeach() | ||
| 96 | # copies files listed in text files to the buildtree | 104 | # copies files listed in text files to the buildtree |
| 97 | # Input: [glob pattern: filepattern] | 105 | # Input: [glob pattern: filepattern] |
| 106 | cmake_parse_arguments(arg "NO_INSTALL" "" "" ${ARGN}) | ||
| 107 | list(APPEND pattern ${ARGN}) | ||
| 98 | list(SORT pattern) | 108 | list(SORT pattern) |
| 99 | if(VERBOSE) | 109 | if(VERBOSE) |
| 100 | message(STATUS "copy_files_from_filelist_to_buildtree - got pattern: ${pattern}") | 110 | message(STATUS "copy_files_from_filelist_to_buildtree - got pattern: ${pattern}") |
| @@ -107,8 +117,8 @@ function(copy_files_from_filelist_to_buildtree pattern) | |||
| 107 | foreach(dir ${fstrings}) | 117 | foreach(dir ${fstrings}) |
| 108 | file(GLOB_RECURSE files RELATIVE ${CORE_SOURCE_DIR} ${CORE_SOURCE_DIR}/${dir}) | 118 | file(GLOB_RECURSE files RELATIVE ${CORE_SOURCE_DIR} ${CORE_SOURCE_DIR}/${dir}) |
| 109 | foreach(file ${files}) | 119 | foreach(file ${files}) |
| 110 | if(ARGN) | 120 | if(arg_NO_INSTALL) |
| 111 | copy_file_to_buildtree(${CORE_SOURCE_DIR}/${file} ${CORE_SOURCE_DIR} 1) | 121 | copy_file_to_buildtree(${CORE_SOURCE_DIR}/${file} ${CORE_SOURCE_DIR} NO_INSTALL) |
| 112 | else() | 122 | else() |
| 113 | copy_file_to_buildtree(${CORE_SOURCE_DIR}/${file} ${CORE_SOURCE_DIR}) | 123 | copy_file_to_buildtree(${CORE_SOURCE_DIR}/${file} ${CORE_SOURCE_DIR}) |
| 114 | endif() | 124 | endif() |
| @@ -315,37 +325,37 @@ macro(today RESULT) | |||
| 315 | endmacro() | 325 | endmacro() |
| 316 | 326 | ||
| 317 | function(core_find_git_rev) | 327 | function(core_find_git_rev) |
| 318 | if(EXISTS ${CORE_SOURCE_DIR}/VERSION) | 328 | find_package(Git) |
| 319 | file(STRINGS ${CORE_SOURCE_DIR}/VERSION VERSION_FILE) | 329 | if(GIT_FOUND AND EXISTS ${CORE_SOURCE_DIR}/.git) |
| 320 | string(SUBSTRING "${VERSION_FILE}" 1 16 GIT_REV) | 330 | execute_process(COMMAND ${GIT_EXECUTABLE} diff-files --ignore-submodules --quiet -- |
| 321 | else() | 331 | RESULT_VARIABLE status_code |
| 322 | find_package(Git) | 332 | WORKING_DIRECTORY ${CORE_SOURCE_DIR}) |
| 323 | if(GIT_FOUND AND EXISTS ${CORE_SOURCE_DIR}/.git) | 333 | if (NOT status_code) |
| 324 | execute_process(COMMAND ${GIT_EXECUTABLE} diff-files --ignore-submodules --quiet -- | 334 | execute_process(COMMAND ${GIT_EXECUTABLE} diff-index --ignore-submodules --quiet HEAD -- |
| 325 | RESULT_VARIABLE status_code | 335 | RESULT_VARIABLE status_code |
| 326 | WORKING_DIRECTORY ${CORE_SOURCE_DIR}) | 336 | WORKING_DIRECTORY ${CORE_SOURCE_DIR}) |
| 327 | if (NOT status_code) | 337 | endif() |
| 328 | execute_process(COMMAND ${GIT_EXECUTABLE} diff-index --cached --ignore-submodules --quiet HEAD -- | 338 | if (status_code) |
| 329 | RESULT_VARIABLE status_code | 339 | execute_process(COMMAND ${GIT_EXECUTABLE} log -n 1 --pretty=format:"%h-dirty" HEAD |
| 340 | OUTPUT_VARIABLE HASH | ||
| 330 | WORKING_DIRECTORY ${CORE_SOURCE_DIR}) | 341 | WORKING_DIRECTORY ${CORE_SOURCE_DIR}) |
| 342 | string(SUBSTRING ${HASH} 1 13 HASH) | ||
| 343 | else() | ||
| 344 | execute_process(COMMAND ${GIT_EXECUTABLE} log -n 1 --pretty=format:"%h" HEAD | ||
| 345 | OUTPUT_VARIABLE HASH | ||
| 346 | WORKING_DIRECTORY ${CORE_SOURCE_DIR}) | ||
| 347 | string(SUBSTRING ${HASH} 1 7 HASH) | ||
| 331 | endif() | 348 | endif() |
| 332 | today(DATE) | 349 | execute_process(COMMAND ${GIT_EXECUTABLE} log -1 --pretty=format:"%cd" --date=short HEAD |
| 333 | execute_process(COMMAND ${GIT_EXECUTABLE} --no-pager log --abbrev=7 -n 1 | 350 | OUTPUT_VARIABLE DATE |
| 334 | --pretty=format:"%h-dirty" HEAD | 351 | WORKING_DIRECTORY ${CORE_SOURCE_DIR}) |
| 335 | OUTPUT_VARIABLE LOG_UNFORMATTED | 352 | string(SUBSTRING ${DATE} 1 10 DATE) |
| 336 | WORKING_DIRECTORY ${CORE_SOURCE_DIR}) | 353 | else() |
| 337 | string(SUBSTRING ${LOG_UNFORMATTED} 1 7 HASH) | 354 | today(DATE) |
| 338 | else() | 355 | set(HASH "nogitfound") |
| 339 | execute_process(COMMAND ${GIT_EXECUTABLE} --no-pager log --abbrev=7 -n 1 | ||
| 340 | --pretty=format:"%h %cd" HEAD | ||
| 341 | OUTPUT_VARIABLE LOG_UNFORMATTED | ||
| 342 | WORKING_DIRECTORY ${CORE_SOURCE_DIR}) | ||
| 343 | string(SUBSTRING ${LOG_UNFORMATTED} 1 7 HASH) | ||
| 344 | string(SUBSTRING ${LOG_UNFORMATTED} 9 10 DATE) | ||
| 345 | string(REPLACE "-" "" DATE ${DATE}) | ||
| 346 | endif() | ||
| 347 | set(GIT_REV "${DATE}-${HASH}") | ||
| 348 | endif() | 356 | endif() |
| 357 | string(REPLACE "-" "" DATE ${DATE}) | ||
| 358 | set(GIT_REV "${DATE}-${HASH}") | ||
| 349 | if(GIT_REV) | 359 | if(GIT_REV) |
| 350 | set(APP_SCMID ${GIT_REV} PARENT_SCOPE) | 360 | set(APP_SCMID ${GIT_REV} PARENT_SCOPE) |
| 351 | endif() | 361 | endif() |
diff --git a/project/cmake/scripts/common/prepare-env.cmake b/project/cmake/scripts/common/prepare-env.cmake index b9a39e7..8e9bd1c 100644 --- a/project/cmake/scripts/common/prepare-env.cmake +++ b/project/cmake/scripts/common/prepare-env.cmake | |||
| @@ -100,7 +100,7 @@ if(WIN32) | |||
| 100 | if(PATCH_FOUND) | 100 | if(PATCH_FOUND) |
| 101 | message(STATUS "patch utility found at ${PATCH_FOUND}") | 101 | message(STATUS "patch utility found at ${PATCH_FOUND}") |
| 102 | else() | 102 | else() |
| 103 | set(PATCH_ARCHIVE_NAME "patch-2.5.9-7-bin-1") | 103 | set(PATCH_ARCHIVE_NAME "patch-2.5.9-7-bin-3") |
| 104 | set(PATCH_ARCHIVE "${PATCH_ARCHIVE_NAME}.zip") | 104 | set(PATCH_ARCHIVE "${PATCH_ARCHIVE_NAME}.zip") |
| 105 | set(PATCH_URL "${KODI_MIRROR}/build-deps/win32/${PATCH_ARCHIVE}") | 105 | set(PATCH_URL "${KODI_MIRROR}/build-deps/win32/${PATCH_ARCHIVE}") |
| 106 | set(PATCH_DOWNLOAD ${BUILD_DIR}/download/${PATCH_ARCHIVE}) | 106 | set(PATCH_DOWNLOAD ${BUILD_DIR}/download/${PATCH_ARCHIVE}) |
diff --git a/project/cmake/scripts/common/projectmacros.cmake b/project/cmake/scripts/common/projectmacros.cmake index d0739c4..7ce4ee9 100644 --- a/project/cmake/scripts/common/projectmacros.cmake +++ b/project/cmake/scripts/common/projectmacros.cmake | |||
| @@ -35,10 +35,13 @@ function(copy_skin_to_buildtree skin relative) | |||
| 35 | endforeach() | 35 | endforeach() |
| 36 | file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/${dest}/media) | 36 | file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/${dest}/media) |
| 37 | string(REPLACE "${relative}/" "" dest ${skin}) | 37 | string(REPLACE "${relative}/" "" dest ${skin}) |
| 38 | pack_xbt(${skin}/media | 38 | pack_xbt(${skin}/media ${CMAKE_BINARY_DIR}/${dest}/media/Textures.xbt) |
| 39 | ${CMAKE_BINARY_DIR}/${dest}/media/Textures.xbt | 39 | |
| 40 | ${CMAKE_BINARY_DIR}) | 40 | file(GLOB THEMES RELATIVE ${skin}/themes ${skin}/themes/*) |
| 41 | 41 | foreach(theme ${THEMES}) | |
| 42 | pack_xbt(${skin}/themes/${theme} ${CMAKE_BINARY_DIR}/${dest}/media/${theme}.xbt) | ||
| 43 | endforeach() | ||
| 44 | |||
| 42 | set(XBT_FILES ${XBT_FILES} PARENT_SCOPE) | 45 | set(XBT_FILES ${XBT_FILES} PARENT_SCOPE) |
| 43 | set(install_data ${install_data} PARENT_SCOPE) | 46 | set(install_data ${install_data} PARENT_SCOPE) |
| 44 | endfunction() | 47 | endfunction() |
diff --git a/project/cmake/scripts/darwin/pathsetup.cmake b/project/cmake/scripts/darwin/pathsetup.cmake index e31f66e..071dfd4 100644 --- a/project/cmake/scripts/darwin/pathsetup.cmake +++ b/project/cmake/scripts/darwin/pathsetup.cmake | |||
| @@ -2,7 +2,7 @@ if(NOT prefix) | |||
| 2 | set(prefix ${DEPENDS_PATH}) | 2 | set(prefix ${DEPENDS_PATH}) |
| 3 | endif() | 3 | endif() |
| 4 | if(NOT exec_prefix) | 4 | if(NOT exec_prefix) |
| 5 | set(exec_prefix \${prefix}) | 5 | set(exec_prefix ${prefix}) |
| 6 | endif() | 6 | endif() |
| 7 | if(NOT libdir) | 7 | if(NOT libdir) |
| 8 | set(libdir ${prefix}/lib) | 8 | set(libdir ${prefix}/lib) |
| @@ -17,7 +17,7 @@ if(NOT datarootdir) | |||
| 17 | set(datarootdir ${prefix}/share) | 17 | set(datarootdir ${prefix}/share) |
| 18 | endif() | 18 | endif() |
| 19 | if(NOT datadir) | 19 | if(NOT datadir) |
| 20 | set(datadir \${datarootdir}) | 20 | set(datadir ${datarootdir}) |
| 21 | endif() | 21 | endif() |
| 22 | 22 | ||
| 23 | list(APPEND final_message "-- PATH config --") | 23 | list(APPEND final_message "-- PATH config --") |
| @@ -28,5 +28,5 @@ list(APPEND final_message "Includedir: ${includedir}") | |||
| 28 | list(APPEND final_message "Datarootdir: ${datarootdir}") | 28 | list(APPEND final_message "Datarootdir: ${datarootdir}") |
| 29 | list(APPEND final_message "Datadir: ${datadir}") | 29 | list(APPEND final_message "Datadir: ${datadir}") |
| 30 | 30 | ||
| 31 | set(PATH_DEFINES -DBIN_INSTALL_PATH=\"${libdir}/xbmc\" | 31 | set(PATH_DEFINES -DBIN_INSTALL_PATH=\"${libdir}/kodi\" |
| 32 | -DINSTALL_PATH=\"${datarootdir}/xbmc\") | 32 | -DINSTALL_PATH=\"${datarootdir}/kodi\") |
diff --git a/project/cmake/scripts/freebsd/archsetup.cmake b/project/cmake/scripts/freebsd/archsetup.cmake index edc77f1..b85121f 100644 --- a/project/cmake/scripts/freebsd/archsetup.cmake +++ b/project/cmake/scripts/freebsd/archsetup.cmake | |||
| @@ -15,5 +15,5 @@ else() | |||
| 15 | endif() | 15 | endif() |
| 16 | endif() | 16 | endif() |
| 17 | 17 | ||
| 18 | set(LIRC_DEVICE "\"/dev/lircd\"" CACHE STRING "LIRC device to use") | 18 | set(LIRC_DEVICE "\"/dev/lircd\"" CACHE STRING "LIRC device to use") |
| 19 | set(DEP_DEFINES -DLIRC_DEVICE=${LIRC_DEVICE}) | 19 | set(DEP_DEFINES -DLIRC_DEVICE=${LIRC_DEVICE}) |
diff --git a/project/cmake/scripts/freebsd/install.cmake b/project/cmake/scripts/freebsd/install.cmake index 0c8939e..8247416 100644 --- a/project/cmake/scripts/freebsd/install.cmake +++ b/project/cmake/scripts/freebsd/install.cmake | |||
| @@ -20,7 +20,9 @@ install(FILES ${CORE_SOURCE_DIR}/tools/Linux/xbmc-xsession.desktop | |||
| 20 | RENAME XBMC.desktop | 20 | RENAME XBMC.desktop |
| 21 | DESTINATION share/xsessions) | 21 | DESTINATION share/xsessions) |
| 22 | 22 | ||
| 23 | install(FILES ${CORE_SOURCE_DIR}/LICENSE.GPL | 23 | install(FILES ${CORE_SOURCE_DIR}/copying.txt |
| 24 | ${CORE_SOURCE_DIR}/LICENSE.GPL | ||
| 25 | ${CORE_SOURCE_DIR}/version.txt | ||
| 24 | ${CORE_SOURCE_DIR}/docs/README.freebsd | 26 | ${CORE_SOURCE_DIR}/docs/README.freebsd |
| 25 | DESTINATION share/doc/xbmc) | 27 | DESTINATION share/doc/xbmc) |
| 26 | 28 | ||
diff --git a/project/cmake/scripts/linux/archsetup.cmake b/project/cmake/scripts/linux/archsetup.cmake index d0e149e..e193768 100644 --- a/project/cmake/scripts/linux/archsetup.cmake +++ b/project/cmake/scripts/linux/archsetup.cmake | |||
| @@ -17,5 +17,5 @@ endif() | |||
| 17 | 17 | ||
| 18 | find_package(CXX11 REQUIRED) | 18 | find_package(CXX11 REQUIRED) |
| 19 | 19 | ||
| 20 | set(LIRC_DEVICE "\"/dev/lircd\"" CACHE STRING "LIRC device to use") | 20 | set(LIRC_DEVICE "\"/dev/lircd\"" CACHE STRING "LIRC device to use") |
| 21 | set(DEP_DEFINES -DLIRC_DEVICE=${LIRC_DEVICE}) | 21 | set(DEP_DEFINES -DLIRC_DEVICE=${LIRC_DEVICE}) |
diff --git a/project/cmake/scripts/linux/install.cmake b/project/cmake/scripts/linux/install.cmake index b887610..962a816 100644 --- a/project/cmake/scripts/linux/install.cmake +++ b/project/cmake/scripts/linux/install.cmake | |||
| @@ -14,28 +14,63 @@ else() | |||
| 14 | set(USE_OPENGLES 0) | 14 | set(USE_OPENGLES 0) |
| 15 | endif() | 15 | endif() |
| 16 | 16 | ||
| 17 | configure_file(${CORE_SOURCE_DIR}/project/cmake/${APP_NAME_LC}-config.cmake.in | ||
| 18 | ${CORE_BUILD_DIR}/${APP_NAME_LC}-config.cmake @ONLY) | ||
| 19 | |||
| 17 | configure_file(${CORE_SOURCE_DIR}/tools/Linux/kodi.sh.in | 20 | configure_file(${CORE_SOURCE_DIR}/tools/Linux/kodi.sh.in |
| 18 | ${CORE_BUILD_DIR}/scripts/${APP_NAME_LC} @ONLY) | 21 | ${CORE_BUILD_DIR}/scripts/${APP_NAME_LC} @ONLY) |
| 22 | |||
| 23 | # Set XBMC_STANDALONE_SH_PULSE so we can insert PulseAudio block into kodi-standalone | ||
| 24 | if(EXISTS ${CORE_SOURCE_DIR}/tools/Linux/kodi-standalone.sh.pulse) | ||
| 25 | if(ENABLE_PULSEAUDIO AND PULSEAUDIO_FOUND) | ||
| 26 | file(READ "${CORE_SOURCE_DIR}/tools/Linux/kodi-standalone.sh.pulse" pulse_content) | ||
| 27 | set(XBMC_STANDALONE_SH_PULSE ${pulse_content}) | ||
| 28 | endif() | ||
| 29 | endif() | ||
| 30 | |||
| 19 | configure_file(${CORE_SOURCE_DIR}/tools/Linux/kodi-standalone.sh.in | 31 | configure_file(${CORE_SOURCE_DIR}/tools/Linux/kodi-standalone.sh.in |
| 20 | ${CORE_BUILD_DIR}/scripts/${APP_NAME_LC}-standalone @ONLY) | 32 | ${CORE_BUILD_DIR}/scripts/${APP_NAME_LC}-standalone @ONLY) |
| 21 | 33 | ||
| 22 | install(TARGETS ${APP_NAME_LC} DESTINATION ${libdir}/kodi) | 34 | install(TARGETS ${APP_NAME_LC} DESTINATION ${libdir}/kodi) |
| 23 | if(ENABLE_X11 AND XRANDR_FOUND) | 35 | if(ENABLE_X11 AND XRANDR_FOUND) |
| 24 | install(TARGETS ${APP_NAME_LC}-xrandr DESTINATION ${libdir}/${APP_NAME_LC}) | 36 | install(TARGETS ${APP_NAME_LC}-xrandr DESTINATION ${libdir}/${APP_NAME_LC}) |
| 25 | endif() | 37 | endif() |
| 38 | |||
| 39 | if(NOT EXISTS ${libdir}/xbmc) | ||
| 40 | install(CODE "execute_process (COMMAND ln -sf ${APP_NAME_LC}/ xbmc WORKING_DIRECTORY ${libdir})") | ||
| 41 | endif() | ||
| 26 | install(FILES ${addon_bindings} DESTINATION ${includedir}/kodi) | 42 | install(FILES ${addon_bindings} DESTINATION ${includedir}/kodi) |
| 27 | install(FILES ${cmake-files} | 43 | if(NOT EXISTS ${includedir}/xbmc) |
| 44 | install(CODE "execute_process (COMMAND ln -sf ${APP_NAME_LC}/ xbmc WORKING_DIRECTORY ${includedir})") | ||
| 45 | endif() | ||
| 46 | |||
| 47 | install(FILES ${cmake_files} | ||
| 28 | DESTINATION ${libdir}/kodi) | 48 | DESTINATION ${libdir}/kodi) |
| 49 | install(FILES ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/${APP_NAME_LC}-config.cmake | ||
| 50 | DESTINATION ${libdir}/${APP_NAME_LC}) | ||
| 51 | install(FILES ${CORE_SOURCE_DIR}/project/cmake/xbmc-config.cmake.in | ||
| 52 | RENAME xbmc-config.cmake | ||
| 53 | DESTINATION ${libdir}/${APP_NAME_LC}) | ||
| 54 | |||
| 29 | install(PROGRAMS ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/scripts/${APP_NAME_LC} | 55 | install(PROGRAMS ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/scripts/${APP_NAME_LC} |
| 30 | ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/scripts/${APP_NAME_LC}-standalone | 56 | ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/scripts/${APP_NAME_LC}-standalone |
| 31 | DESTINATION ${bindir}) | 57 | DESTINATION ${bindir}) |
| 58 | install(CODE "execute_process (COMMAND ln -sf ${APP_NAME_LC} xbmc WORKING_DIRECTORY ${bindir})") | ||
| 59 | install(CODE "execute_process (COMMAND ln -sf ${APP_NAME_LC}-standalone xbmc-standalone WORKING_DIRECTORY ${bindir})") | ||
| 32 | 60 | ||
| 33 | configure_file(${CORE_SOURCE_DIR}/tools/Linux/kodi-xsession.desktop.in | 61 | configure_file(${CORE_SOURCE_DIR}/tools/Linux/kodi-xsession.desktop.in |
| 34 | ${CORE_BUILD_DIR}/${APP_NAME_LC}-xsession.desktop) | 62 | ${CORE_BUILD_DIR}/${APP_NAME_LC}.desktop) |
| 35 | install(FILES ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/${APP_NAME_LC}-xsession.desktop | 63 | install(FILES ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/${APP_NAME_LC}.desktop |
| 36 | DESTINATION ${datarootdir}/xsessions) | 64 | DESTINATION ${datarootdir}/xsessions) |
| 65 | install(CODE "execute_process (COMMAND ln -sf ${APP_NAME_LC}.desktop xbmc.desktop WORKING_DIRECTORY ${datarootdir}/xsessions/)") | ||
| 66 | |||
| 67 | if(NOT EXISTS ${datarootdir}/xbmc) | ||
| 68 | install(CODE "execute_process (COMMAND ln -sf ${APP_NAME_LC}/ xbmc WORKING_DIRECTORY ${datarootdir})") | ||
| 69 | endif() | ||
| 37 | 70 | ||
| 38 | install(FILES ${CORE_SOURCE_DIR}/LICENSE.GPL | 71 | install(FILES ${CORE_SOURCE_DIR}/copying.txt |
| 72 | ${CORE_SOURCE_DIR}/LICENSE.GPL | ||
| 73 | ${CORE_SOURCE_DIR}/version.txt | ||
| 39 | ${CORE_SOURCE_DIR}/docs/README.linux | 74 | ${CORE_SOURCE_DIR}/docs/README.linux |
| 40 | DESTINATION ${datarootdir}/doc/kodi) | 75 | DESTINATION ${datarootdir}/doc/kodi) |
| 41 | 76 | ||
| @@ -83,10 +118,28 @@ foreach(subdir ${build_dirs}) | |||
| 83 | endif() | 118 | endif() |
| 84 | endforeach() | 119 | endforeach() |
| 85 | 120 | ||
| 86 | install(FILES ${CORE_SOURCE_DIR}/media/icon48x48.png | 121 | install(FILES ${CORE_SOURCE_DIR}/tools/Linux/packaging/media/icon16x16.png |
| 122 | RENAME ${APP_NAME_LC}.png | ||
| 123 | DESTINATION ${datarootdir}/icons/hicolor/16x16/apps) | ||
| 124 | install(FILES ${CORE_SOURCE_DIR}/tools/Linux/packaging/media/icon22x22.png | ||
| 125 | RENAME ${APP_NAME_LC}.png | ||
| 126 | DESTINATION ${datarootdir}/icons/hicolor/22x22/apps) | ||
| 127 | install(FILES ${CORE_SOURCE_DIR}/tools/Linux/packaging/media/icon24x24.png | ||
| 128 | RENAME ${APP_NAME_LC}.png | ||
| 129 | DESTINATION ${datarootdir}/icons/hicolor/24x24/apps) | ||
| 130 | install(FILES ${CORE_SOURCE_DIR}/tools/Linux/packaging/media/icon32x32.png | ||
| 131 | RENAME ${APP_NAME_LC}.png | ||
| 132 | DESTINATION ${datarootdir}/icons/hicolor/32x32/apps) | ||
| 133 | install(FILES ${CORE_SOURCE_DIR}/tools/Linux/packaging/media/icon48x48.png | ||
| 87 | RENAME ${APP_NAME_LC}.png | 134 | RENAME ${APP_NAME_LC}.png |
| 88 | DESTINATION ${datarootdir}/icons/hicolor/48x48/apps) | 135 | DESTINATION ${datarootdir}/icons/hicolor/48x48/apps) |
| 89 | install(FILES ${CORE_SOURCE_DIR}/media/icon256x256.png | 136 | install(FILES ${CORE_SOURCE_DIR}/tools/Linux/packaging/media/icon64x64.png |
| 137 | RENAME ${APP_NAME_LC}.png | ||
| 138 | DESTINATION ${datarootdir}/icons/hicolor/64x64/apps) | ||
| 139 | install(FILES ${CORE_SOURCE_DIR}/tools/Linux/packaging/media/icon128x128.png | ||
| 140 | RENAME ${APP_NAME_LC}.png | ||
| 141 | DESTINATION ${datarootdir}/icons/hicolor/128x128/apps) | ||
| 142 | install(FILES ${CORE_SOURCE_DIR}/tools/Linux/packaging/media/icon256x256.png | ||
| 90 | RENAME ${APP_NAME_LC}.png | 143 | RENAME ${APP_NAME_LC}.png |
| 91 | DESTINATION ${datarootdir}/icons/hicolor/256x256/apps) | 144 | DESTINATION ${datarootdir}/icons/hicolor/256x256/apps) |
| 92 | 145 | ||
diff --git a/project/cmake/scripts/linux/pathsetup.cmake b/project/cmake/scripts/linux/pathsetup.cmake index 940fb62..8550616 100644 --- a/project/cmake/scripts/linux/pathsetup.cmake +++ b/project/cmake/scripts/linux/pathsetup.cmake | |||
| @@ -4,7 +4,7 @@ else() | |||
| 4 | set(CMAKE_INSTALL_PREFIX ${prefix}) | 4 | set(CMAKE_INSTALL_PREFIX ${prefix}) |
| 5 | endif() | 5 | endif() |
| 6 | if(NOT exec_prefix) | 6 | if(NOT exec_prefix) |
| 7 | set(exec_prefix \${prefix}) | 7 | set(exec_prefix ${prefix}) |
| 8 | endif() | 8 | endif() |
| 9 | if(NOT libdir) | 9 | if(NOT libdir) |
| 10 | set(libdir ${prefix}/lib) | 10 | set(libdir ${prefix}/lib) |
| @@ -19,7 +19,7 @@ if(NOT datarootdir) | |||
| 19 | set(datarootdir ${prefix}/share) | 19 | set(datarootdir ${prefix}/share) |
| 20 | endif() | 20 | endif() |
| 21 | if(NOT datadir) | 21 | if(NOT datadir) |
| 22 | set(datadir \${datarootdir}) | 22 | set(datadir ${datarootdir}) |
| 23 | endif() | 23 | endif() |
| 24 | 24 | ||
| 25 | list(APPEND final_message "-- PATH config --") | 25 | list(APPEND final_message "-- PATH config --") |
| @@ -30,5 +30,5 @@ list(APPEND final_message "Includedir: ${includedir}") | |||
| 30 | list(APPEND final_message "Datarootdir: ${datarootdir}") | 30 | list(APPEND final_message "Datarootdir: ${datarootdir}") |
| 31 | list(APPEND final_message "Datadir: ${datadir}") | 31 | list(APPEND final_message "Datadir: ${datadir}") |
| 32 | 32 | ||
| 33 | set(PATH_DEFINES -DBIN_INSTALL_PATH=\"${libdir}/xbmc\" | 33 | set(PATH_DEFINES -DBIN_INSTALL_PATH=\"${libdir}/kodi\" |
| 34 | -DINSTALL_PATH=\"${datarootdir}/xbmc\") | 34 | -DINSTALL_PATH=\"${datarootdir}/kodi\") |
diff --git a/project/cmake/scripts/rbpi/archsetup.cmake b/project/cmake/scripts/rbpi/archsetup.cmake index 84f1dad..72a610f 100644 --- a/project/cmake/scripts/rbpi/archsetup.cmake +++ b/project/cmake/scripts/rbpi/archsetup.cmake | |||
| @@ -25,7 +25,7 @@ endif() | |||
| 25 | 25 | ||
| 26 | find_package(CXX11 REQUIRED) | 26 | find_package(CXX11 REQUIRED) |
| 27 | 27 | ||
| 28 | set(LIRC_DEVICE "\"/dev/lircd\"" CACHE STRING "LIRC device to use") | 28 | set(LIRC_DEVICE "\"/dev/lircd\"" CACHE STRING "LIRC device to use") |
| 29 | set(DEP_DEFINES -DLIRC_DEVICE=${LIRC_DEVICE}) | 29 | set(DEP_DEFINES -DLIRC_DEVICE=${LIRC_DEVICE}) |
| 30 | set(MMAL_FOUND 1 CACHE INTERNAL "MMAL") | 30 | set(MMAL_FOUND 1 CACHE INTERNAL "MMAL") |
| 31 | set(OMX_FOUND 1 CACHE INTERNAL "OMX") | 31 | set(OMX_FOUND 1 CACHE INTERNAL "OMX") |
diff --git a/project/cmake/scripts/windows/archsetup.cmake b/project/cmake/scripts/windows/archsetup.cmake index baa3624..a54ab65 100644 --- a/project/cmake/scripts/windows/archsetup.cmake +++ b/project/cmake/scripts/windows/archsetup.cmake | |||
| @@ -15,9 +15,6 @@ list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${PROJECT_SOURCE_DIR}/../../lib/win32) | |||
| 15 | list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${PROJECT_SOURCE_DIR}/../../lib/win32/ffmpeg) | 15 | list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${PROJECT_SOURCE_DIR}/../../lib/win32/ffmpeg) |
| 16 | list(APPEND CMAKE_SYSTEM_LIBRARY_PATH ${PROJECT_SOURCE_DIR}/../../lib/win32/ffmpeg/bin) | 16 | list(APPEND CMAKE_SYSTEM_LIBRARY_PATH ${PROJECT_SOURCE_DIR}/../../lib/win32/ffmpeg/bin) |
| 17 | list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${PROJECT_SOURCE_DIR}/../BuildDependencies) | 17 | list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${PROJECT_SOURCE_DIR}/../BuildDependencies) |
| 18 | set(CONFIGURATION_LIBDIR lib/${CORE_BUILD_CONFIG}-vc120) | ||
| 19 | set(CONFIGURATION_LIBDIR_RELEASE lib/Release-vc120) | ||
| 20 | set(CONFIGURATION_LIBDIR_DEBUG lib/Debug-vc120) | ||
| 21 | 18 | ||
| 22 | set(JPEG_NAMES ${JPEG_NAMES} jpeg-static) | 19 | set(JPEG_NAMES ${JPEG_NAMES} jpeg-static) |
| 23 | set(PYTHON_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/../BuildDependencies/include/python) | 20 | set(PYTHON_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/../BuildDependencies/include/python) |
| @@ -32,13 +29,7 @@ set(SYSTEM_DEFINES -DNOMINMAX -D_USE_32BIT_TIME_T -DHAS_DX -D__STDC_CONSTANT_MAC | |||
| 32 | -DPLT_HTTP_DEFAULT_USER_AGENT="UPnP/1.0 DLNADOC/1.50 Kodi" | 29 | -DPLT_HTTP_DEFAULT_USER_AGENT="UPnP/1.0 DLNADOC/1.50 Kodi" |
| 33 | -DPLT_HTTP_DEFAULT_SERVER="UPnP/1.0 DLNADOC/1.50 Kodi" | 30 | -DPLT_HTTP_DEFAULT_SERVER="UPnP/1.0 DLNADOC/1.50 Kodi" |
| 34 | -DBUILDING_WITH_CMAKE | 31 | -DBUILDING_WITH_CMAKE |
| 35 | $<$<CONFIG:Debug>:-DD3D_DEBUG_INFO -D_SECURE_SCL=0 -D_HAS_ITERATOR_DEBUGGING=0>) | 32 | $<$<CONFIG:Debug>:-DD3D_DEBUG_INFO -D_ITERATOR_DEBUG_LEVEL=0>) |
| 36 | |||
| 37 | # Compile with /MT (to be compatible with the dependent libraries) | ||
| 38 | foreach(CompilerFlag CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE | ||
| 39 | CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO) | ||
| 40 | string(REPLACE "/MD" "/MT" ${CompilerFlag} "${${CompilerFlag}}") | ||
| 41 | endforeach() | ||
| 42 | 33 | ||
| 43 | # Make sure /FS is set for Visual Studio in order to prevent simultanious access to pdb files. | 34 | # Make sure /FS is set for Visual Studio in order to prevent simultanious access to pdb files. |
| 44 | if(CMAKE_GENERATOR MATCHES "Visual Studio") | 35 | if(CMAKE_GENERATOR MATCHES "Visual Studio") |
| @@ -53,16 +44,15 @@ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO") | |||
| 53 | # For #pragma comment(lib X) | 44 | # For #pragma comment(lib X) |
| 54 | # TODO: It would certainly be better to handle these libraries via CMake modules. | 45 | # TODO: It would certainly be better to handle these libraries via CMake modules. |
| 55 | link_directories(${PROJECT_SOURCE_DIR}/../../lib/win32/ffmpeg/bin | 46 | link_directories(${PROJECT_SOURCE_DIR}/../../lib/win32/ffmpeg/bin |
| 56 | ${PROJECT_SOURCE_DIR}/../BuildDependencies/lib | 47 | ${PROJECT_SOURCE_DIR}/../BuildDependencies/lib) |
| 57 | ${PROJECT_SOURCE_DIR}/../BuildDependencies/${CONFIGURATION_LIBDIR}) | ||
| 58 | 48 | ||
| 59 | # Additional libraries | 49 | # Additional libraries |
| 60 | list(APPEND DEPLIBS d3d11.lib DInput8.lib DSound.lib winmm.lib Mpr.lib Iphlpapi.lib | 50 | list(APPEND DEPLIBS d3d11.lib DInput8.lib DSound.lib winmm.lib Mpr.lib Iphlpapi.lib |
| 61 | PowrProf.lib setupapi.lib dwmapi.lib yajl.lib dxguid.lib DelayImp.lib) | 51 | PowrProf.lib setupapi.lib dwmapi.lib yajl.lib dxguid.lib DelayImp.lib) |
| 62 | 52 | ||
| 63 | # NODEFAULTLIB option | 53 | # NODEFAULTLIB option |
| 64 | set(_nodefaultlibs_RELEASE libc msvcrt libci msvcprt) | 54 | set(_nodefaultlibs_RELEASE libcmt) |
| 65 | set(_nodefaultlibs_DEBUG libcpmt libc msvcrt libcmt msvcrtd msvcprtd) | 55 | set(_nodefaultlibs_DEBUG libcmt msvcrt) |
| 66 | foreach(_lib ${_nodefaultlibs_RELEASE}) | 56 | foreach(_lib ${_nodefaultlibs_RELEASE}) |
| 67 | set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /NODEFAULTLIB:\"${_lib}\"") | 57 | set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /NODEFAULTLIB:\"${_lib}\"") |
| 68 | endforeach() | 58 | endforeach() |
| @@ -71,9 +61,9 @@ foreach(_lib ${_nodefaultlibs_DEBUG}) | |||
| 71 | endforeach() | 61 | endforeach() |
| 72 | 62 | ||
| 73 | # DELAYLOAD option | 63 | # DELAYLOAD option |
| 74 | set(_delayloadlibs libxslt.dll dnssd.dll dwmapi.dll ssh.dll sqlite3.dll | 64 | set(_delayloadlibs zlib.dll libmysql.dll libxslt.dll dnssd.dll dwmapi.dll ssh.dll sqlite3.dll |
| 75 | avcodec-56.dll avfilter-5.dll avformat-56.dll avutil-54.dll | 65 | avcodec-57.dll avfilter-6.dll avformat-57.dll avutil-55.dll |
| 76 | postproc-53.dll swresample-1.dll swscale-3.dll d3dcompiler_47.dll) | 66 | postproc-54.dll swresample-2.dll swscale-4.dll d3dcompiler_47.dll) |
| 77 | foreach(_lib ${_delayloadlibs}) | 67 | foreach(_lib ${_delayloadlibs}) |
| 78 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /DELAYLOAD:\"${_lib}\"") | 68 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /DELAYLOAD:\"${_lib}\"") |
| 79 | endforeach() | 69 | endforeach() |
diff --git a/project/cmake/scripts/windows/c-flag-overrides.cmake b/project/cmake/scripts/windows/c-flag-overrides.cmake index 63825a4..fd85f5c 100644 --- a/project/cmake/scripts/windows/c-flag-overrides.cmake +++ b/project/cmake/scripts/windows/c-flag-overrides.cmake | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | if(MSVC) | 1 | if(MSVC) |
| 2 | set(CMAKE_C_FLAGS_INIT "/MP /DWIN32 /D_WINDOWS /W3 /Zi /arch:SSE2") | 2 | set(CMAKE_C_FLAGS_INIT "/MP /DWIN32 /D_WINDOWS /W3 /Zi /arch:SSE2") |
| 3 | set(CMAKE_C_FLAGS_DEBUG_INIT "/D_DEBUG /MDd /Ob0 /Od /RTC1 /D_HAS_ITERATOR_DEBUGGING=0 /D_SECURE_SCL=0") | 3 | set(CMAKE_C_FLAGS_DEBUG_INIT "/D_DEBUG /MDd /Ob0 /Od /RTC1 /D_ITERATOR_DEBUG_LEVEL=0") |
| 4 | set(CMAKE_C_FLAGS_RELEASE_INIT "/MD /Ox /Ob2 /Oi /Ot /Oy /GL /DNDEBUG") | 4 | set(CMAKE_C_FLAGS_RELEASE_INIT "/MD /Ox /Ob2 /Oi /Ot /Oy /GL /DNDEBUG") |
| 5 | endif(MSVC) \ No newline at end of file | 5 | endif(MSVC) |
diff --git a/project/cmake/scripts/windows/cxx-flag-overrides.cmake b/project/cmake/scripts/windows/cxx-flag-overrides.cmake index 366def3..536b809 100644 --- a/project/cmake/scripts/windows/cxx-flag-overrides.cmake +++ b/project/cmake/scripts/windows/cxx-flag-overrides.cmake | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | if(MSVC) | 1 | if(MSVC) |
| 2 | set(CMAKE_CXX_FLAGS_INIT "/MP /DWIN32 /D_WINDOWS /W3 /GR /Zi /EHsc /arch:SSE2") | 2 | set(CMAKE_CXX_FLAGS_INIT "/MP /DWIN32 /D_WINDOWS /W3 /GR /Zi /EHsc /arch:SSE2") |
| 3 | set(CMAKE_CXX_FLAGS_DEBUG_INIT "/D_DEBUG /MDd /Ob0 /Od /RTC1 /D_HAS_ITERATOR_DEBUGGING=0 /D_SECURE_SCL=0") | 3 | set(CMAKE_CXX_FLAGS_DEBUG_INIT "/D_DEBUG /MDd /Ob0 /Od /RTC1 /D_ITERATOR_DEBUG_LEVEL=0") |
| 4 | set(CMAKE_CXX_FLAGS_RELEASE_INIT "/MD /Ox /Ob2 /Oi /Ot /Oy /GL /DNDEBUG") | 4 | set(CMAKE_CXX_FLAGS_RELEASE_INIT "/MD /Ox /Ob2 /Oi /Ot /Oy /GL /DNDEBUG") |
| 5 | endif(MSVC) \ No newline at end of file | 5 | endif(MSVC) |
diff --git a/project/cmake/scripts/windows/macros.cmake b/project/cmake/scripts/windows/macros.cmake index 6aabf7d..2b61875 100644 --- a/project/cmake/scripts/windows/macros.cmake +++ b/project/cmake/scripts/windows/macros.cmake | |||
| @@ -87,11 +87,13 @@ function(add_precompiled_header target pch_header pch_source) | |||
| 87 | # As own target for usage in multiple libraries | 87 | # As own target for usage in multiple libraries |
| 88 | if(NOT TARGET ${PCH_PCH_TARGET}_pch) | 88 | if(NOT TARGET ${PCH_PCH_TARGET}_pch) |
| 89 | add_library(${PCH_PCH_TARGET}_pch STATIC ${pch_source}) | 89 | add_library(${PCH_PCH_TARGET}_pch STATIC ${pch_source}) |
| 90 | set_target_properties(${PCH_PCH_TARGET}_pch PROPERTIES COMPILE_PDB_OUTPUT_DIRECTORY ${PRECOMPILEDHEADER_DIR}) | 90 | set_target_properties(${PCH_PCH_TARGET}_pch PROPERTIES COMPILE_PDB_NAME vc140 |
| 91 | COMPILE_PDB_OUTPUT_DIRECTORY ${PRECOMPILEDHEADER_DIR}) | ||
| 91 | endif() | 92 | endif() |
| 92 | # From VS2012 onwards, precompiled headers have to be linked against (LNK2011). | 93 | # From VS2012 onwards, precompiled headers have to be linked against (LNK2011). |
| 93 | target_link_libraries(${target} PUBLIC ${PCH_PCH_TARGET}_pch) | 94 | target_link_libraries(${target} PUBLIC ${PCH_PCH_TARGET}_pch) |
| 94 | set_target_properties(${target} PROPERTIES COMPILE_PDB_OUTPUT_DIRECTORY ${PRECOMPILEDHEADER_DIR}) | 95 | set_target_properties(${target} PROPERTIES COMPILE_PDB_NAME vc140 |
| 96 | COMPILE_PDB_OUTPUT_DIRECTORY ${PRECOMPILEDHEADER_DIR}) | ||
| 95 | else() | 97 | else() |
| 96 | # As part of the target | 98 | # As part of the target |
| 97 | target_sources(${target} PRIVATE ${pch_source}) | 99 | target_sources(${target} PRIVATE ${pch_source}) |
diff --git a/project/cmake/scripts/windows/pathsetup.cmake b/project/cmake/scripts/windows/pathsetup.cmake index 940fb62..8550616 100644 --- a/project/cmake/scripts/windows/pathsetup.cmake +++ b/project/cmake/scripts/windows/pathsetup.cmake | |||
| @@ -4,7 +4,7 @@ else() | |||
| 4 | set(CMAKE_INSTALL_PREFIX ${prefix}) | 4 | set(CMAKE_INSTALL_PREFIX ${prefix}) |
| 5 | endif() | 5 | endif() |
| 6 | if(NOT exec_prefix) | 6 | if(NOT exec_prefix) |
| 7 | set(exec_prefix \${prefix}) | 7 | set(exec_prefix ${prefix}) |
| 8 | endif() | 8 | endif() |
| 9 | if(NOT libdir) | 9 | if(NOT libdir) |
| 10 | set(libdir ${prefix}/lib) | 10 | set(libdir ${prefix}/lib) |
| @@ -19,7 +19,7 @@ if(NOT datarootdir) | |||
| 19 | set(datarootdir ${prefix}/share) | 19 | set(datarootdir ${prefix}/share) |
| 20 | endif() | 20 | endif() |
| 21 | if(NOT datadir) | 21 | if(NOT datadir) |
| 22 | set(datadir \${datarootdir}) | 22 | set(datadir ${datarootdir}) |
| 23 | endif() | 23 | endif() |
| 24 | 24 | ||
| 25 | list(APPEND final_message "-- PATH config --") | 25 | list(APPEND final_message "-- PATH config --") |
| @@ -30,5 +30,5 @@ list(APPEND final_message "Includedir: ${includedir}") | |||
| 30 | list(APPEND final_message "Datarootdir: ${datarootdir}") | 30 | list(APPEND final_message "Datarootdir: ${datarootdir}") |
| 31 | list(APPEND final_message "Datadir: ${datadir}") | 31 | list(APPEND final_message "Datadir: ${datadir}") |
| 32 | 32 | ||
| 33 | set(PATH_DEFINES -DBIN_INSTALL_PATH=\"${libdir}/xbmc\" | 33 | set(PATH_DEFINES -DBIN_INSTALL_PATH=\"${libdir}/kodi\" |
| 34 | -DINSTALL_PATH=\"${datarootdir}/xbmc\") | 34 | -DINSTALL_PATH=\"${datarootdir}/kodi\") |
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_inputstream_dll.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_inputstream_dll.h index 6ecf566..bb9a2d4 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_inputstream_dll.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_inputstream_dll.h | |||
| @@ -139,6 +139,11 @@ extern "C" | |||
| 139 | */ | 139 | */ |
| 140 | void DemuxSetSpeed(int speed); | 140 | void DemuxSetSpeed(int speed); |
| 141 | 141 | ||
| 142 | /*! | ||
| 143 | * Sets desired width / height | ||
| 144 | * @param width / hight | ||
| 145 | */ | ||
| 146 | void SetVideoResolution(int width, int height); | ||
| 142 | 147 | ||
| 143 | /*! | 148 | /*! |
| 144 | * Totel time in ms | 149 | * Totel time in ms |
| @@ -238,6 +243,7 @@ extern "C" | |||
| 238 | pClient->DemuxRead = DemuxRead; | 243 | pClient->DemuxRead = DemuxRead; |
| 239 | pClient->DemuxSeekTime = DemuxSeekTime; | 244 | pClient->DemuxSeekTime = DemuxSeekTime; |
| 240 | pClient->DemuxSetSpeed = DemuxSetSpeed; | 245 | pClient->DemuxSetSpeed = DemuxSetSpeed; |
| 246 | pClient->SetVideoResolution = SetVideoResolution; | ||
| 241 | 247 | ||
| 242 | pClient->GetTotalTime = GetTotalTime; | 248 | pClient->GetTotalTime = GetTotalTime; |
| 243 | pClient->GetTime = GetTime; | 249 | pClient->GetTime = GetTime; |
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_inputstream_types.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_inputstream_types.h index 0560708..3a2e2da 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_inputstream_types.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_inputstream_types.h | |||
| @@ -69,6 +69,7 @@ extern "C" { | |||
| 69 | } m_ListItemProperties[MAX_INFO_COUNT]; | 69 | } m_ListItemProperties[MAX_INFO_COUNT]; |
| 70 | 70 | ||
| 71 | const char *m_libFolder; | 71 | const char *m_libFolder; |
| 72 | const char *m_profileFolder; | ||
| 72 | } INPUTSTREAM; | 73 | } INPUTSTREAM; |
| 73 | 74 | ||
| 74 | /*! | 75 | /*! |
| @@ -139,6 +140,7 @@ extern "C" { | |||
| 139 | DemuxPacket* (__cdecl* DemuxRead)(void); | 140 | DemuxPacket* (__cdecl* DemuxRead)(void); |
| 140 | bool (__cdecl* DemuxSeekTime)(int, bool, double*); | 141 | bool (__cdecl* DemuxSeekTime)(int, bool, double*); |
| 141 | void (__cdecl* DemuxSetSpeed)(int); | 142 | void (__cdecl* DemuxSetSpeed)(int); |
| 143 | void (__cdecl* SetVideoResolution)(int, int); | ||
| 142 | 144 | ||
| 143 | // IDisplayTime | 145 | // IDisplayTime |
| 144 | int (__cdecl* GetTotalTime)(void); | 146 | int (__cdecl* GetTotalTime)(void); |
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/libXBMC_addon.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/libXBMC_addon.h index b32ad86..ddeb1db 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/libXBMC_addon.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/libXBMC_addon.h | |||
| @@ -179,6 +179,10 @@ namespace ADDON | |||
| 179 | dlsym(m_libXBMC_addon, "XBMC_get_setting"); | 179 | dlsym(m_libXBMC_addon, "XBMC_get_setting"); |
| 180 | if (XBMC_get_setting == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } | 180 | if (XBMC_get_setting == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } |
| 181 | 181 | ||
| 182 | XBMC_translate_special = (char* (*)(void* HANDLE, void* CB, const char* source)) | ||
| 183 | dlsym(m_libXBMC_addon, "XBMC_translate_special"); | ||
| 184 | if (XBMC_translate_special == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } | ||
| 185 | |||
| 182 | XBMC_queue_notification = (void (*)(void* HANDLE, void* CB, const queue_msg_t loglevel, const char *msg)) | 186 | XBMC_queue_notification = (void (*)(void* HANDLE, void* CB, const queue_msg_t loglevel, const char *msg)) |
| 183 | dlsym(m_libXBMC_addon, "XBMC_queue_notification"); | 187 | dlsym(m_libXBMC_addon, "XBMC_queue_notification"); |
| 184 | if (XBMC_queue_notification == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } | 188 | if (XBMC_queue_notification == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } |
| @@ -334,6 +338,16 @@ namespace ADDON | |||
| 334 | } | 338 | } |
| 335 | 339 | ||
| 336 | /*! | 340 | /*! |
| 341 | * @brief Translates a special protocol folder. | ||
| 342 | * @param source The file / folder to translate. | ||
| 343 | * @return The string translated to resolved path. Must be freed by calling FreeString() when done. | ||
| 344 | */ | ||
| 345 | char *TranslateSpecialProtocol(const char *source) | ||
| 346 | { | ||
| 347 | return XBMC_translate_special(m_Handle, m_Callbacks, source); | ||
| 348 | } | ||
| 349 | |||
| 350 | /*! | ||
| 337 | * @brief Queue a notification in the GUI. | 351 | * @brief Queue a notification in the GUI. |
| 338 | * @param type The message type. | 352 | * @param type The message type. |
| 339 | * @param format The format of the message to pass to display in XBMC. | 353 | * @param format The format of the message to pass to display in XBMC. |
| @@ -671,6 +685,7 @@ namespace ADDON | |||
| 671 | void (*XBMC_unregister_me)(void *HANDLE, void* CB); | 685 | void (*XBMC_unregister_me)(void *HANDLE, void* CB); |
| 672 | void (*XBMC_log)(void *HANDLE, void* CB, const addon_log_t loglevel, const char *msg); | 686 | void (*XBMC_log)(void *HANDLE, void* CB, const addon_log_t loglevel, const char *msg); |
| 673 | bool (*XBMC_get_setting)(void *HANDLE, void* CB, const char* settingName, void *settingValue); | 687 | bool (*XBMC_get_setting)(void *HANDLE, void* CB, const char* settingName, void *settingValue); |
| 688 | char*(*XBMC_translate_special)(void *HANDLE, void* CB, const char* source); | ||
| 674 | void (*XBMC_queue_notification)(void *HANDLE, void* CB, const queue_msg_t type, const char *msg); | 689 | void (*XBMC_queue_notification)(void *HANDLE, void* CB, const queue_msg_t type, const char *msg); |
| 675 | bool (*XBMC_wake_on_lan)(void *HANDLE, void* CB, const char* mac); | 690 | bool (*XBMC_wake_on_lan)(void *HANDLE, void* CB, const char* mac); |
| 676 | char* (*XBMC_unknown_to_utf8)(void *HANDLE, void* CB, const char* str); | 691 | char* (*XBMC_unknown_to_utf8)(void *HANDLE, void* CB, const char* str); |
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/libXBMC_pvr.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/libXBMC_pvr.h index 3e3d479..700f912 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/libXBMC_pvr.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/libXBMC_pvr.h | |||
| @@ -35,7 +35,9 @@ | |||
| 35 | #endif | 35 | #endif |
| 36 | 36 | ||
| 37 | #define DVD_TIME_BASE 1000000 | 37 | #define DVD_TIME_BASE 1000000 |
| 38 | #define DVD_NOPTS_VALUE (-1LL<<52) // should be possible to represent in both double and __int64 | 38 | |
| 39 | //TODO original definition is in DVDClock.h | ||
| 40 | #define DVD_NOPTS_VALUE 0xFFF0000000000000 | ||
| 39 | 41 | ||
| 40 | class CHelper_libXBMC_pvr | 42 | class CHelper_libXBMC_pvr |
| 41 | { | 43 | { |
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_addon_dll.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_addon_dll.h index ff7194f..e3c8785 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_addon_dll.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_addon_dll.h | |||
| @@ -45,7 +45,6 @@ extern "C" { | |||
| 45 | unsigned int __declspec(dllexport) ADDON_GetSettings(ADDON_StructSetting ***sSet); | 45 | unsigned int __declspec(dllexport) ADDON_GetSettings(ADDON_StructSetting ***sSet); |
| 46 | ADDON_STATUS __declspec(dllexport) ADDON_SetSetting(const char *settingName, const void *settingValue); | 46 | ADDON_STATUS __declspec(dllexport) ADDON_SetSetting(const char *settingName, const void *settingValue); |
| 47 | void __declspec(dllexport) ADDON_FreeSettings(); | 47 | void __declspec(dllexport) ADDON_FreeSettings(); |
| 48 | void __declspec(dllexport) ADDON_Announce(const char *flag, const char *sender, const char *message, const void *data); | ||
| 49 | 48 | ||
| 50 | #ifdef __cplusplus | 49 | #ifdef __cplusplus |
| 51 | }; | 50 | }; |
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_dll.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_dll.h index 5cb6075..2cf558a 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_dll.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_dll.h | |||
| @@ -648,6 +648,14 @@ extern "C" | |||
| 648 | PVR_ERROR SetEPGTimeFrame(int iDays); | 648 | PVR_ERROR SetEPGTimeFrame(int iDays); |
| 649 | 649 | ||
| 650 | /*! | 650 | /*! |
| 651 | * Notify the pvr addon for power management events | ||
| 652 | */ | ||
| 653 | void OnSystemSleep(); | ||
| 654 | void OnSystemWake(); | ||
| 655 | void OnPowerSavingActivated(); | ||
| 656 | void OnPowerSavingDeactivated(); | ||
| 657 | |||
| 658 | /*! | ||
| 651 | * Called by XBMC to assign the function pointers of this add-on to pClient. | 659 | * Called by XBMC to assign the function pointers of this add-on to pClient. |
| 652 | * @param pClient The struct to assign the function pointers to. | 660 | * @param pClient The struct to assign the function pointers to. |
| 653 | */ | 661 | */ |
| @@ -736,6 +744,11 @@ extern "C" | |||
| 736 | pClient->IsRealTimeStream = IsRealTimeStream; | 744 | pClient->IsRealTimeStream = IsRealTimeStream; |
| 737 | 745 | ||
| 738 | pClient->SetEPGTimeFrame = SetEPGTimeFrame; | 746 | pClient->SetEPGTimeFrame = SetEPGTimeFrame; |
| 747 | |||
| 748 | pClient->OnSystemSleep = OnSystemSleep; | ||
| 749 | pClient->OnSystemWake = OnSystemWake; | ||
| 750 | pClient->OnPowerSavingActivated = OnPowerSavingActivated; | ||
| 751 | pClient->OnPowerSavingDeactivated = OnPowerSavingDeactivated; | ||
| 739 | }; | 752 | }; |
| 740 | }; | 753 | }; |
| 741 | 754 | ||
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_types.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_types.h index 8d73310..b50483d 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_types.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_types.h | |||
| @@ -32,6 +32,7 @@ | |||
| 32 | #endif | 32 | #endif |
| 33 | #include <string.h> | 33 | #include <string.h> |
| 34 | #include <stdint.h> | 34 | #include <stdint.h> |
| 35 | #include <stdio.h> | ||
| 35 | 36 | ||
| 36 | #include "xbmc_addon_types.h" | 37 | #include "xbmc_addon_types.h" |
| 37 | #include "xbmc_epg_types.h" | 38 | #include "xbmc_epg_types.h" |
| @@ -77,10 +78,10 @@ struct DemuxPacket; | |||
| 77 | #define PVR_STREAM_MAX_STREAMS 20 | 78 | #define PVR_STREAM_MAX_STREAMS 20 |
| 78 | 79 | ||
| 79 | /* current PVR API version */ | 80 | /* current PVR API version */ |
| 80 | #define XBMC_PVR_API_VERSION "5.1.0" | 81 | #define XBMC_PVR_API_VERSION "5.2.0" |
| 81 | 82 | ||
| 82 | /* min. PVR API version */ | 83 | /* min. PVR API version */ |
| 83 | #define XBMC_PVR_MIN_API_VERSION "5.1.0" | 84 | #define XBMC_PVR_MIN_API_VERSION "5.2.0" |
| 84 | 85 | ||
| 85 | #ifdef __cplusplus | 86 | #ifdef __cplusplus |
| 86 | extern "C" { | 87 | extern "C" { |
| @@ -228,6 +229,7 @@ extern "C" { | |||
| 228 | PVR_CONNECTION_STATE_ACCESS_DENIED = 4, /*!< @brief backend server is reachable, but denies client access (e.g. due to wrong credentials) */ | 229 | PVR_CONNECTION_STATE_ACCESS_DENIED = 4, /*!< @brief backend server is reachable, but denies client access (e.g. due to wrong credentials) */ |
| 229 | PVR_CONNECTION_STATE_CONNECTED = 5, /*!< @brief connection to backend server is established */ | 230 | PVR_CONNECTION_STATE_CONNECTED = 5, /*!< @brief connection to backend server is established */ |
| 230 | PVR_CONNECTION_STATE_DISCONNECTED = 6, /*!< @brief no connection to backend server (e.g. due to network errors or client initiated disconnect)*/ | 231 | PVR_CONNECTION_STATE_DISCONNECTED = 6, /*!< @brief no connection to backend server (e.g. due to network errors or client initiated disconnect)*/ |
| 232 | PVR_CONNECTION_STATE_CONNECTING = 7, /*!< @brief connecting to backend */ | ||
| 231 | } PVR_CONNECTION_STATE; | 233 | } PVR_CONNECTION_STATE; |
| 232 | 234 | ||
| 233 | /*! | 235 | /*! |
| @@ -601,6 +603,10 @@ extern "C" { | |||
| 601 | bool (__cdecl* IsTimeshifting)(void); | 603 | bool (__cdecl* IsTimeshifting)(void); |
| 602 | bool (__cdecl* IsRealTimeStream)(void); | 604 | bool (__cdecl* IsRealTimeStream)(void); |
| 603 | PVR_ERROR (__cdecl* SetEPGTimeFrame)(int); | 605 | PVR_ERROR (__cdecl* SetEPGTimeFrame)(int); |
| 606 | void (__cdecl* OnSystemSleep)(void); | ||
| 607 | void (__cdecl* OnSystemWake)(void); | ||
| 608 | void (__cdecl* OnPowerSavingActivated)(void); | ||
| 609 | void (__cdecl* OnPowerSavingDeactivated)(void); | ||
| 604 | } PVRClient; | 610 | } PVRClient; |
| 605 | 611 | ||
| 606 | #ifdef __cplusplus | 612 | #ifdef __cplusplus |
diff --git a/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxPacket.h b/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxPacket.h index dbee80a..4f47118 100644 --- a/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxPacket.h +++ b/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxPacket.h | |||
| @@ -36,4 +36,6 @@ typedef struct DemuxPacket | |||
| 36 | double pts; // pts in DVD_TIME_BASE | 36 | double pts; // pts in DVD_TIME_BASE |
| 37 | double dts; // dts in DVD_TIME_BASE | 37 | double dts; // dts in DVD_TIME_BASE |
| 38 | double duration; // duration in DVD_TIME_BASE if available | 38 | double duration; // duration in DVD_TIME_BASE if available |
| 39 | |||
| 40 | int dispTime; | ||
| 39 | } DemuxPacket; | 41 | } DemuxPacket; |
diff --git a/xbmc/filesystem/IFileTypes.h b/xbmc/filesystem/IFileTypes.h index d2d77eb..4c6dd98 100644 --- a/xbmc/filesystem/IFileTypes.h +++ b/xbmc/filesystem/IFileTypes.h | |||
| @@ -60,15 +60,16 @@ struct SCacheStatus | |||
| 60 | uint64_t forward; /**< number of bytes cached forward of current position */ | 60 | uint64_t forward; /**< number of bytes cached forward of current position */ |
| 61 | unsigned maxrate; /**< maximum number of bytes per second cache is allowed to fill */ | 61 | unsigned maxrate; /**< maximum number of bytes per second cache is allowed to fill */ |
| 62 | unsigned currate; /**< average read rate from source file since last position change */ | 62 | unsigned currate; /**< average read rate from source file since last position change */ |
| 63 | bool full; /**< is the cache full */ | 63 | float level; /**< cache level (0.0 - 1.0) */ |
| 64 | }; | 64 | }; |
| 65 | 65 | ||
| 66 | typedef enum { | 66 | typedef enum { |
| 67 | IOCTRL_NATIVE = 1, /**< SNativeIoControl structure, containing what should be passed to native ioctrl */ | 67 | IOCTRL_NATIVE = 1, /**< SNativeIoControl structure, containing what should be passed to native ioctrl */ |
| 68 | IOCTRL_SEEK_POSSIBLE = 2, /**< return 0 if known not to work, 1 if it should work */ | 68 | IOCTRL_SEEK_POSSIBLE = 2, /**< return 0 if known not to work, 1 if it should work */ |
| 69 | IOCTRL_CACHE_STATUS = 3, /**< SCacheStatus structure */ | 69 | IOCTRL_CACHE_STATUS = 3, /**< SCacheStatus structure */ |
| 70 | IOCTRL_CACHE_SETRATE = 4, /**< unsigned int with speed limit for caching in bytes per second */ | 70 | IOCTRL_CACHE_SETRATE = 4, /**< unsigned int with speed limit for caching in bytes per second */ |
| 71 | IOCTRL_SET_CACHE = 8, /** <CFileCache */ | 71 | IOCTRL_SET_CACHE = 8, /**< CFileCache */ |
| 72 | IOCTRL_SET_RETRY = 16, /**< Enable/disable retry within the protocol handler (if supported) */ | ||
| 72 | } EIoControl; | 73 | } EIoControl; |
| 73 | 74 | ||
| 74 | enum CURLOPTIONTYPE | 75 | enum CURLOPTIONTYPE |
