Mercurial > hg > orthanc-webviewer
changeset 275:3a9749b1dfce
link against system-wide Orthanc Framework
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 06 Jul 2020 11:31:08 +0200 |
parents | 52b56343d268 |
children | 1d360b822973 |
files | CMakeLists.txt Plugin/DecodedImageAdapter.h Plugin/Plugin.cpp Plugin/ViewerToolbox.cpp Resources/Orthanc/CMake/DownloadOrthancFramework.cmake |
diffstat | 5 files changed, 10 insertions(+), 21 deletions(-) [+] |
line wrap: on
line diff
--- 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}
--- 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 <OrthancPluginCppWrapper.h> #include <stdint.h> #include <json/value.h>
--- 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 <OrthancException.h> #include <SystemToolbox.h> #include <Toolbox.h> -#include <OrthancPluginCppWrapper.h> #include <boost/thread.hpp> #include <boost/lexical_cast.hpp>
--- 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 <OrthancException.h> #include <Toolbox.h> -// Gain access to ORTHANC_PLUGINS_VERSION_IS_ABOVE if Orthanc SDK <= 1.3.0 -#include <OrthancPluginCppWrapper.h> +// To gain access to ORTHANC_PLUGINS_VERSION_IS_ABOVE if Orthanc SDK <= 1.3.0 +#include "../Resources/Orthanc/Plugins/OrthancPluginCppWrapper.h" #include <json/reader.h> #include <stdexcept>
--- 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)