diff options
Diffstat (limited to 'project/cmake/scripts')
| -rw-r--r-- | project/cmake/scripts/android/Install.cmake | 1 | ||||
| -rw-r--r-- | project/cmake/scripts/common/ArchSetup.cmake | 5 | ||||
| -rw-r--r-- | project/cmake/scripts/common/CheckTargetPlatform.cmake | 6 | ||||
| -rw-r--r-- | project/cmake/scripts/common/HandleDepends.cmake | 43 | ||||
| -rw-r--r-- | project/cmake/scripts/common/Macros.cmake | 9 | ||||
| -rw-r--r-- | project/cmake/scripts/common/PrepareEnv.cmake | 47 | ||||
| -rw-r--r-- | project/cmake/scripts/ios/ArchSetup.cmake | 21 | ||||
| -rw-r--r-- | project/cmake/scripts/ios/Install.cmake | 93 | ||||
| -rw-r--r-- | project/cmake/scripts/linux/ArchSetup.cmake | 4 | ||||
| -rw-r--r-- | project/cmake/scripts/linux/Install.cmake | 18 | ||||
| -rw-r--r-- | project/cmake/scripts/osx/Macros.cmake | 9 | ||||
| -rw-r--r-- | project/cmake/scripts/windows/tools/patch.cmake | 37 |
12 files changed, 200 insertions, 93 deletions
diff --git a/project/cmake/scripts/android/Install.cmake b/project/cmake/scripts/android/Install.cmake index 5c66f41..025f194 100644 --- a/project/cmake/scripts/android/Install.cmake +++ b/project/cmake/scripts/android/Install.cmake | |||
| @@ -91,7 +91,6 @@ foreach(lib IN LISTS required_dyload dyload_optional ITEMS Shairplay) | |||
| 91 | endif() | 91 | endif() |
| 92 | endforeach() | 92 | endforeach() |
| 93 | add_bundle_file(${SMBCLIENT_LIBRARY} ${libdir} "") | 93 | add_bundle_file(${SMBCLIENT_LIBRARY} ${libdir} "") |
| 94 | add_bundle_file(${DEPENDS_PATH}/lib/librtmp.so ${libdir} "") | ||
| 95 | 94 | ||
| 96 | # Main targets from Makefile.in | 95 | # Main targets from Makefile.in |
| 97 | if(CPU MATCHES i686) | 96 | if(CPU MATCHES i686) |
diff --git a/project/cmake/scripts/common/ArchSetup.cmake b/project/cmake/scripts/common/ArchSetup.cmake index 438e3bd..538fcaf 100644 --- a/project/cmake/scripts/common/ArchSetup.cmake +++ b/project/cmake/scripts/common/ArchSetup.cmake | |||
| @@ -14,6 +14,7 @@ | |||
| 14 | include(CheckCXXSourceCompiles) | 14 | include(CheckCXXSourceCompiles) |
| 15 | include(CheckSymbolExists) | 15 | include(CheckSymbolExists) |
| 16 | include(CheckFunctionExists) | 16 | include(CheckFunctionExists) |
| 17 | include(CheckIncludeFile) | ||
| 17 | 18 | ||
| 18 | # Macro to check if a given type exists in a given header | 19 | # Macro to check if a given type exists in a given header |
| 19 | # Arguments: | 20 | # Arguments: |
| @@ -109,6 +110,10 @@ check_symbol_exists(PRIdMAX inttypes.h HAVE_INTTYPES_H) | |||
| 109 | check_builtin("long* temp=0; long ret=__sync_add_and_fetch(temp, 1)" HAS_BUILTIN_SYNC_ADD_AND_FETCH) | 110 | check_builtin("long* temp=0; long ret=__sync_add_and_fetch(temp, 1)" HAS_BUILTIN_SYNC_ADD_AND_FETCH) |
| 110 | check_builtin("long* temp=0; long ret=__sync_sub_and_fetch(temp, 1)" HAS_BUILTIN_SYNC_SUB_AND_FETCH) | 111 | check_builtin("long* temp=0; long ret=__sync_sub_and_fetch(temp, 1)" HAS_BUILTIN_SYNC_SUB_AND_FETCH) |
| 111 | check_builtin("long* temp=0; long ret=__sync_val_compare_and_swap(temp, 1, 1)" HAS_BUILTIN_SYNC_VAL_COMPARE_AND_SWAP) | 112 | check_builtin("long* temp=0; long ret=__sync_val_compare_and_swap(temp, 1, 1)" HAS_BUILTIN_SYNC_VAL_COMPARE_AND_SWAP) |
| 113 | check_include_file(sys/inotify.h HAVE_INOTIFY) | ||
| 114 | if(HAVE_INOTIFY) | ||
| 115 | list(APPEND SYSTEM_DEFINES -DHAVE_INOTIFY=1) | ||
| 116 | endif() | ||
| 112 | if(HAVE_POSIX_FADVISE) | 117 | if(HAVE_POSIX_FADVISE) |
| 113 | list(APPEND SYSTEM_DEFINES -DHAVE_POSIX_FADVISE=1) | 118 | list(APPEND SYSTEM_DEFINES -DHAVE_POSIX_FADVISE=1) |
| 114 | endif() | 119 | endif() |
diff --git a/project/cmake/scripts/common/CheckTargetPlatform.cmake b/project/cmake/scripts/common/CheckTargetPlatform.cmake index 5b5d9a1..82ee668 100644 --- a/project/cmake/scripts/common/CheckTargetPlatform.cmake +++ b/project/cmake/scripts/common/CheckTargetPlatform.cmake | |||
| @@ -9,7 +9,11 @@ function(check_target_platform dir target_platform build) | |||
| 9 | if(EXISTS ${dir} AND EXISTS ${dir}/platforms.txt) | 9 | if(EXISTS ${dir} AND EXISTS ${dir}/platforms.txt) |
| 10 | # get all the specified platforms | 10 | # get all the specified platforms |
| 11 | file(STRINGS ${dir}/platforms.txt platforms) | 11 | file(STRINGS ${dir}/platforms.txt platforms) |
| 12 | string(REPLACE " " ";" platforms ${platforms}) | 12 | |
| 13 | list( LENGTH platforms listlen ) | ||
| 14 | if(${listlen} EQUAL 1) | ||
| 15 | string(REPLACE " " ";" platforms ${platforms}) | ||
| 16 | endif() | ||
| 13 | 17 | ||
| 14 | # check if the addon/dependency should be built for the current platform | 18 | # check if the addon/dependency should be built for the current platform |
| 15 | foreach(platform ${platforms}) | 19 | foreach(platform ${platforms}) |
diff --git a/project/cmake/scripts/common/HandleDepends.cmake b/project/cmake/scripts/common/HandleDepends.cmake index 880ccdf..adc105b 100644 --- a/project/cmake/scripts/common/HandleDepends.cmake +++ b/project/cmake/scripts/common/HandleDepends.cmake | |||
| @@ -17,6 +17,7 @@ function(add_addon_depends addon searchpath) | |||
| 17 | file MATCHES noinstall.txt OR | 17 | file MATCHES noinstall.txt OR |
| 18 | file MATCHES flags.txt OR | 18 | file MATCHES flags.txt OR |
| 19 | file MATCHES deps.txt OR | 19 | file MATCHES deps.txt OR |
| 20 | file MATCHES "[a-z]+-deps[.]txt" OR | ||
| 20 | file MATCHES platforms.txt)) | 21 | file MATCHES platforms.txt)) |
| 21 | message(STATUS "Processing ${file}") | 22 | message(STATUS "Processing ${file}") |
| 22 | file(STRINGS ${file} def) | 23 | file(STRINGS ${file} def) |
| @@ -49,7 +50,11 @@ function(add_addon_depends addon searchpath) | |||
| 49 | if(EXISTS ${dir}/flags.txt) | 50 | if(EXISTS ${dir}/flags.txt) |
| 50 | set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${dir}/flags.txt) | 51 | set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${dir}/flags.txt) |
| 51 | file(STRINGS ${dir}/flags.txt extraflags) | 52 | file(STRINGS ${dir}/flags.txt extraflags) |
| 53 | |||
| 54 | # replace some custom placeholders | ||
| 55 | string(REPLACE "@MINGW_TOOLCHAIN_FILE@" "${OUTPUT_DIR}/Toolchain_mingw32.cmake" extraflags "${extraflags}") | ||
| 52 | string(REPLACE " " ";" extraflags ${extraflags}) | 56 | string(REPLACE " " ";" extraflags ${extraflags}) |
| 57 | |||
| 53 | message(STATUS "${id} extraflags: ${extraflags}") | 58 | message(STATUS "${id} extraflags: ${extraflags}") |
| 54 | endif() | 59 | endif() |
| 55 | 60 | ||
| @@ -103,11 +108,18 @@ function(add_addon_depends addon searchpath) | |||
| 103 | endif() | 108 | endif() |
| 104 | endif() | 109 | endif() |
| 105 | 110 | ||
| 106 | # on windows "patch.exe" can only handle CR-LF line-endings so we | ||
| 107 | # need to force it to also handle LF-only line endings | ||
| 108 | set(PATCH_PROGRAM ${PATCH_EXECUTABLE}) | 111 | set(PATCH_PROGRAM ${PATCH_EXECUTABLE}) |
| 112 | |||
| 113 | # On Windows "patch.exe" can only handle CR-LF line-endings. | ||
| 114 | # Our patches have LF-only line endings - except when they | ||
| 115 | # have been checked out as part of a dependency hosted on Git | ||
| 116 | # and core.autocrlf=true. | ||
| 109 | if(WIN32) | 117 | if(WIN32) |
| 110 | set(PATCH_PROGRAM "\"${PATCH_PROGRAM}\" --binary") | 118 | file(READ ${patch} patch_content_hex HEX) |
| 119 | # Force handle LF-only line endings | ||
| 120 | if(NOT patch_content_hex MATCHES "0d0a") | ||
| 121 | set(PATCH_PROGRAM "\"${PATCH_PROGRAM}\" --binary") | ||
| 122 | endif() | ||
| 111 | endif() | 123 | endif() |
| 112 | endif() | 124 | endif() |
| 113 | 125 | ||
| @@ -131,8 +143,11 @@ function(add_addon_depends addon searchpath) | |||
| 131 | set(INSTALL_COMMAND INSTALL_COMMAND "") | 143 | set(INSTALL_COMMAND INSTALL_COMMAND "") |
| 132 | endif() | 144 | endif() |
| 133 | 145 | ||
| 134 | # check if there's a deps.txt containing dependencies on other libraries | 146 | # check if there's a platform-specific or generic deps.txt containing dependencies on other libraries |
| 135 | if(EXISTS ${dir}/deps.txt) | 147 | if(EXISTS ${dir}/${CORE_SYSTEM_NAME}-deps.txt) |
| 148 | file(STRINGS ${dir}/${CORE_SYSTEM_NAME}-deps.txt deps) | ||
| 149 | message(STATUS "${id} depends: ${deps}") | ||
| 150 | elseif(EXISTS ${dir}/deps.txt) | ||
| 136 | set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${dir}/deps.txt) | 151 | set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${dir}/deps.txt) |
| 137 | file(STRINGS ${dir}/deps.txt deps) | 152 | file(STRINGS ${dir}/deps.txt deps) |
| 138 | message(STATUS "${id} depends: ${deps}") | 153 | message(STATUS "${id} depends: ${deps}") |
| @@ -161,6 +176,10 @@ function(add_addon_depends addon searchpath) | |||
| 161 | PATCH_COMMAND ${PATCH_COMMAND} | 176 | PATCH_COMMAND ${PATCH_COMMAND} |
| 162 | "${INSTALL_COMMAND}") | 177 | "${INSTALL_COMMAND}") |
| 163 | 178 | ||
| 179 | if(CMAKE_VERSION VERSION_GREATER 3.5.9) | ||
| 180 | list(APPEND EXTERNALPROJECT_SETUP GIT_SHALLOW 1) | ||
| 181 | endif() | ||
| 182 | |||
| 164 | # if there's an url defined we need to pass that to externalproject_add() | 183 | # if there's an url defined we need to pass that to externalproject_add() |
| 165 | if(DEFINED url AND NOT "${url}" STREQUAL "") | 184 | if(DEFINED url AND NOT "${url}" STREQUAL "") |
| 166 | # check if there's a third parameter in the file | 185 | # check if there's a third parameter in the file |
| @@ -172,6 +191,20 @@ function(add_addon_depends addon searchpath) | |||
| 172 | GIT_REPOSITORY ${url} | 191 | GIT_REPOSITORY ${url} |
| 173 | GIT_TAG ${revision} | 192 | GIT_TAG ${revision} |
| 174 | "${EXTERNALPROJECT_SETUP}") | 193 | "${EXTERNALPROJECT_SETUP}") |
| 194 | |||
| 195 | # For patchfiles to work, disable (users globally set) autocrlf=true | ||
| 196 | if(CMAKE_MINIMUM_REQUIRED_VERSION VERSION_GREATER 3.7) | ||
| 197 | message(AUTHOR_WARNING "Make use of GIT_CONFIG") | ||
| 198 | endif() | ||
| 199 | if(WIN32 AND patches) | ||
| 200 | externalproject_add_step(${id} gitconfig | ||
| 201 | COMMAND git config core.autocrlf false | ||
| 202 | COMMAND git rm -rf --cached . | ||
| 203 | COMMAND git reset --hard HEAD | ||
| 204 | COMMENT "Performing gitconfig step: Disabling autocrlf to enable patching for '${id}'" | ||
| 205 | DEPENDERS patch | ||
| 206 | WORKING_DIRECTORY <SOURCE_DIR>) | ||
| 207 | endif() | ||
| 175 | else() | 208 | else() |
| 176 | set(CONFIGURE_COMMAND "") | 209 | set(CONFIGURE_COMMAND "") |
| 177 | if(NOT WIN32) | 210 | if(NOT WIN32) |
diff --git a/project/cmake/scripts/common/Macros.cmake b/project/cmake/scripts/common/Macros.cmake index 71c39ef..cce3245 100644 --- a/project/cmake/scripts/common/Macros.cmake +++ b/project/cmake/scripts/common/Macros.cmake | |||
| @@ -155,9 +155,12 @@ function(core_add_shared_library name) | |||
| 155 | add_library(${name} SHARED ${SOURCES} ${HEADERS} ${OTHERS}) | 155 | add_library(${name} SHARED ${SOURCES} ${HEADERS} ${OTHERS}) |
| 156 | set_target_properties(${name} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${OUTPUT_DIRECTORY} | 156 | set_target_properties(${name} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${OUTPUT_DIRECTORY} |
| 157 | RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${OUTPUT_DIRECTORY} | 157 | RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${OUTPUT_DIRECTORY} |
| 158 | RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/${OUTPUT_DIRECTORY} | ||
| 159 | RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/${OUTPUT_DIRECTORY} | ||
| 160 | OUTPUT_NAME ${OUTPUT_NAME} PREFIX "") | 158 | OUTPUT_NAME ${OUTPUT_NAME} PREFIX "") |
| 159 | foreach(OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES}) | ||
| 160 | string(TOUPPER ${OUTPUTCONFIG} OUTPUTCONFIG) | ||
| 161 | set_target_properties(${name} PROPERTIES LIBRARY_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${CMAKE_BINARY_DIR}/${OUTPUT_DIRECTORY} | ||
| 162 | RUNTIME_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${CMAKE_BINARY_DIR}/${OUTPUT_DIRECTORY}) | ||
| 163 | endforeach() | ||
| 161 | 164 | ||
| 162 | set(LIBRARY_FILES ${LIBRARY_FILES} ${CMAKE_BINARY_DIR}/${OUTPUT_DIRECTORY}/${OUTPUT_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX} CACHE STRING "" FORCE) | 165 | set(LIBRARY_FILES ${LIBRARY_FILES} ${CMAKE_BINARY_DIR}/${OUTPUT_DIRECTORY}/${OUTPUT_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX} CACHE STRING "" FORCE) |
| 163 | add_dependencies(${APP_NAME_LC}-libraries ${name}) | 166 | add_dependencies(${APP_NAME_LC}-libraries ${name}) |
| @@ -595,9 +598,9 @@ macro(core_find_versions) | |||
| 595 | set(APP_VERSION ${APP_VERSION_MAJOR}.${APP_VERSION_MINOR}) | 598 | set(APP_VERSION ${APP_VERSION_MAJOR}.${APP_VERSION_MINOR}) |
| 596 | if(APP_VERSION_TAG) | 599 | if(APP_VERSION_TAG) |
| 597 | set(APP_VERSION ${APP_VERSION}-${APP_VERSION_TAG}) | 600 | set(APP_VERSION ${APP_VERSION}-${APP_VERSION_TAG}) |
| 601 | string(TOLOWER ${APP_VERSION_TAG} APP_VERSION_TAG_LC) | ||
| 598 | endif() | 602 | endif() |
| 599 | string(REPLACE "." "," FILE_VERSION ${APP_ADDON_API}.0) | 603 | string(REPLACE "." "," FILE_VERSION ${APP_ADDON_API}.0) |
| 600 | string(TOLOWER ${APP_VERSION_TAG} APP_VERSION_TAG_LC) | ||
| 601 | file(STRINGS ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/libKODI_guilib.h guilib_version REGEX "^.*GUILIB_API_VERSION (.*)$") | 604 | file(STRINGS ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/libKODI_guilib.h guilib_version REGEX "^.*GUILIB_API_VERSION (.*)$") |
| 602 | string(REGEX REPLACE ".*\"(.*)\"" "\\1" guilib_version ${guilib_version}) | 605 | string(REGEX REPLACE ".*\"(.*)\"" "\\1" guilib_version ${guilib_version}) |
| 603 | file(STRINGS ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/libKODI_guilib.h guilib_version_min REGEX "^.*GUILIB_MIN_API_VERSION (.*)$") | 606 | file(STRINGS ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/libKODI_guilib.h guilib_version_min REGEX "^.*GUILIB_MIN_API_VERSION (.*)$") |
diff --git a/project/cmake/scripts/common/PrepareEnv.cmake b/project/cmake/scripts/common/PrepareEnv.cmake index 8e02382..51be739 100644 --- a/project/cmake/scripts/common/PrepareEnv.cmake +++ b/project/cmake/scripts/common/PrepareEnv.cmake | |||
| @@ -51,43 +51,14 @@ foreach(binding ${bindings}) | |||
| 51 | configure_file(${CORE_SOURCE_DIR}/${header} ${APP_INCLUDE_DIR} COPYONLY) | 51 | configure_file(${CORE_SOURCE_DIR}/${header} ${APP_INCLUDE_DIR} COPYONLY) |
| 52 | endforeach() | 52 | endforeach() |
| 53 | 53 | ||
| 54 | ### on windows we need a "patch" binary to be able to patch 3rd party sources | 54 | ### processing additional tools required by the platform |
| 55 | if(WIN32) | 55 | if(EXISTS ${CORE_SOURCE_DIR}/project/cmake/scripts/${CORE_SYSTEM_NAME}/tools/) |
| 56 | find_program(PATCH_FOUND NAMES patch patch.exe) | 56 | file(GLOB platform_tools ${CORE_SOURCE_DIR}/project/cmake/scripts/${CORE_SYSTEM_NAME}/tools/*.cmake) |
| 57 | if(PATCH_FOUND) | 57 | foreach(platform_tool ${platform_tools}) |
| 58 | message(STATUS "patch utility found at ${PATCH_FOUND}") | 58 | get_filename_component(platform_tool_name ${platform_tool} NAME_WE) |
| 59 | else() | 59 | message(STATUS "Processing ${CORE_SYSTEM_NAME} specific tool: ${platform_tool_name}") |
| 60 | set(PATCH_ARCHIVE_NAME "patch-2.5.9-7-bin-3") | ||
| 61 | set(PATCH_ARCHIVE "${PATCH_ARCHIVE_NAME}.zip") | ||
| 62 | set(PATCH_URL "${KODI_MIRROR}/build-deps/win32/${PATCH_ARCHIVE}") | ||
| 63 | set(PATCH_DOWNLOAD ${BUILD_DIR}/download/${PATCH_ARCHIVE}) | ||
| 64 | 60 | ||
| 65 | # download the archive containing patch.exe | 61 | # include the file |
| 66 | message(STATUS "Downloading patch utility from ${PATCH_URL}...") | 62 | include(${platform_tool}) |
| 67 | file(DOWNLOAD "${PATCH_URL}" "${PATCH_DOWNLOAD}" STATUS PATCH_DL_STATUS LOG PATCH_LOG SHOW_PROGRESS) | 63 | endforeach() |
| 68 | list(GET PATCH_DL_STATUS 0 PATCH_RETCODE) | ||
| 69 | if(NOT ${PATCH_RETCODE} EQUAL 0) | ||
| 70 | message(FATAL_ERROR "ERROR downloading ${PATCH_URL} - status: ${PATCH_DL_STATUS} log: ${PATCH_LOG}") | ||
| 71 | endif() | ||
| 72 | |||
| 73 | # extract the archive containing patch.exe | ||
| 74 | execute_process(COMMAND ${CMAKE_COMMAND} -E tar xzvf ${PATCH_DOWNLOAD} | ||
| 75 | WORKING_DIRECTORY ${BUILD_DIR}) | ||
| 76 | |||
| 77 | # make sure the extraction worked and that patch.exe is there | ||
| 78 | set(PATCH_PATH ${BUILD_DIR}/${PATCH_ARCHIVE_NAME}) | ||
| 79 | set(PATCH_BINARY_PATH ${PATCH_PATH}/bin/patch.exe) | ||
| 80 | if(NOT EXISTS ${PATCH_PATH} OR NOT EXISTS ${PATCH_BINARY_PATH}) | ||
| 81 | message(FATAL_ERROR "ERROR extracting patch utility from ${PATCH_DOWNLOAD_DIR}") | ||
| 82 | endif() | ||
| 83 | |||
| 84 | # copy patch.exe into the output directory | ||
| 85 | file(INSTALL ${PATCH_BINARY_PATH} DESTINATION ${ADDON_DEPENDS_PATH}/bin) | ||
| 86 | |||
| 87 | # make sure that cmake can find the copied patch.exe | ||
| 88 | find_program(PATCH_FOUND NAMES patch patch.exe) | ||
| 89 | if(NOT PATCH_FOUND) | ||
| 90 | message(FATAL_ERROR "ERROR installing patch utility from ${PATCH_BINARY_PATH} to ${ADDON_DEPENDS_PATH}/bin") | ||
| 91 | endif() | ||
| 92 | endif() | ||
| 93 | endif() | 64 | endif() |
diff --git a/project/cmake/scripts/ios/ArchSetup.cmake b/project/cmake/scripts/ios/ArchSetup.cmake index 56661e2..f3e8590 100644 --- a/project/cmake/scripts/ios/ArchSetup.cmake +++ b/project/cmake/scripts/ios/ArchSetup.cmake | |||
| @@ -13,6 +13,7 @@ if(WITH_ARCH) | |||
| 13 | set(ARCH ${WITH_ARCH}) | 13 | set(ARCH ${WITH_ARCH}) |
| 14 | else() | 14 | else() |
| 15 | if(CPU STREQUAL armv7 OR CPU STREQUAL arm64) | 15 | if(CPU STREQUAL armv7 OR CPU STREQUAL arm64) |
| 16 | set(CMAKE_OSX_ARCHITECTURES ${CPU}) | ||
| 16 | set(ARCH arm-osx) | 17 | set(ARCH arm-osx) |
| 17 | set(NEON False) | 18 | set(NEON False) |
| 18 | else() | 19 | else() |
| @@ -34,3 +35,23 @@ list(APPEND DEPLIBS "-framework CoreFoundation" "-framework CoreVideo" | |||
| 34 | 35 | ||
| 35 | set(ENABLE_DVDCSS OFF CACHE BOOL "" FORCE) | 36 | set(ENABLE_DVDCSS OFF CACHE BOOL "" FORCE) |
| 36 | set(ENABLE_OPTICAL OFF CACHE BOOL "" FORCE) | 37 | set(ENABLE_OPTICAL OFF CACHE BOOL "" FORCE) |
| 38 | |||
| 39 | set(CMAKE_XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET "5.1") | ||
| 40 | set(CMAKE_XCODE_ATTRIBUTE_TARGETED_DEVICE_FAMILY "1,2") | ||
| 41 | |||
| 42 | set(CMAKE_XCODE_ATTRIBUTE_INLINES_ARE_PRIVATE_EXTERN OFF) | ||
| 43 | set(CMAKE_XCODE_ATTRIBUTE_GCC_SYMBOLS_PRIVATE_EXTERN OFF) | ||
| 44 | set(CMAKE_XCODE_ATTRIBUTE_COPY_PHASE_STRIP OFF) | ||
| 45 | |||
| 46 | # Xcode strips dead code by default which breaks wrapping | ||
| 47 | set(CMAKE_XCODE_ATTRIBUTE_DEAD_CODE_STRIPPING OFF) | ||
| 48 | |||
| 49 | # Unify output directories for iOS packaging scripts | ||
| 50 | if(NOT CMAKE_GENERATOR MATCHES Xcode) | ||
| 51 | set(CORE_BUILD_CONFIG "${CORE_BUILD_CONFIG}-iphoneos") | ||
| 52 | endif() | ||
| 53 | set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CORE_BUILD_DIR}/${CORE_BUILD_CONFIG}) | ||
| 54 | foreach(OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES}) | ||
| 55 | string(TOUPPER ${OUTPUTCONFIG} OUTPUTCONFIG) | ||
| 56 | set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${CORE_BUILD_DIR}/${CORE_BUILD_CONFIG}) | ||
| 57 | endforeach() | ||
diff --git a/project/cmake/scripts/ios/Install.cmake b/project/cmake/scripts/ios/Install.cmake index 052565f..c49fcd5 100644 --- a/project/cmake/scripts/ios/Install.cmake +++ b/project/cmake/scripts/ios/Install.cmake | |||
| @@ -1,42 +1,54 @@ | |||
| 1 | # IOS packaging | 1 | # IOS packaging |
| 2 | 2 | ||
| 3 | set(PACKAGE_OUTPUT_DIR ${CMAKE_BINARY_DIR}/build/${CORE_BUILD_CONFIG}-iphoneos) | 3 | set(BUNDLE_RESOURCES ${CORE_SOURCE_DIR}/xbmc/platform/darwin/ios/Default-568h@2x.png |
| 4 | ${CORE_SOURCE_DIR}/xbmc/platform/darwin/ios/Default-667h@2x.png | ||
| 5 | ${CORE_SOURCE_DIR}/xbmc/platform/darwin/ios/Default-736h@3x.png | ||
| 6 | ${CORE_SOURCE_DIR}/xbmc/platform/darwin/ios/Default-Landscape-736h@3x.png | ||
| 7 | ${CORE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon29x29.png | ||
| 8 | ${CORE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon29x29@2x.png | ||
| 9 | ${CORE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon40x40.png | ||
| 10 | ${CORE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon40x40@2x.png | ||
| 11 | ${CORE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon50x50.png | ||
| 12 | ${CORE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon50x50@2x.png | ||
| 13 | ${CORE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon57x57.png | ||
| 14 | ${CORE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon57x57@2x.png | ||
| 15 | ${CORE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon60x60.png | ||
| 16 | ${CORE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon60x60@2x.png | ||
| 17 | ${CORE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon72x72.png | ||
| 18 | ${CORE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon72x72@2x.png | ||
| 19 | ${CORE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon76x76.png | ||
| 20 | ${CORE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon76x76@2x.png) | ||
| 4 | 21 | ||
| 5 | file(MAKE_DIRECTORY ${PACKAGE_OUTPUT_DIR}/${APP_NAME}.app) | 22 | if(CMAKE_GENERATOR STREQUAL Xcode) |
| 6 | set(BUNDLE_RESOURCES xbmc/platform/darwin/ios/Default-568h@2x.png | 23 | set(RESOURCE_LOCATION ${APP_NAME}.app) |
| 7 | xbmc/platform/darwin/ios/Default-667h@2x.png | 24 | else() |
| 8 | xbmc/platform/darwin/ios/Default-736h@3x.png | 25 | set(RESOURCE_LOCATION ".") |
| 9 | xbmc/platform/darwin/ios/Default-Landscape-736h@3x.png | 26 | endif() |
| 10 | tools/darwin/packaging/media/ios/rounded/AppIcon29x29.png | ||
| 11 | tools/darwin/packaging/media/ios/rounded/AppIcon29x29@2x.png | ||
| 12 | tools/darwin/packaging/media/ios/rounded/AppIcon40x40.png | ||
| 13 | tools/darwin/packaging/media/ios/rounded/AppIcon40x40@2x.png | ||
| 14 | tools/darwin/packaging/media/ios/rounded/AppIcon50x50.png | ||
| 15 | tools/darwin/packaging/media/ios/rounded/AppIcon50x50@2x.png | ||
| 16 | tools/darwin/packaging/media/ios/rounded/AppIcon57x57.png | ||
| 17 | tools/darwin/packaging/media/ios/rounded/AppIcon57x57@2x.png | ||
| 18 | tools/darwin/packaging/media/ios/rounded/AppIcon60x60.png | ||
| 19 | tools/darwin/packaging/media/ios/rounded/AppIcon60x60@2x.png | ||
| 20 | tools/darwin/packaging/media/ios/rounded/AppIcon72x72.png | ||
| 21 | tools/darwin/packaging/media/ios/rounded/AppIcon72x72@2x.png | ||
| 22 | tools/darwin/packaging/media/ios/rounded/AppIcon76x76.png | ||
| 23 | tools/darwin/packaging/media/ios/rounded/AppIcon76x76@2x.png) | ||
| 24 | 27 | ||
| 25 | foreach(resource IN LISTS BUNDLE_RESOURCES) | 28 | target_sources(${APP_NAME_LC} PRIVATE ${BUNDLE_RESOURCES}) |
| 26 | configure_file(${CORE_SOURCE_DIR}/${resource} ${PACKAGE_OUTPUT_DIR}/${APP_NAME}.app COPYONLY) | 29 | foreach(file IN LISTS BUNDLE_RESOURCES) |
| 30 | set_source_files_properties(${file} PROPERTIES MACOSX_PACKAGE_LOCATION ${RESOURCE_LOCATION}) | ||
| 27 | endforeach() | 31 | endforeach() |
| 28 | configure_file(${CORE_SOURCE_DIR}/xbmc/platform/darwin/ios/English.lproj/InfoPlist.strings | ||
| 29 | ${PACKAGE_OUTPUT_DIR}/${APP_NAME}.app/English.lproj/InfoPlist.strings COPYONLY) | ||
| 30 | 32 | ||
| 31 | configure_file(${CORE_SOURCE_DIR}/xbmc/platform/darwin/ios/Info.plist.in | 33 | target_sources(${APP_NAME_LC} PRIVATE ${CORE_SOURCE_DIR}/xbmc/platform/darwin/ios/English.lproj/InfoPlist.strings) |
| 32 | ${PACKAGE_OUTPUT_DIR}/${APP_NAME}.app/Info.plist @ONLY) | 34 | set_source_files_properties(${CORE_SOURCE_DIR}/xbmc/platform/darwin/ios/English.lproj/InfoPlist.strings PROPERTIES MACOSX_PACKAGE_LOCATION "${RESOURCE_LOCATION}/English.lproj") |
| 35 | |||
| 36 | # Options for code signing propagated as env vars to Codesign.command via Xcode | ||
| 37 | set(IOS_CODE_SIGN_IDENTITY "" CACHE STRING "Code Sign Identity") | ||
| 38 | if(IOS_CODE_SIGN_IDENTITY) | ||
| 39 | set_target_properties(${APP_NAME_LC} PROPERTIES XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED TRUE | ||
| 40 | XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY ${IOS_CODE_SIGN_IDENTITY}) | ||
| 41 | endif() | ||
| 42 | |||
| 43 | add_custom_command(TARGET ${APP_NAME_LC} POST_BUILD | ||
| 44 | # TODO: Remove in sync with CopyRootFiles-ios expecting the ".bin" file | ||
| 45 | COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:${APP_NAME_LC}> | ||
| 46 | $<TARGET_FILE_DIR:${APP_NAME_LC}>/${APP_NAME}.bin | ||
| 33 | 47 | ||
| 34 | add_custom_target(bundle | ||
| 35 | COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:${APP_NAME_LC}> ${PACKAGE_OUTPUT_DIR}/${APP_NAME}.app/${APP_NAME}.bin | ||
| 36 | COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/DllPaths_generated.h | 48 | COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/DllPaths_generated.h |
| 37 | ${CMAKE_BINARY_DIR}/xbmc/DllPaths_generated.h | 49 | ${CMAKE_BINARY_DIR}/xbmc/DllPaths_generated.h |
| 38 | COMMAND "ACTION=build" | 50 | COMMAND "ACTION=build" |
| 39 | "TARGET_BUILD_DIR=${PACKAGE_OUTPUT_DIR}" | 51 | "TARGET_BUILD_DIR=$<TARGET_FILE_DIR:${APP_NAME_LC}>/.." |
| 40 | "TARGET_NAME=${APP_NAME}.app" | 52 | "TARGET_NAME=${APP_NAME}.app" |
| 41 | "APP_NAME=${APP_NAME}" | 53 | "APP_NAME=${APP_NAME}" |
| 42 | "PRODUCT_NAME=${APP_NAME}" | 54 | "PRODUCT_NAME=${APP_NAME}" |
| @@ -44,15 +56,22 @@ add_custom_target(bundle | |||
| 44 | "SRCROOT=${CMAKE_BINARY_DIR}" | 56 | "SRCROOT=${CMAKE_BINARY_DIR}" |
| 45 | ${CORE_SOURCE_DIR}/tools/darwin/Support/CopyRootFiles-ios.command | 57 | ${CORE_SOURCE_DIR}/tools/darwin/Support/CopyRootFiles-ios.command |
| 46 | COMMAND "XBMC_DEPENDS=${DEPENDS_PATH}" | 58 | COMMAND "XBMC_DEPENDS=${DEPENDS_PATH}" |
| 47 | "TARGET_BUILD_DIR=${PACKAGE_OUTPUT_DIR}" | 59 | "TARGET_BUILD_DIR=$<TARGET_FILE_DIR:${APP_NAME_LC}>/.." |
| 48 | "TARGET_NAME=${APP_NAME}.app" | 60 | "TARGET_NAME=${APP_NAME}.app" |
| 49 | "APP_NAME=${APP_NAME}" | 61 | "APP_NAME=${APP_NAME}" |
| 50 | "PRODUCT_NAME=${APP_NAME}" | 62 | "PRODUCT_NAME=${APP_NAME}" |
| 51 | "FULL_PRODUCT_NAME=${APP_NAME}.app" | 63 | "FULL_PRODUCT_NAME=${APP_NAME}.app" |
| 52 | "WRAPPER_EXTENSION=app" | 64 | "WRAPPER_EXTENSION=app" |
| 53 | "SRCROOT=${CMAKE_BINARY_DIR}" | 65 | "SRCROOT=${CMAKE_BINARY_DIR}" |
| 54 | ${CORE_SOURCE_DIR}/tools/darwin/Support/copyframeworks-ios.command) | 66 | ${CORE_SOURCE_DIR}/tools/darwin/Support/copyframeworks-ios.command |
| 55 | add_dependencies(bundle ${APP_NAME_LC}) | 67 | COMMAND "XBMC_DEPENDS_ROOT=${NATIVEPREFIX}/.." |
| 68 | "PLATFORM_NAME=${PLATFORM}" | ||
| 69 | "CODESIGNING_FOLDER_PATH=$<TARGET_FILE_DIR:${APP_NAME_LC}>" | ||
| 70 | "BUILT_PRODUCTS_DIR=$<TARGET_FILE_DIR:${APP_NAME_LC}>/.." | ||
| 71 | "WRAPPER_NAME=${APP_NAME}.app" | ||
| 72 | "APP_NAME=${APP_NAME}" | ||
| 73 | ${CORE_SOURCE_DIR}/tools/darwin/Support/Codesign.command | ||
| 74 | ) | ||
| 56 | 75 | ||
| 57 | set(DEPENDS_ROOT_FOR_XCODE ${NATIVEPREFIX}/..) | 76 | set(DEPENDS_ROOT_FOR_XCODE ${NATIVEPREFIX}/..) |
| 58 | configure_file(${CORE_SOURCE_DIR}/tools/darwin/packaging/ios/mkdeb-ios.sh.in | 77 | configure_file(${CORE_SOURCE_DIR}/tools/darwin/packaging/ios/mkdeb-ios.sh.in |
| @@ -61,14 +80,6 @@ configure_file(${CORE_SOURCE_DIR}/tools/darwin/packaging/migrate_to_kodi_ios.sh. | |||
| 61 | ${CMAKE_BINARY_DIR}/tools/darwin/packaging/migrate_to_kodi_ios.sh @ONLY) | 80 | ${CMAKE_BINARY_DIR}/tools/darwin/packaging/migrate_to_kodi_ios.sh @ONLY) |
| 62 | 81 | ||
| 63 | add_custom_target(deb | 82 | add_custom_target(deb |
| 64 | COMMAND "XBMC_DEPENDS_ROOT=${NATIVEPREFIX}/.." | ||
| 65 | "PLATFORM_NAME=${PLATFORM}" | ||
| 66 | "CODESIGNING_FOLDER_PATH=${PACKAGE_OUTPUT_DIR}/${APP_NAME}.app" | ||
| 67 | "BUILT_PRODUCTS_DIR=${PACKAGE_OUTPUT_DIR}" | ||
| 68 | "WRAPPER_NAME=${APP_NAME}.app" | ||
| 69 | "APP_NAME=${APP_NAME}" | ||
| 70 | "CODE_SIGN_IDENTITY=\"\"" | ||
| 71 | ${CORE_SOURCE_DIR}/tools/darwin/Support/Codesign.command | ||
| 72 | COMMAND sh ./mkdeb-ios.sh ${CORE_BUILD_CONFIG} | 83 | COMMAND sh ./mkdeb-ios.sh ${CORE_BUILD_CONFIG} |
| 73 | WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/tools/darwin/packaging/ios) | 84 | WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/tools/darwin/packaging/ios) |
| 74 | add_dependencies(deb bundle) | 85 | add_dependencies(deb ${APP_NAME_LC}) |
diff --git a/project/cmake/scripts/linux/ArchSetup.cmake b/project/cmake/scripts/linux/ArchSetup.cmake index cae0bb8..bcd70df 100644 --- a/project/cmake/scripts/linux/ArchSetup.cmake +++ b/project/cmake/scripts/linux/ArchSetup.cmake | |||
| @@ -39,3 +39,7 @@ if(CMAKE_BUILD_TYPE STREQUAL Coverage) | |||
| 39 | set(COVERAGE_DEPENDS "\${APP_NAME_LC}" "\${APP_NAME_LC}-test") | 39 | set(COVERAGE_DEPENDS "\${APP_NAME_LC}" "\${APP_NAME_LC}-test") |
| 40 | set(COVERAGE_EXCLUDES */test/* lib/* */lib/*) | 40 | set(COVERAGE_EXCLUDES */test/* lib/* */lib/*) |
| 41 | endif() | 41 | endif() |
| 42 | |||
| 43 | if(ENABLE_MIR) | ||
| 44 | set(ENABLE_VDPAU OFF CACHE BOOL "Disabling VDPAU since no Mir support" FORCE) | ||
| 45 | endif() | ||
diff --git a/project/cmake/scripts/linux/Install.cmake b/project/cmake/scripts/linux/Install.cmake index 5458707..43e2e5e 100644 --- a/project/cmake/scripts/linux/Install.cmake +++ b/project/cmake/scripts/linux/Install.cmake | |||
| @@ -137,9 +137,11 @@ install(FILES ${CORE_SOURCE_DIR}/privacy-policy.txt | |||
| 137 | COMPONENT kodi) | 137 | COMPONENT kodi) |
| 138 | 138 | ||
| 139 | # Install kodi-tools-texturepacker | 139 | # Install kodi-tools-texturepacker |
| 140 | install(PROGRAMS ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/texturepacker/TexturePacker | 140 | if(NOT WITH_TEXTUREPACKER) |
| 141 | DESTINATION ${bindir} | 141 | install(PROGRAMS ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/texturepacker/TexturePacker |
| 142 | COMPONENT kodi-tools-texturepacker) | 142 | DESTINATION ${bindir} |
| 143 | COMPONENT kodi-tools-texturepacker) | ||
| 144 | endif() | ||
| 143 | 145 | ||
| 144 | # Install kodi-addon-dev headers | 146 | # Install kodi-addon-dev headers |
| 145 | install(FILES ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_vfs_types.h | 147 | install(FILES ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_vfs_types.h |
| @@ -152,12 +154,14 @@ install(FILES ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/kod | |||
| 152 | ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/libXBMC_addon.h | 154 | ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/libXBMC_addon.h |
| 153 | ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/libXBMC_codec.h | 155 | ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/libXBMC_codec.h |
| 154 | ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/libXBMC_pvr.h | 156 | ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/libXBMC_pvr.h |
| 157 | ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/libKODI_game.h | ||
| 155 | ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_addon_cpp_dll.h | 158 | ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_addon_cpp_dll.h |
| 156 | ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_addon_dll.h | 159 | ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_addon_dll.h |
| 157 | ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_addon_types.h | 160 | ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_addon_types.h |
| 158 | ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_codec_types.h | 161 | ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_codec_types.h |
| 159 | ${CORE_SOURCE_DIR}/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxPacket.h | 162 | ${CORE_SOURCE_DIR}/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxPacket.h |
| 160 | ${CORE_SOURCE_DIR}/xbmc/filesystem/IFileTypes.h | 163 | ${CORE_SOURCE_DIR}/xbmc/filesystem/IFileTypes.h |
| 164 | ${CORE_SOURCE_DIR}/xbmc/input/XBMC_vkeys.h | ||
| 161 | DESTINATION ${includedir}/${APP_NAME_LC} | 165 | DESTINATION ${includedir}/${APP_NAME_LC} |
| 162 | COMPONENT kodi-addon-dev) | 166 | COMPONENT kodi-addon-dev) |
| 163 | 167 | ||
| @@ -310,6 +314,14 @@ install(FILES ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/kod | |||
| 310 | DESTINATION ${includedir}/${APP_NAME_LC} | 314 | DESTINATION ${includedir}/${APP_NAME_LC} |
| 311 | COMPONENT kodi-peripheral-dev) | 315 | COMPONENT kodi-peripheral-dev) |
| 312 | 316 | ||
| 317 | # Install kodi-game-dev | ||
| 318 | install(FILES ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_game_callbacks.h | ||
| 319 | ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_game_dll.h | ||
| 320 | ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_game_types.h | ||
| 321 | DESTINATION ${includedir}/${APP_NAME_LC} | ||
| 322 | COMPONENT kodi-game-dev) | ||
| 323 | |||
| 324 | |||
| 313 | # Install XBT skin files | 325 | # Install XBT skin files |
| 314 | foreach(texture ${XBT_FILES}) | 326 | foreach(texture ${XBT_FILES}) |
| 315 | string(REPLACE "${CMAKE_BINARY_DIR}/" "" dir ${texture}) | 327 | string(REPLACE "${CMAKE_BINARY_DIR}/" "" dir ${texture}) |
diff --git a/project/cmake/scripts/osx/Macros.cmake b/project/cmake/scripts/osx/Macros.cmake index 0d04439..52f87d1 100644 --- a/project/cmake/scripts/osx/Macros.cmake +++ b/project/cmake/scripts/osx/Macros.cmake | |||
| @@ -2,7 +2,7 @@ function(core_link_library lib wraplib) | |||
| 2 | if(CMAKE_GENERATOR MATCHES "Unix Makefiles" OR CMAKE_GENERATOR STREQUAL Ninja) | 2 | if(CMAKE_GENERATOR MATCHES "Unix Makefiles" OR CMAKE_GENERATOR STREQUAL Ninja) |
| 3 | set(wrapper_obj cores/dll-loader/exports/CMakeFiles/wrapper.dir/wrapper.c.o) | 3 | set(wrapper_obj cores/dll-loader/exports/CMakeFiles/wrapper.dir/wrapper.c.o) |
| 4 | elseif(CMAKE_GENERATOR MATCHES "Xcode") | 4 | elseif(CMAKE_GENERATOR MATCHES "Xcode") |
| 5 | set(wrapper_obj cores/dll-loader/exports/kodi.build/$(CONFIGURATION)/wrapper.build/Objects-$(CURRENT_VARIANT)/$(CURRENT_ARCH)/wrapper.o) | 5 | set(wrapper_obj cores/dll-loader/exports/kodi.build/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/wrapper.build/Objects-$(CURRENT_VARIANT)/$(CURRENT_ARCH)/wrapper.o) |
| 6 | else() | 6 | else() |
| 7 | message(FATAL_ERROR "Unsupported generator in core_link_library") | 7 | message(FATAL_ERROR "Unsupported generator in core_link_library") |
| 8 | endif() | 8 | endif() |
| @@ -17,6 +17,13 @@ function(core_link_library lib wraplib) | |||
| 17 | set(link_lib $<TARGET_FILE:${lib}>) | 17 | set(link_lib $<TARGET_FILE:${lib}>) |
| 18 | set(check_arg ${ARGV2}) | 18 | set(check_arg ${ARGV2}) |
| 19 | set(data_arg ${ARGV3}) | 19 | set(data_arg ${ARGV3}) |
| 20 | |||
| 21 | # iOS: EFFECTIVE_PLATFORM_NAME is not resolved | ||
| 22 | # http://public.kitware.com/pipermail/cmake/2016-March/063049.html | ||
| 23 | if(CORE_SYSTEM_NAME STREQUAL ios AND CMAKE_GENERATOR STREQUAL Xcode) | ||
| 24 | get_target_property(dir ${lib} BINARY_DIR) | ||
| 25 | set(link_lib ${dir}/${CORE_BUILD_CONFIG}/${CMAKE_STATIC_LIBRARY_PREFIX}${lib}${CMAKE_STATIC_LIBRARY_SUFFIX}) | ||
| 26 | endif() | ||
| 20 | else() | 27 | else() |
| 21 | set(target ${ARGV2}) | 28 | set(target ${ARGV2}) |
| 22 | set(link_lib ${lib}) | 29 | set(link_lib ${lib}) |
diff --git a/project/cmake/scripts/windows/tools/patch.cmake b/project/cmake/scripts/windows/tools/patch.cmake new file mode 100644 index 0000000..0ef2952 --- /dev/null +++ b/project/cmake/scripts/windows/tools/patch.cmake | |||
| @@ -0,0 +1,37 @@ | |||
| 1 | find_program(PATCH_FOUND NAMES patch patch.exe) | ||
| 2 | if(PATCH_FOUND) | ||
| 3 | message(STATUS "patch utility found at ${PATCH_FOUND}") | ||
| 4 | else() | ||
| 5 | set(PATCH_ARCHIVE_NAME "patch-2.5.9-7-bin-1") | ||
| 6 | set(PATCH_ARCHIVE "${PATCH_ARCHIVE_NAME}.zip") | ||
| 7 | set(PATCH_URL "${KODI_MIRROR}/build-deps/win32/${PATCH_ARCHIVE}") | ||
| 8 | set(PATCH_DOWNLOAD ${BUILD_DIR}/download/${PATCH_ARCHIVE}) | ||
| 9 | |||
| 10 | # download the archive containing patch.exe | ||
| 11 | message(STATUS "Downloading patch utility from ${PATCH_URL}...") | ||
| 12 | file(DOWNLOAD "${PATCH_URL}" "${PATCH_DOWNLOAD}" STATUS PATCH_DL_STATUS LOG PATCH_LOG SHOW_PROGRESS) | ||
| 13 | list(GET PATCH_DL_STATUS 0 PATCH_RETCODE) | ||
| 14 | if(NOT PATCH_RETCODE EQUAL 0) | ||
| 15 | message(FATAL_ERROR "ERROR downloading ${PATCH_URL} - status: ${PATCH_DL_STATUS} log: ${PATCH_LOG}") | ||
| 16 | endif() | ||
| 17 | |||
| 18 | # extract the archive containing patch.exe | ||
| 19 | execute_process(COMMAND ${CMAKE_COMMAND} -E tar xzvf ${PATCH_DOWNLOAD} | ||
| 20 | WORKING_DIRECTORY ${BUILD_DIR}) | ||
| 21 | |||
| 22 | # make sure the extraction worked and that patch.exe is there | ||
| 23 | set(PATCH_PATH ${BUILD_DIR}/${PATCH_ARCHIVE_NAME}) | ||
| 24 | set(PATCH_BINARY_PATH ${PATCH_PATH}/bin/patch.exe) | ||
| 25 | if(NOT EXISTS ${PATCH_PATH} OR NOT EXISTS ${PATCH_BINARY_PATH}) | ||
| 26 | message(FATAL_ERROR "ERROR extracting patch utility from ${PATCH_PATH}") | ||
| 27 | endif() | ||
| 28 | |||
| 29 | # copy patch.exe into the output directory | ||
| 30 | file(INSTALL ${PATCH_BINARY_PATH} DESTINATION ${ADDON_DEPENDS_PATH}/bin) | ||
| 31 | |||
| 32 | # make sure that cmake can find the copied patch.exe | ||
| 33 | find_program(PATCH_FOUND NAMES patch patch.exe) | ||
| 34 | if(NOT PATCH_FOUND) | ||
| 35 | message(FATAL_ERROR "ERROR installing patch utility from ${PATCH_BINARY_PATH} to ${ADDON_DEPENDS_PATH}/bin") | ||
| 36 | endif() | ||
| 37 | endif() | ||
