changeset 548:25005693297b

removed unnecessary macro ORTHANC_BUILDING_SERVER_LIBRARY
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 09 Sep 2024 13:22:44 +0200
parents b8e6e7a19424
children e620f36b8e09
files Framework/Plugins/DatabaseConstraint.cpp Framework/Plugins/DatabaseConstraint.h Framework/Plugins/ISqlLookupFormatter.cpp Framework/Plugins/ISqlLookupFormatter.h Resources/CMake/DatabasesPluginConfiguration.cmake
diffstat 5 files changed, 7 insertions(+), 46 deletions(-) [+]
line wrap: on
line diff
--- a/Framework/Plugins/DatabaseConstraint.cpp	Mon Sep 09 13:18:35 2024 +0200
+++ b/Framework/Plugins/DatabaseConstraint.cpp	Mon Sep 09 13:22:44 2024 +0200
@@ -28,21 +28,9 @@
  **/
 
 
-#if !defined(ORTHANC_BUILDING_SERVER_LIBRARY)
-#  error Macro ORTHANC_BUILDING_SERVER_LIBRARY must be defined
-#endif
-
-#if ORTHANC_BUILDING_SERVER_LIBRARY == 1
-#  include "../PrecompiledHeadersServer.h"
-#endif
-
 #include "DatabaseConstraint.h"
 
-#if ORTHANC_BUILDING_SERVER_LIBRARY == 1
-#  include "../../../OrthancFramework/Sources/OrthancException.h"
-#else
-#  include <OrthancException.h>
-#endif
+#include <OrthancException.h>
 
 #include <cassert>
 
--- a/Framework/Plugins/DatabaseConstraint.h	Mon Sep 09 13:18:35 2024 +0200
+++ b/Framework/Plugins/DatabaseConstraint.h	Mon Sep 09 13:22:44 2024 +0200
@@ -30,17 +30,6 @@
 
 #pragma once
 
-#if !defined(ORTHANC_BUILDING_SERVER_LIBRARY)
-#  error Macro ORTHANC_BUILDING_SERVER_LIBRARY must be defined
-#endif
-
-#if ORTHANC_BUILDING_SERVER_LIBRARY == 1
-#  include "../../../OrthancFramework/Sources/DicomFormat/DicomMap.h"
-#else
-// This is for the "orthanc-databases" project to reuse this file
-#  include <DicomFormat/DicomMap.h>
-#endif
-
 #define ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT 0
 
 #if ORTHANC_ENABLE_PLUGINS == 1
@@ -53,6 +42,8 @@
 #  endif
 #endif
 
+#include <DicomFormat/DicomMap.h>
+
 #include <deque>
 
 namespace Orthanc
--- a/Framework/Plugins/ISqlLookupFormatter.cpp	Mon Sep 09 13:18:35 2024 +0200
+++ b/Framework/Plugins/ISqlLookupFormatter.cpp	Mon Sep 09 13:22:44 2024 +0200
@@ -28,25 +28,12 @@
  **/
 
 
-#if !defined(ORTHANC_BUILDING_SERVER_LIBRARY)
-#  error Macro ORTHANC_BUILDING_SERVER_LIBRARY must be defined
-#endif
-
-#if ORTHANC_BUILDING_SERVER_LIBRARY == 1
-#  include "../PrecompiledHeadersServer.h"
-#endif
-
 #include "ISqlLookupFormatter.h"
 
-#if ORTHANC_BUILDING_SERVER_LIBRARY == 1
-#  include "../../../OrthancFramework/Sources/OrthancException.h"
-#  include "../../../OrthancFramework/Sources/Toolbox.h"
-#else
-#  include <OrthancException.h>
-#  include <Toolbox.h>
-#endif
+#include "DatabaseConstraint.h"
 
-#include "DatabaseConstraint.h"
+#include <OrthancException.h>
+#include <Toolbox.h>
 
 #include <cassert>
 #include <boost/lexical_cast.hpp>
--- a/Framework/Plugins/ISqlLookupFormatter.h	Mon Sep 09 13:18:35 2024 +0200
+++ b/Framework/Plugins/ISqlLookupFormatter.h	Mon Sep 09 13:22:44 2024 +0200
@@ -30,11 +30,7 @@
 
 #pragma once
 
-#if ORTHANC_BUILDING_SERVER_LIBRARY == 1
-#  include "../../../OrthancFramework/Sources/Enumerations.h"
-#else
-#  include <Enumerations.h>
-#endif
+#include <Enumerations.h>
 
 #include <boost/noncopyable.hpp>
 #include <vector>
--- a/Resources/CMake/DatabasesPluginConfiguration.cmake	Mon Sep 09 13:18:35 2024 +0200
+++ b/Resources/CMake/DatabasesPluginConfiguration.cmake	Mon Sep 09 13:22:44 2024 +0200
@@ -92,7 +92,6 @@
 
 add_definitions(
   -DHAS_ORTHANC_EXCEPTION=1
-  -DORTHANC_BUILDING_SERVER_LIBRARY=0
   -DORTHANC_ENABLE_PLUGINS=1  # To build "DatabaseConstraint.h" imported from Orthanc core
   -DORTHANC_OPTIMAL_VERSION_MAJOR=${ORTHANC_OPTIMAL_VERSION_MAJOR}
   -DORTHANC_OPTIMAL_VERSION_MINOR=${ORTHANC_OPTIMAL_VERSION_MINOR}