Mercurial > hg > orthanc-transfers
diff CMakeLists.txt @ 14:e1b24c9a9bd8
patch Orthanc 1.5.6
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 04 Mar 2019 16:48:25 +0100 |
parents | df314d38a4e0 |
children | 3eb5ccd37e31 |
line wrap: on
line diff
--- a/CMakeLists.txt Mon Mar 04 16:14:15 2019 +0100 +++ b/CMakeLists.txt Mon Mar 04 16:48:25 2019 +0100 @@ -26,6 +26,9 @@ else() set(ORTHANC_FRAMEWORK_VERSION "1.5.6") set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "web") + + # diff --new-file -urEb Orthanc-1.5.6.orig/ Orthanc-1.5.6 > orthanc-1.5.6.patch + set(ORTHANC_FRAMEWORK_PATCH "${CMAKE_SOURCE_DIR}/Resources/Patches/orthanc-1.5.6.patch") endif() @@ -55,6 +58,21 @@ include_directories(${ORTHANC_ROOT}) +# Possibly patch the Orthanc framework +if (DEFINED ORTHANC_FRAMEWORK_PATCH AND + NOT EXISTS "${ORTHANC_ROOT}/patched") + execute_process( + COMMAND ${PATCH_EXECUTABLE} -p0 -N -i ${ORTHANC_FRAMEWORK_PATCH} + WORKING_DIRECTORY ${CMAKE_BINARY_DIR} + RESULT_VARIABLE Failure + ) + + if (Failure) + message(FATAL_ERROR "Error while patching a file") + endif() +endif() + + # Check that the Orthanc SDK headers are available if (STATIC_BUILD OR NOT USE_SYSTEM_ORTHANC_SDK) if (ORTHANC_SDK_VERSION STREQUAL "1.4.2")