Mercurial > hg > orthanc
comparison Resources/CMake/DownloadPackage.cmake @ 1537:fbf763bb1fa3
error detection in patches
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 13 Aug 2015 15:25:38 +0200 |
parents | 929bf8c2123d |
children | 8b6d8f9b9f71 |
comparison
equal
deleted
inserted
replaced
1536:1b03676d68c2 | 1537:fbf763bb1fa3 |
---|---|
6 macro(GetUrlExtension TargetVariable Url) | 6 macro(GetUrlExtension TargetVariable Url) |
7 #string(REGEX REPLACE "^.*/[^.]*\\." "" TMP "${Url}") | 7 #string(REGEX REPLACE "^.*/[^.]*\\." "" TMP "${Url}") |
8 string(REGEX REPLACE "^.*\\." "" TMP "${Url}") | 8 string(REGEX REPLACE "^.*\\." "" TMP "${Url}") |
9 string(TOLOWER "${TMP}" "${TargetVariable}") | 9 string(TOLOWER "${TMP}" "${TargetVariable}") |
10 endmacro() | 10 endmacro() |
11 | |
12 | |
13 | |
14 ## | |
15 ## Setup the patch command-line tool | |
16 ## | |
17 | |
18 if ("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Windows") | |
19 set(PATCH_EXECUTABLE ${CMAKE_SOURCE_DIR}/Resources/patch/patch.exe) | |
20 else () | |
21 find_program(PATCH_EXECUTABLE patch) | |
22 if (${PATCH_EXECUTABLE} MATCHES "PATCH_EXECUTABLE-NOTFOUND") | |
23 message(FATAL_ERROR "Please install the 'patch' standard command-line tool") | |
24 endif() | |
25 endif() | |
26 | |
11 | 27 |
12 | 28 |
13 ## | 29 ## |
14 ## Check the existence of the required decompression tools | 30 ## Check the existence of the required decompression tools |
15 ## | 31 ## |