comparison Resources/CMake/DownloadPackage.cmake @ 2111:64d0224595cc

more generic path
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 27 Oct 2016 11:20:12 +0200
parents 785588df2518
children 72cb107a7346
comparison
equal deleted inserted replaced
2110:5b818f677dd6 2111:64d0224595cc
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 ("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Windows")
19 set(PATCH_EXECUTABLE ${CMAKE_SOURCE_DIR}/Resources/ThirdParty/patch/patch.exe) 19 set(PATCH_EXECUTABLE ${CMAKE_CURRENT_LIST_DIR}/../ThirdParty/patch/patch.exe)
20 if (NOT EXISTS ${PATCH_EXECUTABLE})
21 message(FATAL_ERROR "Unable to find the patch.exe tool that is shipped with Orthanc")
22 endif()
23
20 else () 24 else ()
21 find_program(PATCH_EXECUTABLE patch) 25 find_program(PATCH_EXECUTABLE patch)
22 if (${PATCH_EXECUTABLE} MATCHES "PATCH_EXECUTABLE-NOTFOUND") 26 if (${PATCH_EXECUTABLE} MATCHES "PATCH_EXECUTABLE-NOTFOUND")
23 message(FATAL_ERROR "Please install the 'patch' standard command-line tool") 27 message(FATAL_ERROR "Please install the 'patch' standard command-line tool")
24 endif() 28 endif()