changeset 4050:cd363608551a framework

fix paths
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 11 Jun 2020 11:44:48 +0200
parents 47e9e788224c
children c459f210f6ac
files OrthancServer/Plugins/Samples/AutomatedJpeg2kCompression/CMakeLists.txt OrthancServer/Plugins/Samples/Basic/CMakeLists.txt OrthancServer/Plugins/Samples/Common/OrthancPlugins.cmake OrthancServer/Plugins/Samples/ConnectivityChecks/CMakeLists.txt OrthancServer/Plugins/Samples/CustomImageDecoder/CMakeLists.txt OrthancServer/Plugins/Samples/ModalityWorklists/CMakeLists.txt OrthancServer/Plugins/Samples/ServeFolders/CMakeLists.txt OrthancServer/Plugins/Samples/StorageArea/CMakeLists.txt OrthancServer/Plugins/Samples/StorageCommitmentScp/CMakeLists.txt OrthancServer/Plugins/Samples/WebSkeleton/CMakeLists.txt OrthancServer/Resources/Graveyard/DatabasePluginSample/CMakeLists.txt OrthancServer/Resources/Graveyard/DatabasePluginSample/Database.cpp OrthancServer/Resources/Graveyard/DatabasePluginSample/Database.h OrthancServer/Resources/Graveyard/DatabasePluginSample/DatabaseWrapperBase.cpp OrthancServer/Resources/Graveyard/DatabasePluginSample/DatabaseWrapperBase.h OrthancServer/Resources/Samples/Tools/CMakeLists.txt OrthancServer/Resources/Testing/Issue32/Cpp/CMakeLists.txt OrthancServer/Resources/Testing/Issue32/Cpp/main.cpp
diffstat 18 files changed, 92 insertions(+), 106 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancServer/Plugins/Samples/AutomatedJpeg2kCompression/CMakeLists.txt	Thu Jun 11 10:05:26 2020 +0200
+++ b/OrthancServer/Plugins/Samples/AutomatedJpeg2kCompression/CMakeLists.txt	Thu Jun 11 11:44:48 2020 +0200
@@ -2,7 +2,6 @@
 
 project(Basic)
 
-set(SAMPLES_ROOT ${CMAKE_SOURCE_DIR}/..)
-include(${SAMPLES_ROOT}/Common/OrthancPlugins.cmake)
+include(${CMAKE_SOURCE_DIR}/../Common/OrthancPlugins.cmake)
 
 add_library(AutomatedJpeg2kCompression SHARED Plugin.cpp)
--- a/OrthancServer/Plugins/Samples/Basic/CMakeLists.txt	Thu Jun 11 10:05:26 2020 +0200
+++ b/OrthancServer/Plugins/Samples/Basic/CMakeLists.txt	Thu Jun 11 11:44:48 2020 +0200
@@ -2,7 +2,6 @@
 
 project(Basic)
 
-set(SAMPLES_ROOT ${CMAKE_SOURCE_DIR}/..)
-include(${SAMPLES_ROOT}/Common/OrthancPlugins.cmake)
+include(${CMAKE_SOURCE_DIR}/../Common/OrthancPlugins.cmake)
 
 add_library(PluginTest SHARED Plugin.c)
--- a/OrthancServer/Plugins/Samples/Common/OrthancPlugins.cmake	Thu Jun 11 10:05:26 2020 +0200
+++ b/OrthancServer/Plugins/Samples/Common/OrthancPlugins.cmake	Thu Jun 11 11:44:48 2020 +0200
@@ -1,11 +1,10 @@
-set(ORTHANC_ROOT ${SAMPLES_ROOT}/../..)
 include(CheckIncludeFiles)
 include(CheckIncludeFileCXX)
 include(CheckLibraryExists)
 include(FindPythonInterp)
