Mercurial > hg > orthanc-databases
changeset 489:e8b4bb6a33e7
introduction of ORTHANC_SDK_COMPATIBLE_VERSIONS in CMake
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 22 Mar 2024 14:27:36 +0100 |
parents | 827e438439c4 |
children | b3876cbb93a2 |
files | MySQL/CMakeLists.txt Odbc/CMakeLists.txt PostgreSQL/CMakeLists.txt Resources/CMake/DatabasesPluginConfiguration.cmake Resources/CMake/DatabasesPluginParameters.cmake SQLite/CMakeLists.txt |
diffstat | 6 files changed, 53 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/MySQL/CMakeLists.txt Fri Mar 08 11:08:31 2024 +0100 +++ b/MySQL/CMakeLists.txt Fri Mar 22 14:27:36 2024 +0100 @@ -23,8 +23,17 @@ set(ORTHANC_PLUGIN_VERSION "mainline") +# This is the preferred version of the Orthanc SDK for this plugin set(ORTHANC_SDK_DEFAULT_VERSION "1.12.0") +# This is the list of the versions of the Orthanc SDK against which +# this plugin will compile +set(ORTHANC_SDK_COMPATIBLE_VERSIONS "0.9.5" "1.4.0" "1.5.2" "1.5.4" "1.9.2" "1.12.0" "1.12.3") + +# This is the minimal version of the Orthanc runtime that will provide +# best performance. If the version of the Orthanc runtime is below +# this minimal version, a warning message will be printed (but the +# plugin will still start). set(ORTHANC_OPTIMAL_VERSION_MAJOR 1) set(ORTHANC_OPTIMAL_VERSION_MINOR 12) set(ORTHANC_OPTIMAL_VERSION_REVISION 0)
--- a/Odbc/CMakeLists.txt Fri Mar 08 11:08:31 2024 +0100 +++ b/Odbc/CMakeLists.txt Fri Mar 22 14:27:36 2024 +0100 @@ -23,8 +23,17 @@ set(ORTHANC_PLUGIN_VERSION "mainline") +# This is the preferred version of the Orthanc SDK for this plugin set(ORTHANC_SDK_DEFAULT_VERSION "1.12.0") +# This is the list of the versions of the Orthanc SDK against which +# this plugin will compile +set(ORTHANC_SDK_COMPATIBLE_VERSIONS "0.9.5" "1.4.0" "1.5.2" "1.5.4" "1.9.2" "1.12.0" "1.12.3") + +# This is the minimal version of the Orthanc runtime that will provide +# best performance. If the version of the Orthanc runtime is below +# this minimal version, a warning message will be printed (but the +# plugin will still start). set(ORTHANC_OPTIMAL_VERSION_MAJOR 1) set(ORTHANC_OPTIMAL_VERSION_MINOR 12) set(ORTHANC_OPTIMAL_VERSION_REVISION 0)
--- a/PostgreSQL/CMakeLists.txt Fri Mar 08 11:08:31 2024 +0100 +++ b/PostgreSQL/CMakeLists.txt Fri Mar 22 14:27:36 2024 +0100 @@ -23,8 +23,17 @@ set(ORTHANC_PLUGIN_VERSION "mainline") +# This is the preferred version of the Orthanc SDK for this plugin set(ORTHANC_SDK_DEFAULT_VERSION "1.12.3") +# This is the list of the versions of the Orthanc SDK against which +# this plugin will compile +set(ORTHANC_SDK_COMPATIBLE_VERSIONS "1.12.3") + +# This is the minimal version of the Orthanc runtime that will provide +# best performance. If the version of the Orthanc runtime is below +# this minimal version, a warning message will be printed (but the +# plugin will still start). set(ORTHANC_OPTIMAL_VERSION_MAJOR 1) set(ORTHANC_OPTIMAL_VERSION_MINOR 12) set(ORTHANC_OPTIMAL_VERSION_REVISION 3)
--- a/Resources/CMake/DatabasesPluginConfiguration.cmake Fri Mar 08 11:08:31 2024 +0100 +++ b/Resources/CMake/DatabasesPluginConfiguration.cmake Fri Mar 22 14:27:36 2024 +0100 @@ -24,6 +24,13 @@ include(${CMAKE_CURRENT_LIST_DIR}/../Orthanc/Plugins/OrthancPluginsExports.cmake) if (STATIC_BUILD OR NOT USE_SYSTEM_ORTHANC_SDK) + if (NOT ORTHANC_SDK_VERSION STREQUAL "framework") + list(FIND ORTHANC_SDK_COMPATIBLE_VERSIONS ${ORTHANC_SDK_VERSION} tmp) + if (tmp EQUAL -1) + message(FATAL_ERROR "This database plugin is not compatible with Orthanc SDK ${ORTHANC_SDK_VERSION}") + endif() + endif() + if (ORTHANC_SDK_VERSION STREQUAL "0.9.5") set(ORTHANC_SDK_ROOT ${ORTHANC_DATABASES_ROOT}/Resources/Orthanc/Sdk-0.9.5) elseif (ORTHANC_SDK_VERSION STREQUAL "1.4.0")
--- a/Resources/CMake/DatabasesPluginParameters.cmake Fri Mar 08 11:08:31 2024 +0100 +++ b/Resources/CMake/DatabasesPluginParameters.cmake Fri Mar 22 14:27:36 2024 +0100 @@ -26,7 +26,16 @@ # Advanced parameters to fine-tune linking against system libraries set(USE_SYSTEM_ORTHANC_SDK ON CACHE BOOL "Use the system version of the Orthanc plugin SDK") -set(ORTHANC_SDK_VERSION "${ORTHANC_SDK_DEFAULT_VERSION}" CACHE STRING "Version of the Orthanc plugin SDK to use, if not using the system version (can be \"0.9.5\", \"1.4.0\", \"1.5.2\", \"1.5.4\", \"1.9.2\", \"1.12.0\", \"1.12.3\" or \"framework\")") + +# Generate the documentation about the "ORTHANC_SDK_VERSION" option +set(tmp "Version of the Orthanc plugin SDK to use, if not using the system version (can be") +foreach(version IN LISTS ORTHANC_SDK_COMPATIBLE_VERSIONS) + set(tmp "${tmp} ${version},") +endforeach() +set(tmp "${tmp} or \"framework\")") + +set(ORTHANC_SDK_VERSION "${ORTHANC_SDK_DEFAULT_VERSION}" CACHE STRING "${tmp}") + include(${CMAKE_CURRENT_LIST_DIR}/DatabasesFrameworkParameters.cmake)
--- a/SQLite/CMakeLists.txt Fri Mar 08 11:08:31 2024 +0100 +++ b/SQLite/CMakeLists.txt Fri Mar 22 14:27:36 2024 +0100 @@ -23,8 +23,17 @@ set(ORTHANC_PLUGIN_VERSION "mainline") +# This is the preferred version of the Orthanc SDK for this plugin set(ORTHANC_SDK_DEFAULT_VERSION "1.12.0") +# This is the list of the versions of the Orthanc SDK against which +# this plugin will compile +set(ORTHANC_SDK_COMPATIBLE_VERSIONS "0.9.5" "1.4.0" "1.5.2" "1.5.4" "1.9.2" "1.12.0" "1.12.3") + +# This is the minimal version of the Orthanc runtime that will provide +# best performance. If the version of the Orthanc runtime is below +# this minimal version, a warning message will be printed (but the +# plugin will still start). set(ORTHANC_OPTIMAL_VERSION_MAJOR 1) set(ORTHANC_OPTIMAL_VERSION_MINOR 12) set(ORTHANC_OPTIMAL_VERSION_REVISION 0)