comparison Framework/Orthanc/Resources/CMake/DownloadPackage.cmake @ 12:9220cf4a63d5

sync
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 09 Nov 2016 14:14:34 +0100
parents 2dbe613f6c93
children
comparison
equal deleted inserted replaced
11:4b7e0244881f 12:9220cf4a63d5
13 13
14 ## 14 ##
15 ## Setup the patch command-line tool 15 ## Setup the patch command-line tool
16 ## 16 ##
17 17
18 if ("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Windows") 18 if (NOT ORTHANC_DISABLE_PATCH)
19 set(PATCH_EXECUTABLE ${CMAKE_SOURCE_DIR}/Resources/ThirdParty/patch/patch.exe) 19 if ("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Windows")
20 else () 20 set(PATCH_EXECUTABLE ${CMAKE_CURRENT_LIST_DIR}/../ThirdParty/patch/patch.exe)
21 find_program(PATCH_EXECUTABLE patch) 21 if (NOT EXISTS ${PATCH_EXECUTABLE})
22 if (${PATCH_EXECUTABLE} MATCHES "PATCH_EXECUTABLE-NOTFOUND") 22 message(FATAL_ERROR "Unable to find the patch.exe tool that is shipped with Orthanc")
23 message(FATAL_ERROR "Please install the 'patch' standard command-line tool") 23 endif()
24
25 else ()
26 find_program(PATCH_EXECUTABLE patch)
27 if (${PATCH_EXECUTABLE} MATCHES "PATCH_EXECUTABLE-NOTFOUND")
28 message(FATAL_ERROR "Please install the 'patch' standard command-line tool")
29 endif()
24 endif() 30 endif()
25 endif() 31 endif()
26 32
27 33
28 34