-include(${ORTHANC_ROOT}/Resources/CMake/AutoGeneratedCode.cmake)
-include(${ORTHANC_ROOT}/Resources/CMake/DownloadPackage.cmake)
-include(${ORTHANC_ROOT}/Resources/CMake/Compiler.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/../../../../OrthancFramework/Resources/CMake/AutoGeneratedCode.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/../../../../OrthancFramework/Resources/CMake/DownloadPackage.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/../../../../OrthancFramework/Resources/CMake/Compiler.cmake)
 
 
 if (CMAKE_COMPILER_IS_GNUCXX)
@@ -20,7 +19,7 @@
   link_libraries(dl rt pthread)
 endif()
 
-include_directories(${SAMPLES_ROOT}/../Include/)
+include_directories(${CMAKE_CURRENT_LIST_DIR}/../../Include/)
 
 if (MSVC)
   if (MSVC_VERSION LESS 1600)
@@ -30,8 +29,11 @@
   # compatibility header.
   # http://stackoverflow.com/a/70630/881731
   # https://en.wikibooks.org/wiki/C_Programming/C_Reference/stdint.h#External_links
-    include_directories(${SAMPLES_ROOT}/../../Resources/ThirdParty/VisualStudio/)
+  include_directories(${CMAKE_CURRENT_LIST_DIR}/../../../../OrthancFramework/Resources/ThirdParty/VisualStudio/)
   endif()
 endif()
 
