Mercurial > hg > orthanc-databases
changeset 197:a57ca58c538a
CMake option "ORTHANC_SDK_VERSION" can be set to "framework" for developers
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 28 Jan 2021 16:54:51 +0100 |
parents | 92fd27ccc60f |
children | 7335efde0d23 |
files | Resources/CMake/DatabasesPluginConfiguration.cmake Resources/CMake/DatabasesPluginParameters.cmake |
diffstat | 2 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/Resources/CMake/DatabasesPluginConfiguration.cmake Wed Jan 27 16:59:58 2021 +0100 +++ b/Resources/CMake/DatabasesPluginConfiguration.cmake Thu Jan 28 16:54:51 2021 +0100 @@ -32,6 +32,13 @@ include_directories(${ORTHANC_DATABASES_ROOT}/Resources/Orthanc/Sdk-1.5.2) elseif (ORTHANC_SDK_VERSION STREQUAL "1.5.4") include_directories(${ORTHANC_DATABASES_ROOT}/Resources/Orthanc/Sdk-1.5.4) + elseif (ORTHANC_SDK_VERSION STREQUAL "framework") + set(tmp ${ORTHANC_FRAMEWORK_ROOT}/../../OrthancServer/Plugins/Include/) + message(${tmp}) + if (NOT EXISTS ${tmp}/orthanc/OrthancCDatabasePlugin.h) + message(FATAL_ERROR "Your copy of the Orthanc framework doesn't contain the Orthanc plugin SDK") + endif() + include_directories(${tmp}) else() message(FATAL_ERROR "Unsupported version of the Orthanc plugin SDK: ${ORTHANC_SDK_VERSION}") endif()
--- a/Resources/CMake/DatabasesPluginParameters.cmake Wed Jan 27 16:59:58 2021 +0100 +++ b/Resources/CMake/DatabasesPluginParameters.cmake Thu Jan 28 16:54:51 2021 +0100 @@ -25,7 +25,7 @@ # 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 "1.5.4" 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\", or \"1.5.4\")") +set(ORTHANC_SDK_VERSION "1.5.4" 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\", or \"framework\")") include(${CMAKE_CURRENT_LIST_DIR}/DatabasesFrameworkParameters.cmake)