changeset 663:b8b2bb75fde1

fix to include Stone within an Orthanc plugin
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 15 May 2019 11:51:22 +0200
parents 794278160a3f
children 9631a10ed3af
files Framework/StoneInitialization.cpp Framework/StoneInitialization.h
diffstat 2 files changed, 14 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/Framework/StoneInitialization.cpp	Wed May 15 11:07:28 2019 +0200
+++ b/Framework/StoneInitialization.cpp	Wed May 15 11:51:22 2019 +0200
@@ -22,7 +22,6 @@
 #include "StoneInitialization.h"
 
 #include <Core/OrthancException.h>
-#include <Core/Logging.h>
 
 #if !defined(ORTHANC_ENABLE_SDL)
 #  error Macro ORTHANC_ENABLE_SDL must be defined
@@ -34,9 +33,17 @@
 
 namespace OrthancStone
 {
+#if ORTHANC_ENABLE_LOGGING_PLUGIN == 1
+  void StoneInitialize(OrthancPluginContext* context)
+#else
   void StoneInitialize()
+#endif
   {
+#if ORTHANC_ENABLE_LOGGING_PLUGIN == 1
+    Orthanc::Logging::Initialize(context);
+#else
     Orthanc::Logging::Initialize();
+#endif
 
 #if ORTHANC_ENABLE_SDL == 1
     OrthancStone::SdlWindow::GlobalInitialize();
--- a/Framework/StoneInitialization.h	Wed May 15 11:07:28 2019 +0200
+++ b/Framework/StoneInitialization.h	Wed May 15 11:51:22 2019 +0200
@@ -21,9 +21,15 @@
 
 #pragma once
 
+#include <Core/Logging.h>
+
 namespace OrthancStone
 {
+#if ORTHANC_ENABLE_LOGGING_PLUGIN == 1
+  void StoneInitialize(OrthancPluginContext* context);
+#else
   void StoneInitialize();
+#endif
 
   void StoneFinalize();
 }