comparison Resources/CMake/DownloadPackage.cmake @ 2130:72cb107a7346

option ORTHANC_DISABLE_PATCH
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 08 Nov 2016 10:06:16 +0100
parents 64d0224595cc
children 47daf8022808
comparison
equal deleted inserted replaced
2129:0c09d1af22f3 2130:72cb107a7346
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_CURRENT_LIST_DIR}/../ThirdParty/patch/patch.exe) 19 if ("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Windows")
20 if (NOT EXISTS ${PATCH_EXECUTABLE}) 20 set(PATCH_EXECUTABLE ${CMAKE_CURRENT_LIST_DIR}/../ThirdParty/patch/patch.exe)
21 message(FATAL_ERROR "Unable to find the patch.exe tool that is shipped with Orthanc") 21 if (NOT EXISTS ${PATCH_EXECUTABLE})
22 endif() 22 message(FATAL_ERROR "Unable to find the patch.exe tool that is shipped with Orthanc")
23 endif()
23 24
24 else () 25 else ()
25 find_program(PATCH_EXECUTABLE patch) 26 find_program(PATCH_EXECUTABLE patch)
26 if (${PATCH_EXECUTABLE} MATCHES "PATCH_EXECUTABLE-NOTFOUND") 27 if (${PATCH_EXECUTABLE} MATCHES "PATCH_EXECUTABLE-NOTFOUND")
27 message(FATAL_ERROR "Please install the 'patch' standard command-line tool") 28 message(FATAL_ERROR "Please install the 'patch' standard command-line tool")
29 endif()
28 endif() 30 endif()
29 endif() 31 endif()
30 32
31 33
32 34