# HG changeset patch # User Sebastien Jodogne # Date 1594027868 -7200 # Node ID 3a9749b1dfceb8809d6623b3646560fd49f4ebb8 # Parent 52b56343d268b67e719cd2fbf2598c1e528f5a06 link against system-wide Orthanc Framework diff -r 52b56343d268 -r 3a9749b1dfce CMakeLists.txt --- a/CMakeLists.txt Mon Jul 06 08:57:14 2020 +0200 +++ b/CMakeLists.txt Mon Jul 06 11:31:08 2020 +0200 @@ -52,11 +52,12 @@ if (ORTHANC_FRAMEWORK_SOURCE STREQUAL "system") set(ENABLE_GOOGLE_TEST ON) include(${CMAKE_SOURCE_DIR}/Resources/Orthanc/CMake/DownloadOrthancFramework.cmake) + link_libraries(${ORTHANC_FRAMEWORK_LIBRARIES}) - include_directories( - ${CMAKE_SOURCE_DIR}/Resources/Orthanc/ - ) - link_libraries(OrthancFramework) + 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() include(${CMAKE_SOURCE_DIR}/Resources/Orthanc/CMake/DownloadOrthancFramework.cmake) include(${ORTHANC_FRAMEWORK_ROOT}/Resources/CMake/OrthancFrameworkParameters.cmake) @@ -154,10 +155,6 @@ ${ORTHANC_CORE_SOURCES} ) -include_directories( - ${CMAKE_SOURCE_DIR}/Resources/Orthanc/Plugins/ - ) - add_library(OrthancWebViewer SHARED ${AUTOGENERATED_SOURCES} diff -r 52b56343d268 -r 3a9749b1dfce Plugin/DecodedImageAdapter.h --- a/Plugin/DecodedImageAdapter.h Mon Jul 06 08:57:14 2020 +0200 +++ b/Plugin/DecodedImageAdapter.h Mon Jul 06 11:31:08 2020 +0200 @@ -21,9 +21,9 @@ #pragma once +#include "../Resources/Orthanc/Plugins/OrthancPluginCppWrapper.h" #include "Cache/ICacheFactory.h" -#include #include #include diff -r 52b56343d268 -r 3a9749b1dfce Plugin/Plugin.cpp --- a/Plugin/Plugin.cpp Mon Jul 06 08:57:14 2020 +0200 +++ b/Plugin/Plugin.cpp Mon Jul 06 11:31:08 2020 +0200 @@ -19,6 +19,7 @@ **/ +#include "../Resources/Orthanc/Plugins/OrthancPluginCppWrapper.h" #include "ViewerToolbox.h" #include "ViewerPrefetchPolicy.h" #include "DecodedImageAdapter.h" @@ -28,7 +29,6 @@ #include #include #include -#include #include #include diff -r 52b56343d268 -r 3a9749b1dfce Plugin/ViewerToolbox.cpp --- a/Plugin/ViewerToolbox.cpp Mon Jul 06 08:57:14 2020 +0200 +++ b/Plugin/ViewerToolbox.cpp Mon Jul 06 11:31:08 2020 +0200 @@ -24,8 +24,8 @@ #include #include -// Gain access to ORTHANC_PLUGINS_VERSION_IS_ABOVE if Orthanc SDK <= 1.3.0 -#include +// To gain access to ORTHANC_PLUGINS_VERSION_IS_ABOVE if Orthanc SDK <= 1.3.0 +#include "../Resources/Orthanc/Plugins/OrthancPluginCppWrapper.h" #include #include diff -r 52b56343d268 -r 3a9749b1dfce Resources/Orthanc/CMake/DownloadOrthancFramework.cmake --- a/Resources/Orthanc/CMake/DownloadOrthancFramework.cmake Mon Jul 06 08:57:14 2020 +0200 +++ b/Resources/Orthanc/CMake/DownloadOrthancFramework.cmake Mon Jul 06 11:31:08 2020 +0200 @@ -396,7 +396,7 @@ ## ## Case of the Orthanc framework installed as a shared library in a -## GNU/Linux distribution (typically Debian) +## GNU/Linux distribution (typically Debian). New in Orthanc 1.7.2. ## if (ORTHANC_FRAMEWORK_SOURCE STREQUAL "system") @@ -485,14 +485,6 @@ endif() endif() - # Optional component - Google Test - if (ENABLE_GOOGLE_TEST) - 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_CURRENT_LIST_DIR}/GoogleTestConfiguration.cmake) - endif() - # Look for Orthanc framework shared library include(CheckCXXSymbolExists)