# HG changeset patch # User Sebastien Jodogne # Date 1478596043 -3600 # Node ID 045e251f9c4da852d6d2ed978e516cef49a8e455 # Parent 590958f541cbe257bcd7d7287d6652c84987142c fix diff -r 590958f541cb -r 045e251f9c4d CMakeLists.txt --- a/CMakeLists.txt Tue Nov 08 09:58:20 2016 +0100 +++ b/CMakeLists.txt Tue Nov 08 10:07:23 2016 +0100 @@ -40,6 +40,7 @@ mark_as_advanced(USE_GTEST_DEBIAN_SOURCE_PACKAGE) set(ORTHANC_ROOT ${CMAKE_SOURCE_DIR}/Orthanc) +set(ORTHANC_DISABLE_PATCH ON) # No need for the "patch" command-line tool include(CheckIncludeFiles) include(CheckIncludeFileCXX) include(CheckLibraryExists) diff -r 590958f541cb -r 045e251f9c4d Orthanc/Resources/CMake/DownloadPackage.cmake --- a/Orthanc/Resources/CMake/DownloadPackage.cmake Tue Nov 08 09:58:20 2016 +0100 +++ b/Orthanc/Resources/CMake/DownloadPackage.cmake Tue Nov 08 10:07:23 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()