-add_definitions(-DHAS_ORTHANC_EXCEPTION=0)
+add_definitions(
+  -DHAS_ORTHANC_EXCEPTION=0
+  -DORTHANC_BUILDING_FRAMEWORK_LIBRARY=0
+  )
--- a/OrthancServer/Plugins/Samples/ConnectivityChecks/CMakeLists.txt	Thu Jun 11 10:05:26 2020 +0200
+++ b/OrthancServer/Plugins/Samples/ConnectivityChecks/CMakeLists.txt	Thu Jun 11 11:44:48 2020 +0200
@@ -13,7 +13,7 @@
 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
   execute_process(
     COMMAND 
-    ${PYTHON_EXECUTABLE} ${ORTHANC_ROOT}/Resources/WindowsResources.py
+    ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Resources/WindowsResources.py
     ${PLUGIN_VERSION} ConnectivityChecks ConnectivityChecks.dll "Orthanc plugin to serve additional folders"
     ERROR_VARIABLE Failure
     OUTPUT_FILE ${AUTOGENERATED_DIR}/ConnectivityChecks.rc
@@ -27,7 +27,7 @@
 endif()  
 
 EmbedResources(
-  --framework-path=${ORTHANC_ROOT}/OrthancFramework/Sources
+  --framework-path=${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Sources
   WEB_RESOURCES  ${CMAKE_CURRENT_SOURCE_DIR}/WebResources
   LIBRARIES      ${JAVASCRIPT_LIBS_DIR}
   )
@@ -39,17 +39,17 @@
   )
 
 include_directories(
-  ${ORTHANC_ROOT}/OrthancServer/Plugins/Include/
+  ${CMAKE_SOURCE_DIR}/../../Include/
   )
 
 add_library(ConnectivityChecks SHARED
   ${ADDITIONAL_RESOURCES}
   ${AUTOGENERATED_SOURCES}
   ${ORTHANC_CORE_SOURCES_DEPENDENCIES}
-  ${ORTHANC_ROOT}/OrthancFramework/Sources/Enumerations.cpp
-  ${ORTHANC_ROOT}/OrthancFramework/Sources/Logging.cpp
-  ${ORTHANC_ROOT}/OrthancFramework/Sources/SystemToolbox.cpp
-  ${ORTHANC_ROOT}/OrthancFramework/Sources/Toolbox.cpp
+  ${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Sources/Enumerations.cpp
+  ${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Sources/Logging.cpp
+  ${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Sources/SystemToolbox.cpp
+  ${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Sources/Toolbox.cpp
   Plugin.cpp
   )
 
--- a/OrthancServer/Plugins/Samples/CustomImageDecoder/CMakeLists.txt	Thu Jun 11 10:05:26 2020 +0200
+++ b/OrthancServer/Plugins/Samples/CustomImageDecoder/CMakeLists.txt	Thu Jun 11 11:44:48 2020 +0200
@@ -2,7 +2,6 @@
 
 project(CustomImageDecoder)
 
-set(SAMPLES_ROOT ${CMAKE_SOURCE_DIR}/..)
-include(${SAMPLES_ROOT}/Common/OrthancPlugins.cmake)
+include(${CMAKE_SOURCE_DIR}/../Common/OrthancPlugins.cmake)
 
 add_library(PluginTest SHARED Plugin.cpp)
--- a/OrthancServer/Plugins/Samples/ModalityWorklists/CMakeLists.txt	Thu Jun 11 10:05:26 2020 +0200
+++ b/OrthancServer/Plugins/Samples/ModalityWorklists/CMakeLists.txt	Thu Jun 11 11:44:48 2020 +0200
@@ -9,14 +9,13 @@
 SET(USE_SYSTEM_JSONCPP ON CACHE BOOL "Use the system version of JsonCpp")
 SET(USE_SYSTEM_BOOST ON CACHE BOOL "Use the system version of boost")
 
-set(SAMPLES_ROOT ${CMAKE_SOURCE_DIR}/..)
-include(${SAMPLES_ROOT}/Common/OrthancPlugins.cmake)
-include(${ORTHANC_ROOT}/Resources/CMake/JsonCppConfiguration.cmake)
-include(${ORTHANC_ROOT}/Resources/CMake/BoostConfiguration.cmake)
+include(${CMAKE_SOURCE_DIR}/../Common/OrthancPlugins.cmake)
+include(${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Resources/CMake/JsonCppConfiguration.cmake)
+include(${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Resources/CMake/BoostConfiguration.cmake)
 
 add_library(ModalityWorklists SHARED 
   Plugin.cpp
-  ../Common/OrthancPluginCppWrapper.cpp
+  ${CMAKE_SOURCE_DIR}/../Common/OrthancPluginCppWrapper.cpp
   ${JSONCPP_SOURCES}
   ${BOOST_SOURCES}
   )
--- a/OrthancServer/Plugins/Samples/ServeFolders/CMakeLists.txt	Thu Jun 11 10:05:26 2020 +0200
+++ b/OrthancServer/Plugins/Samples/ServeFolders/CMakeLists.txt	Thu Jun 11 11:44:48 2020 +0200
@@ -9,10 +9,9 @@
 SET(USE_SYSTEM_JSONCPP ON CACHE BOOL "Use the system version of JsonCpp")
 SET(USE_SYSTEM_BOOST ON CACHE BOOL "Use the system version of boost")
 
-set(SAMPLES_ROOT ${CMAKE_SOURCE_DIR}/..)
 include(${CMAKE_SOURCE_DIR}/../Common/OrthancPlugins.cmake)
-include(${ORTHANC_ROOT}/Resources/CMake/JsonCppConfiguration.cmake)
-include(${ORTHANC_ROOT}/Resources/CMake/BoostConfiguration.cmake)
+include(${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Resources/CMake/JsonCppConfiguration.cmake)
+include(${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Resources/CMake/BoostConfiguration.cmake)
 
 add_library(ServeFolders SHARED 
   Plugin.cpp
--- a/OrthancServer/Plugins/Samples/StorageArea/CMakeLists.txt	Thu Jun 11 10:05:26 2020 +0200
+++ b/OrthancServer/Plugins/Samples/StorageArea/CMakeLists.txt	Thu Jun 11 11:44:48 2020 +0200
@@ -2,7 +2,6 @@
 
 project(Basic)
 
-set(SAMPLES_ROOT ${CMAKE_SOURCE_DIR}/..)
-include(${SAMPLES_ROOT}/Common/OrthancPlugins.cmake)
+include(${CMAKE_SOURCE_DIR}/../Common/OrthancPlugins.cmake)
 
 add_library(PluginTest SHARED Plugin.cpp)
--- a/OrthancServer/Plugins/Samples/StorageCommitmentScp/CMakeLists.txt	Thu Jun 11 10:05:26 2020 +0200
+++ b/OrthancServer/Plugins/Samples/StorageCommitmentScp/CMakeLists.txt	Thu Jun 11 11:44:48 2020 +0200
@@ -9,10 +9,9 @@
 SET(USE_SYSTEM_JSONCPP ON CACHE BOOL "Use the system version of JsonCpp")
 SET(USE_SYSTEM_BOOST ON CACHE BOOL "Use the system version of boost")
 
-set(SAMPLES_ROOT ${CMAKE_SOURCE_DIR}/..)
-include(${SAMPLES_ROOT}/Common/OrthancPlugins.cmake)
-include(${ORTHANC_ROOT}/Resources/CMake/JsonCppConfiguration.cmake)
-include(${ORTHANC_ROOT}/Resources/CMake/BoostConfiguration.cmake)
+include(${CMAKE_SOURCE_DIR}/../Common/OrthancPlugins.cmake)
+include(${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Resources/CMake/JsonCppConfiguration.cmake)
+include(${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Resources/CMake/BoostConfiguration.cmake)
 
 add_library(StorageCommitmentScp SHARED 
   Plugin.cpp
--- a/OrthancServer/Plugins/Samples/WebSkeleton/CMakeLists.txt	Thu Jun 11 10:05:26 2020 +0200
+++ b/OrthancServer/Plugins/Samples/WebSkeleton/CMakeLists.txt	Thu Jun 11 11:44:48 2020 +0200
@@ -3,11 +3,10 @@
 project(WebSkeleton)
 
 SET(STANDALONE_BUILD ON CACHE BOOL "Standalone build (all the resources are embedded, necessary for releases)")
-SET(RESOURCES_ROOT ${CMAKE_SOURCE_DIR}/StaticResources)
 
-set(SAMPLES_ROOT ${CMAKE_SOURCE_DIR}/..)
-include(${SAMPLES_ROOT}/Common/OrthancPlugins.cmake)
+include(${CMAKE_SOURCE_DIR}/../Common/OrthancPlugins.cmake)
 
+SET(RESOURCES_ROOT ${CMAKE_SOURCE_DIR}/StaticResources)
 include(Framework/Framework.cmake)
 
 add_library(WebSkeleton SHARED 
--- a/OrthancServer/Resources/Graveyard/DatabasePluginSample/CMakeLists.txt	Thu Jun 11 10:05:26 2020 +0200
+++ b/OrthancServer/Resources/Graveyard/DatabasePluginSample/CMakeLists.txt	Thu Jun 11 11:44:48 2020 +0200
@@ -13,54 +13,49 @@
 SET(USE_SYSTEM_JSONCPP ON CACHE BOOL "Use the system version of JsonCpp")
 SET(USE_SYSTEM_SQLITE ON CACHE BOOL "Use the system version of SQLite")
 
-set(SAMPLES_ROOT ${CMAKE_SOURCE_DIR}/..)
-include(${SAMPLES_ROOT}/Common/OrthancPlugins.cmake)
+include(${CMAKE_SOURCE_DIR}/../../../Plugins/Samples/Common/OrthancPlugins.cmake)
 
-include(${ORTHANC_ROOT}/Resources/CMake/BoostConfiguration.cmake)
-include(${ORTHANC_ROOT}/Resources/CMake/JsonCppConfiguration.cmake)
-include(${ORTHANC_ROOT}/Resources/CMake/SQLiteConfiguration.cmake)
+include(${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Resources/CMake/OrthancFrameworkParameters.cmake)
+set(ENABLE_SQLITE ON)
+include(${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Resources/CMake/OrthancFrameworkConfiguration.cmake)
 
 EmbedResources(
   --system-exception  # Use "std::runtime_error" instead of "OrthancException" for embedded resources
-  PREPARE_DATABASE  ${ORTHANC_ROOT}/OrthancServer/PrepareDatabase.sql
+  PREPARE_DATABASE  ${CMAKE_SOURCE_DIR}/../../../Sources/Database/PrepareDatabase.sql
   )
 
 message("Setting the version of the plugin to ${SAMPLE_DATABASE_VERSION}")
 
 add_definitions(
   -DORTHANC_SQLITE_STANDALONE=1
-  -DORTHANC_ENABLE_BASE64=0
-  -DORTHANC_ENABLE_LOGGING=0
-  -DORTHANC_ENABLE_MD5=0
   -DORTHANC_ENABLE_PLUGINS=1
-  -DORTHANC_ENABLE_PUGIXML=0
   -DORTHANC_SANDBOXED=0
   -DSAMPLE_DATABASE_VERSION="${SAMPLE_DATABASE_VERSION}"
   )
 
 add_library(SampleDatabase SHARED 
+  ${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Sources/DicomFormat/DicomArray.cpp
+  ${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Sources/DicomFormat/DicomMap.cpp
+  ${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Sources/DicomFormat/DicomTag.cpp
+  ${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Sources/DicomFormat/DicomValue.cpp
+  ${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Sources/Enumerations.cpp
+  ${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Sources/SQLite/Connection.cpp
+  ${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Sources/SQLite/FunctionContext.cpp
+  ${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Sources/SQLite/Statement.cpp
+  ${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Sources/SQLite/StatementId.cpp
+  ${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Sources/SQLite/StatementReference.cpp
+  ${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Sources/SQLite/Transaction.cpp
+  ${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Sources/Toolbox.cpp
+  ${CMAKE_SOURCE_DIR}/../../../Plugins/Engine/PluginsEnumerations.cpp
+
+  Database.cpp
+  Plugin.cpp
+  DatabaseWrapperBase.cpp
+  
   ${BOOST_SOURCES}
   ${JSONCPP_SOURCES}
   ${SQLITE_SOURCES}
   ${AUTOGENERATED_SOURCES}
-
-  ${ORTHANC_ROOT}/Core/DicomFormat/DicomArray.cpp
-  ${ORTHANC_ROOT}/Core/DicomFormat/DicomMap.cpp
-  ${ORTHANC_ROOT}/Core/DicomFormat/DicomTag.cpp
-  ${ORTHANC_ROOT}/Core/DicomFormat/DicomValue.cpp
-  ${ORTHANC_ROOT}/Core/Enumerations.cpp
-  ${ORTHANC_ROOT}/Core/SQLite/Connection.cpp
-  ${ORTHANC_ROOT}/Core/SQLite/FunctionContext.cpp
-  ${ORTHANC_ROOT}/Core/SQLite/Statement.cpp
-  ${ORTHANC_ROOT}/Core/SQLite/StatementId.cpp
-  ${ORTHANC_ROOT}/Core/SQLite/StatementReference.cpp
-  ${ORTHANC_ROOT}/Core/SQLite/Transaction.cpp
-  ${ORTHANC_ROOT}/Core/Toolbox.cpp
-  ${ORTHANC_ROOT}/OrthancServer/DatabaseWrapperBase.cpp
-  ${ORTHANC_ROOT}/Plugins/Engine/PluginsEnumerations.cpp
-
-  Database.cpp
-  Plugin.cpp
   )
 
 set_target_properties(SampleDatabase PROPERTIES 
--- a/OrthancServer/Resources/Graveyard/DatabasePluginSample/Database.cpp	Thu Jun 11 10:05:26 2020 +0200
+++ b/OrthancServer/Resources/Graveyard/DatabasePluginSample/Database.cpp	Thu Jun 11 11:44:48 2020 +0200
@@ -33,7 +33,7 @@
 
 #include "Database.h"
 
-#include "../../../Core/DicomFormat/DicomArray.h"
+#include "../../../../OrthancFramework/Sources/DicomFormat/DicomArray.h"
 
 #include <EmbeddedResources.h>
 #include <boost/lexical_cast.hpp>
--- a/OrthancServer/Resources/Graveyard/DatabasePluginSample/Database.h	Thu Jun 11 10:05:26 2020 +0200
+++ b/OrthancServer/Resources/Graveyard/DatabasePluginSample/Database.h	Thu Jun 11 11:44:48 2020 +0200
@@ -33,12 +33,12 @@
 
 #pragma once
 
-#include <orthanc/OrthancCppDatabasePlugin.h>
+#include "OrthancCppDatabasePlugin.h"
 
-#include "../../../Core/SQLite/Connection.h"
-#include "../../../Core/SQLite/Transaction.h"
-#include "../../../OrthancServer/DatabaseWrapperBase.h"
-#include "../../Engine/PluginsEnumerations.h"
+#include "../../../../OrthancFramework/Sources/SQLite/Connection.h"
+#include "../../../../OrthancFramework/Sources/SQLite/Transaction.h"
+#include "../../../Plugins/Engine/PluginsEnumerations.h"
+#include "DatabaseWrapperBase.h"
 
 #include <memory>
 
--- a/OrthancServer/Resources/Graveyard/DatabasePluginSample/DatabaseWrapperBase.cpp	Thu Jun 11 10:05:26 2020 +0200
+++ b/OrthancServer/Resources/Graveyard/DatabasePluginSample/DatabaseWrapperBase.cpp	Thu Jun 11 11:44:48 2020 +0200
@@ -31,7 +31,7 @@
  **/
 
 
-#include "PrecompiledHeadersServer.h"
+#include "../../../Sources/PrecompiledHeadersServer.h"
 #include "DatabaseWrapperBase.h"
 
 #include <stdio.h>
--- a/OrthancServer/Resources/Graveyard/DatabasePluginSample/DatabaseWrapperBase.h	Thu Jun 11 10:05:26 2020 +0200
+++ b/OrthancServer/Resources/Graveyard/DatabasePluginSample/DatabaseWrapperBase.h	Thu Jun 11 11:44:48 2020 +0200
@@ -33,14 +33,14 @@
 
 #pragma once
 
-#include "../Core/DicomFormat/DicomMap.h"
-#include "../Core/DicomFormat/DicomTag.h"
-#include "../Core/Enumerations.h"
-#include "../Core/FileStorage/FileInfo.h"
-#include "../Core/SQLite/Connection.h"
-#include "../OrthancServer/ExportedResource.h"
-#include "../OrthancServer/ServerIndexChange.h"
-#include "ServerEnumerations.h"
+#include "../../../../OrthancFramework/Sources/DicomFormat/DicomMap.h"
+#include "../../../../OrthancFramework/Sources/DicomFormat/DicomTag.h"
+#include "../../../../OrthancFramework/Sources/Enumerations.h"
+#include "../../../../OrthancFramework/Sources/FileStorage/FileInfo.h"
+#include "../../../../OrthancFramework/Sources/SQLite/Connection.h"
+#include "../../../Sources/ExportedResource.h"
+#include "../../../Sources/ServerIndexChange.h"
+#include "../../../Sources/ServerEnumerations.h"
 
 #include <list>
 
--- a/OrthancServer/Resources/Samples/Tools/CMakeLists.txt	Thu Jun 11 10:05:26 2020 +0200
+++ b/OrthancServer/Resources/Samples/Tools/CMakeLists.txt	Thu Jun 11 11:44:48 2020 +0200
@@ -8,29 +8,28 @@
   link_libraries(pthread dl)
 endif()
 
-include(${CMAKE_SOURCE_DIR}/../../CMake/OrthancFrameworkParameters.cmake)
+include(${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Resources/CMake/OrthancFrameworkParameters.cmake)
 
+set(ENABLE_ZLIB ON)
 set(STATIC_BUILD ON)
 set(ALLOW_DOWNLOADS ON)
 
-include(${CMAKE_SOURCE_DIR}/../../CMake/OrthancFrameworkConfiguration.cmake)
-
-add_library(CommonLibraries
-  ${BOOST_SOURCES}
-  ${JSONCPP_SOURCES}
-  ${ORTHANC_ROOT}/Core/Enumerations.cpp
-  ${ORTHANC_ROOT}/Core/Logging.cpp
-  ${ORTHANC_ROOT}/Core/SystemToolbox.cpp
-  ${ORTHANC_ROOT}/Core/Toolbox.cpp
-  ${ORTHANC_ROOT}/Resources/ThirdParty/md5/md5.c
-  ${ORTHANC_ROOT}/Resources/ThirdParty/base64/base64.cpp
-  )
+include(${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Resources/CMake/OrthancFrameworkConfiguration.cmake)
 
 add_executable(RecoverCompressedFile
   RecoverCompressedFile.cpp
-  ${ORTHANC_ROOT}/Core/Compression/DeflateBaseCompressor.cpp
-  ${ORTHANC_ROOT}/Core/Compression/ZlibCompressor.cpp
+
+  ${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Resources/ThirdParty/base64/base64.cpp
+  ${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Resources/ThirdParty/md5/md5.c
+  ${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Sources/Compression/DeflateBaseCompressor.cpp
+  ${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Sources/Compression/ZlibCompressor.cpp
+  ${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Sources/Enumerations.cpp
+  ${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Sources/Logging.cpp
+  ${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Sources/SystemToolbox.cpp
+  ${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Sources/Toolbox.cpp
+
+  ${BOOST_SOURCES}
+  ${JSONCPP_SOURCES}
+  ${UUID_SOURCES}
   ${ZLIB_SOURCES}
   )
-
-target_link_libraries(RecoverCompressedFile CommonLibraries)
--- a/OrthancServer/Resources/Testing/Issue32/Cpp/CMakeLists.txt	Thu Jun 11 10:05:26 2020 +0200
+++ b/OrthancServer/Resources/Testing/Issue32/Cpp/CMakeLists.txt	Thu Jun 11 11:44:48 2020 +0200
@@ -2,13 +2,11 @@
 
 project(Orthanc)
 
-set(ORTHANC_ROOT ${CMAKE_SOURCE_DIR}/../../../../Resources/CMake)
+set(Resources/CMake)
 
-include(${ORTHANC_ROOT}/OrthancFrameworkParameters.cmake)
+include(${CMAKE_SOURCE_DIR}/../../../../../OrthancFramework/Resources/CMake/OrthancFrameworkParameters.cmake)
 set(ENABLE_WEB_CLIENT ON)
-include(${ORTHANC_ROOT}/OrthancFrameworkConfiguration.cmake)
-
-include_directories(${ORTHANC_ROOT})
+include(${CMAKE_SOURCE_DIR}/../../../../../OrthancFramework/Resources/CMake/OrthancFrameworkConfiguration.cmake)
 
 add_executable(Sample
   main.cpp
--- a/OrthancServer/Resources/Testing/Issue32/Cpp/main.cpp	Thu Jun 11 10:05:26 2020 +0200
+++ b/OrthancServer/Resources/Testing/Issue32/Cpp/main.cpp	Thu Jun 11 11:44:48 2020 +0200
@@ -1,7 +1,7 @@
-#include <Core/HttpClient.h>
-#include <Core/Logging.h>
-#include <Core/OrthancException.h>
-#include <Core/SystemToolbox.h>
+#include "../../../../../OrthancFramework/Sources/HttpClient.h"
+#include "../../../../../OrthancFramework/Sources/Logging.h"
+#include "../../../../../OrthancFramework/Sources/OrthancException.h"
+#include "../../../../../OrthancFramework/Sources/SystemToolbox.h"
 
 #include <iostream>
 #include <boost/thread.hpp>