Mercurial > hg > orthanc-databases
changeset 156:710537acb488
dynamic linking against the system-wide Orthanc framework library
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 06 Jul 2020 12:40:44 +0200 |
parents | 23cf7def8e44 |
children | 275e14f57f1e |
files | MySQL/NEWS PostgreSQL/NEWS Resources/CMake/DatabasesFrameworkConfiguration.cmake Resources/CMake/DatabasesFrameworkParameters.cmake Resources/CMake/DatabasesPluginConfiguration.cmake |
diffstat | 5 files changed, 28 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/MySQL/NEWS Mon Jul 06 12:04:00 2020 +0200 +++ b/MySQL/NEWS Mon Jul 06 12:40:44 2020 +0200 @@ -7,6 +7,7 @@ * Added an advisory lock to avoid race conditions during database setup * Added "MaximumConnectionRetries" & "ConnectionRetryInterval" to configure the retries when connecting to the DB at startup +* Support of dynamic linking against the system-wide Orthanc framework library Release 2.0 (2019-01-23)
--- a/PostgreSQL/NEWS Mon Jul 06 12:04:00 2020 +0200 +++ b/PostgreSQL/NEWS Mon Jul 06 12:40:44 2020 +0200 @@ -4,6 +4,7 @@ * Added an advisory lock to avoid race conditions during database setup * Added "MaximumConnectionRetries" & "ConnectionRetryInterval" to configure the retries when connecting to the DB at startup +* Support of dynamic linking against the system-wide Orthanc framework library Release 3.2 (2019-03-01)
--- a/Resources/CMake/DatabasesFrameworkConfiguration.cmake Mon Jul 06 12:04:00 2020 +0200 +++ b/Resources/CMake/DatabasesFrameworkConfiguration.cmake Mon Jul 06 12:40:44 2020 +0200 @@ -53,14 +53,29 @@ ## Configure the Orthanc Framework ##################################################################### -# Those modules of the Orthanc framework are not needed when dealing -# with databases -set(ENABLE_MODULE_IMAGES OFF) -set(ENABLE_MODULE_JOBS OFF) -set(ENABLE_MODULE_DICOM OFF) +if (ORTHANC_FRAMEWORK_SOURCE STREQUAL "system") + link_libraries(${ORTHANC_FRAMEWORK_LIBRARIES}) -include(${ORTHANC_FRAMEWORK_ROOT}/Resources/CMake/OrthancFrameworkConfiguration.cmake) -include_directories(${ORTHANC_FRAMEWORK_ROOT}/Sources) + if (ENABLE_SQLITE_BACKEND) + add_definitions(-DORTHANC_ENABLE_SQLITE=1) + endif() + + set(USE_SYSTEM_GOOGLE_TEST ON CACHE BOOL "Use the system version of Google Test") + set(USE_GOOGLE_TEST_DEBIAN_PACKAGE OFF CACHE BOOL "Use the sources of Google Test shipped with libgtest-dev (Debian only)") + mark_as_advanced(USE_GOOGLE_TEST_DEBIAN_PACKAGE) + include(${CMAKE_SOURCE_DIR}/../Resources/Orthanc/CMake/GoogleTestConfiguration.cmake) + +else() + # Those modules of the Orthanc framework are not needed when dealing + # with databases + set(ENABLE_MODULE_IMAGES OFF) + set(ENABLE_MODULE_JOBS OFF) + set(ENABLE_MODULE_DICOM OFF) + + include(${ORTHANC_FRAMEWORK_ROOT}/Resources/CMake/OrthancFrameworkConfiguration.cmake) + include_directories(${ORTHANC_FRAMEWORK_ROOT}/Sources) +endif() + #####################################################################
--- a/Resources/CMake/DatabasesFrameworkParameters.cmake Mon Jul 06 12:04:00 2020 +0200 +++ b/Resources/CMake/DatabasesFrameworkParameters.cmake Mon Jul 06 12:40:44 2020 +0200 @@ -23,7 +23,10 @@ ##################################################################### include(${CMAKE_CURRENT_LIST_DIR}/../Orthanc/CMake/DownloadOrthancFramework.cmake) -include(${ORTHANC_FRAMEWORK_ROOT}/Resources/CMake/OrthancFrameworkParameters.cmake) + +if (NOT ORTHANC_FRAMEWORK_SOURCE STREQUAL "system") + include(${ORTHANC_FRAMEWORK_ROOT}/Resources/CMake/OrthancFrameworkParameters.cmake) +endif() #####################################################################
--- a/Resources/CMake/DatabasesPluginConfiguration.cmake Mon Jul 06 12:04:00 2020 +0200 +++ b/Resources/CMake/DatabasesPluginConfiguration.cmake Mon Jul 06 12:40:44 2020 +0200 @@ -23,8 +23,6 @@ include(${CMAKE_SOURCE_DIR}/../Resources/Orthanc/Plugins/OrthancPluginsExports.cmake) -include_directories(${ORTHANC_FRAMEWORK_ROOT}/Sources) - if (STATIC_BUILD OR NOT USE_SYSTEM_ORTHANC_SDK) if (ORTHANC_SDK_VERSION STREQUAL "0.9.5") include_directories(${ORTHANC_DATABASES_ROOT}/Resources/Orthanc/Sdk-0.9.5)