changeset 454:59ecea46e2ff

sync
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 30 Jun 2020 09:33:50 +0200
parents 1351ca908f9d
children 32a7a591ebae
files Plugin/Plugin.cpp Resources/Orthanc/CMake/DownloadOrthancFramework.cmake
diffstat 2 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/Plugin/Plugin.cpp	Wed Jun 24 17:33:19 2020 +0200
+++ b/Plugin/Plugin.cpp	Tue Jun 30 09:33:50 2020 +0200
@@ -455,7 +455,12 @@
     assert(DisplayPerformanceWarning(context));
 
     OrthancPlugins::SetGlobalContext(context);
+    
+#if defined(ORTHANC_FRAMEWORK_VERSION_IS_ABOVE)  // This indicates Orthanc framework >= 1.7.2
     Orthanc::Logging::InitializePluginContext(context);
+#else
+    Orthanc::Logging::Initialize(context);
+#endif
 
     /* Check the version of the Orthanc core */
     if (OrthancPluginCheckVersion(context) == 0)
--- a/Resources/Orthanc/CMake/DownloadOrthancFramework.cmake	Wed Jun 24 17:33:19 2020 +0200
+++ b/Resources/Orthanc/CMake/DownloadOrthancFramework.cmake	Tue Jun 30 09:33:50 2020 +0200
@@ -399,7 +399,8 @@
   include(${CMAKE_CURRENT_LIST_DIR}/AutoGeneratedCode.cmake)
   set(EMBED_RESOURCES_PYTHON ${CMAKE_CURRENT_LIST_DIR}/EmbedResources.py)
 
-  if (NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")
+  if (NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "Windows" AND
+      NOT ORTHANC_FRAMEWORK_STATIC)
     # Look for mandatory dependency JsonCpp (cf. JsonCppConfiguration.cmake)
     find_path(JSONCPP_INCLUDE_DIR json/reader.h
       /usr/include/jsoncpp