diff options
| author | manuel <manuel@mausz.at> | 2016-12-14 02:24:46 +0100 |
|---|---|---|
| committer | manuel <manuel@mausz.at> | 2016-12-14 02:24:46 +0100 |
| commit | a662ba767a6444b76b0394eb60380eee3e839db7 (patch) | |
| tree | a13d904b75e8d899e2b11df3db5bd2a8a47b0acb /project/cmake/scripts/windows | |
| parent | 2818eb9609d118212211cd657134974f10428b31 (diff) | |
| download | kodi-pvr-build-a662ba767a6444b76b0394eb60380eee3e839db7.tar.gz kodi-pvr-build-a662ba767a6444b76b0394eb60380eee3e839db7.tar.bz2 kodi-pvr-build-a662ba767a6444b76b0394eb60380eee3e839db7.zip | |
Sync with Krypton branch
Diffstat (limited to 'project/cmake/scripts/windows')
| -rw-r--r-- | project/cmake/scripts/windows/tools/patch.cmake | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/project/cmake/scripts/windows/tools/patch.cmake b/project/cmake/scripts/windows/tools/patch.cmake deleted file mode 100644 index 0ef2952..0000000 --- a/project/cmake/scripts/windows/tools/patch.cmake +++ /dev/null | |||
| @@ -1,37 +0,0 @@ | |||
| 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() | ||
