comparison CMakeLists.txt @ 64:5fb01c588287

updated to Orthanc Framework 1.12.1
author Alain Mazy <am@osimis.io>
date Wed, 11 Oct 2023 15:58:27 +0200
parents bb2842b670d1
children 1078942460cc
comparison
equal deleted inserted replaced
63:9789c6003e9d 64:5fb01c588287
22 22
23 if (ORTHANC_PLUGIN_VERSION STREQUAL "mainline") 23 if (ORTHANC_PLUGIN_VERSION STREQUAL "mainline")
24 set(ORTHANC_FRAMEWORK_VERSION "mainline") 24 set(ORTHANC_FRAMEWORK_VERSION "mainline")
25 set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "hg") 25 set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "hg")
26 else() 26 else()
27 set(ORTHANC_FRAMEWORK_VERSION "1.11.3") 27 set(ORTHANC_FRAMEWORK_VERSION "1.12.1")
28 set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "web") 28 set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "web")
29 endif() 29 endif()
30 30
31 31
32 # Parameters of the build 32 # Parameters of the build
33 set(ORTHANC_FRAMEWORK_SOURCE "${ORTHANC_FRAMEWORK_DEFAULT_SOURCE}" CACHE STRING "Source of the Orthanc source code (can be \"hg\", \"archive\", \"web\" or \"path\")") 33 set(ORTHANC_FRAMEWORK_SOURCE "${ORTHANC_FRAMEWORK_DEFAULT_SOURCE}" CACHE STRING "Source of the Orthanc source code (can be \"hg\", \"archive\", \"web\" or \"path\")")
34 set(ORTHANC_FRAMEWORK_ARCHIVE "" CACHE STRING "Path to the Orthanc archive, if ORTHANC_FRAMEWORK_SOURCE is \"archive\"") 34 set(ORTHANC_FRAMEWORK_ARCHIVE "" CACHE STRING "Path to the Orthanc archive, if ORTHANC_FRAMEWORK_SOURCE is \"archive\"")
35 set(ORTHANC_FRAMEWORK_ROOT "" CACHE STRING "Path to the Orthanc source directory, if ORTHANC_FRAMEWORK_SOURCE is \"path\"") 35 set(ORTHANC_FRAMEWORK_ROOT "" CACHE STRING "Path to the Orthanc source directory, if ORTHANC_FRAMEWORK_SOURCE is \"path\"")
36 set(ORTHANC_SDK_VERSION "1.11.3" CACHE STRING "Version of the Orthanc plugin SDK to use, if not using the system version (can be \"1.5.0\", \"1.11.3\")") 36 set(ORTHANC_SDK_VERSION "1.12.1" CACHE STRING "Version of the Orthanc plugin SDK to use, if not using the system version (can be \"1.5.0\", \"1.12.1\")")
37 37
38 # Advanced parameters to fine-tune linking against system libraries 38 # Advanced parameters to fine-tune linking against system libraries
39 set(USE_SYSTEM_ORTHANC_SDK ON CACHE BOOL "Use the system version of the Orthanc plugin SDK") 39 set(USE_SYSTEM_ORTHANC_SDK ON CACHE BOOL "Use the system version of the Orthanc plugin SDK")
40 40
41 41
83 if (STATIC_BUILD OR NOT USE_SYSTEM_ORTHANC_SDK) 83 if (STATIC_BUILD OR NOT USE_SYSTEM_ORTHANC_SDK)
84 if (ORTHANC_SDK_VERSION STREQUAL "1.5.0") 84 if (ORTHANC_SDK_VERSION STREQUAL "1.5.0")
85 include_directories(${CMAKE_SOURCE_DIR}/Resources/Orthanc/Sdk-1.5.0) 85 include_directories(${CMAKE_SOURCE_DIR}/Resources/Orthanc/Sdk-1.5.0)
86 elseif (ORTHANC_SDK_VERSION STREQUAL "1.11.3") 86 elseif (ORTHANC_SDK_VERSION STREQUAL "1.11.3")
87 include_directories(${CMAKE_SOURCE_DIR}/Resources/Orthanc/Sdk-1.11.3) 87 include_directories(${CMAKE_SOURCE_DIR}/Resources/Orthanc/Sdk-1.11.3)
88 elseif (ORTHANC_SDK_VERSION STREQUAL "1.12.1")
89 include_directories(${CMAKE_SOURCE_DIR}/Resources/Orthanc/Sdk-1.12.1)
88 else() 90 else()
89 message(FATAL_ERROR "Unsupported version of the Orthanc plugin SDK: ${ORTHANC_SDK_VERSION}") 91 message(FATAL_ERROR "Unsupported version of the Orthanc plugin SDK: ${ORTHANC_SDK_VERSION}")
90 endif() 92 endif()
91 else () 93 else ()
92 CHECK_INCLUDE_FILE_CXX(orthanc/OrthancCDatabasePlugin.h HAVE_ORTHANC_H) 94 CHECK_INCLUDE_FILE_CXX(orthanc/OrthancCDatabasePlugin.h HAVE_ORTHANC_H)
151 ${PLUGIN_RESOURCES} 153 ${PLUGIN_RESOURCES}
152 ${ORTHANC_CORE_SOURCES} 154 ${ORTHANC_CORE_SOURCES}
153 ${AUTOGENERATED_SOURCES} 155 ${AUTOGENERATED_SOURCES}
154 ) 156 )
155 157
158 DefineSourceBasenameForTarget(OrthancTransfers)
159
156 message("Setting the version of the library to ${ORTHANC_PLUGIN_VERSION}") 160 message("Setting the version of the library to ${ORTHANC_PLUGIN_VERSION}")
157 161
158 add_definitions( 162 add_definitions(
159 -DORTHANC_PLUGIN_VERSION="${ORTHANC_PLUGIN_VERSION}" 163 -DORTHANC_PLUGIN_VERSION="${ORTHANC_PLUGIN_VERSION}"
160 -DHAS_ORTHANC_EXCEPTION=1 164 -DHAS_ORTHANC_EXCEPTION=1