Mercurial > hg > orthanc-stone
diff 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 |
line wrap: on
line diff
--- a/Framework/Orthanc/Resources/CMake/DownloadPackage.cmake Wed Oct 26 12:14:03 2016 +0200 +++ b/Framework/Orthanc/Resources/CMake/DownloadPackage.cmake Wed Nov 09 14:14:34 2016 +0100 @@ -15,12 +15,18 @@ ## Setup the patch command-line tool ## -if ("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Windows") - set(PATCH_EXECUTABLE ${CMAKE_SOURCE_DIR}/Resources/ThirdParty/patch/patch.exe) -else () - find_program(PATCH_EXECUTABLE patch) - if (${PATCH_EXECUTABLE} MATCHES "PATCH_EXECUTABLE-NOTFOUND") - message(FATAL_ERROR "Please install the 'patch' standard command-line tool") +if (NOT ORTHANC_DISABLE_PATCH) + if ("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Windows") + set(PATCH_EXECUTABLE ${CMAKE_CURRENT_LIST_DIR}/../ThirdParty/patch/patch.exe) + if (NOT EXISTS ${PATCH_EXECUTABLE}) + message(FATAL_ERROR "Unable to find the patch.exe tool that is shipped with Orthanc") + endif() + + else () + find_program(PATCH_EXECUTABLE patch) + if (${PATCH_EXECUTABLE} MATCHES "PATCH_EXECUTABLE-NOTFOUND") + message(FATAL_ERROR "Please install the 'patch' standard command-line tool") + endif() endif() endif()