# HG changeset patch # User Sebastien Jodogne # Date 1478595976 -3600 # Node ID 72cb107a7346dd357dd244ce72e65ccb508eb563 # Parent 0c09d1af22f3fb8c633f0edf0c7d4d3da1253b83 option ORTHANC_DISABLE_PATCH diff -r 0c09d1af22f3 -r 72cb107a7346 Resources/CMake/DownloadPackage.cmake --- a/Resources/CMake/DownloadPackage.cmake Mon Nov 07 17:44:10 2016 +0100 +++ b/Resources/CMake/DownloadPackage.cmake Tue Nov 08 10:06:16 2016 +0100 @@ -15,16 +15,18 @@ ## Setup the patch command-line tool ## -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() +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") + 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()