diff Applications/CMakeLists.txt @ 194:e57e6ca5303d

sync
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 30 Jun 2020 18:03:23 +0200
parents f299c191cd76
children fda17c92d784
line wrap: on
line diff
--- a/Applications/CMakeLists.txt	Tue Jun 30 10:10:55 2020 +0200
+++ b/Applications/CMakeLists.txt	Tue Jun 30 18:03:23 2020 +0200
@@ -16,7 +16,6 @@
 # Advanced parameters to fine-tune linking against system libraries
 SET(USE_SYSTEM_LIBTIFF ON CACHE BOOL "Use the system version of libtiff")
 SET(USE_SYSTEM_OPENJPEG ON CACHE BOOL "Use the system version of OpenJpeg")
-SET(USE_SYSTEM_ORTHANC_SDK ON CACHE BOOL "Use the system version of the Orthanc plugin SDK")
 
 
 
@@ -32,7 +31,7 @@
 UNSET(STANDALONE_BUILD CACHE)
 SET(STANDALONE_BUILD ON)       # Embed DCMTK's dictionaries for static builds
 
-include(${ORTHANC_ROOT}/Resources/CMake/OrthancFrameworkParameters.cmake)
+include(${ORTHANC_FRAMEWORK_ROOT}/Resources/CMake/OrthancFrameworkParameters.cmake)
 
 SET(ENABLE_CRYPTO_OPTIONS ON)
 SET(ENABLE_DCMTK ON)
@@ -48,11 +47,10 @@
 SET(ENABLE_ZLIB ON)
 SET(HAS_EMBEDDED_RESOURCES ON)
 
-include(${ORTHANC_ROOT}/Resources/CMake/VisualStudioPrecompiledHeaders.cmake)
-include(${ORTHANC_ROOT}/Resources/CMake/OrthancFrameworkConfiguration.cmake)
+include(${ORTHANC_FRAMEWORK_ROOT}/Resources/CMake/VisualStudioPrecompiledHeaders.cmake)
+include(${ORTHANC_FRAMEWORK_ROOT}/Resources/CMake/OrthancFrameworkConfiguration.cmake)
 include_directories(
-  ${ORTHANC_ROOT}/Core/
-  ${ORTHANC_ROOT}/Plugins/Samples/Common/
+  ${ORTHANC_FRAMEWORK_ROOT}/Sources/
   )
 
 
@@ -64,20 +62,6 @@
 
 
 #####################################################################
-## Find the Orthanc SDK
-#####################################################################
-
-if (STATIC_BUILD OR NOT USE_SYSTEM_ORTHANC_SDK)
-  include_directories(${CMAKE_SOURCE_DIR}/../Resources/Orthanc/Sdk-1.0.0)
-else ()
-  CHECK_INCLUDE_FILE_CXX(orthanc/OrthancCPlugin.h HAVE_ORTHANC_H)
-  if (NOT HAVE_ORTHANC_H)
-    message(FATAL_ERROR "Please install the headers of the Orthanc plugins SDK")
-  endif()
-endif()
-
-
-#####################################################################
 ## Create the list of the source files that depend upon the
 ## precompiled headers
 #####################################################################
@@ -140,7 +124,7 @@
     )
   
   ADD_VISUAL_STUDIO_PRECOMPILED_HEADERS(
-    "PrecompiledHeaders.h" "${ORTHANC_ROOT}/Core/PrecompiledHeaders.cpp"
+    "PrecompiledHeaders.h" "${ORTHANC_FRAMEWORK_ROOT}/Sources/PrecompiledHeaders.cpp"
     TMP ORTHANC_CORE_PCH)
 
   ADD_VISUAL_STUDIO_PRECOMPILED_HEADERS(
@@ -167,15 +151,14 @@
   ${AUTOGENERATED_SOURCES}
   ${BOOST_EXTENDED_SOURCES}
 
-  ${ORTHANC_ROOT}/Plugins/Samples/Common/OrthancPluginCppWrapper.cpp
-  ${ORTHANC_ROOT}/Plugins/Samples/Common/DicomDatasetReader.cpp
-  ${ORTHANC_ROOT}/Plugins/Samples/Common/DicomPath.cpp
-  ${ORTHANC_ROOT}/Plugins/Samples/Common/DicomTag.cpp
-  ${ORTHANC_ROOT}/Plugins/Samples/Common/FullOrthancDataset.cpp
-  ${ORTHANC_ROOT}/Plugins/Samples/Common/IOrthancConnection.cpp
-  ${ORTHANC_ROOT}/Plugins/Samples/Common/OrthancHttpConnection.cpp
-  ${ORTHANC_ROOT}/Plugins/Samples/Common/OrthancPluginConnection.cpp
-  ${ORTHANC_ROOT}/Plugins/Samples/Common/SimplifiedOrthancDataset.cpp
+  ${ORTHANC_WSI_DIR}/Framework/Inputs/Orthanc/DicomDatasetReader.cpp
+  ${ORTHANC_WSI_DIR}/Framework/Inputs/Orthanc/DicomPath.cpp
+  ${ORTHANC_WSI_DIR}/Framework/Inputs/Orthanc/DicomTag.cpp
+  ${ORTHANC_WSI_DIR}/Framework/Inputs/Orthanc/FullOrthancDataset.cpp
+  ${ORTHANC_WSI_DIR}/Framework/Inputs/Orthanc/IOrthancConnection.cpp
+  ${ORTHANC_WSI_DIR}/Framework/Inputs/Orthanc/OrthancHttpConnection.cpp
+  #${ORTHANC_WSI_DIR}/Framework/Inputs/Orthanc/OrthancPluginConnection.cpp  # For plugins only
+  #${ORTHANC_WSI_DIR}/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.cpp  # For plugins only
 
   # Mandatory components
   ${LIBTIFF_SOURCES}
@@ -191,7 +174,7 @@
 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
   execute_process(
     COMMAND 
-    ${PYTHON_EXECUTABLE} ${ORTHANC_ROOT}/Resources/WindowsResources.py
+    ${PYTHON_EXECUTABLE} ${ORTHANC_FRAMEWORK_ROOT}/Resources/WindowsResources.py
     ${ORTHANC_WSI_VERSION} OrthancWSIDicomizer OrthancWSIDicomizer.exe "Companion tool to Orthanc for whole-slide imaging"
     ERROR_VARIABLE Failure
     OUTPUT_FILE ${AUTOGENERATED_DIR}/OrthancWSIDicomizer.rc
@@ -227,7 +210,7 @@
 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
   execute_process(
     COMMAND 
-    ${PYTHON_EXECUTABLE} ${ORTHANC_ROOT}/Resources/WindowsResources.py
+    ${PYTHON_EXECUTABLE} ${ORTHANC_FRAMEWORK_ROOT}/Resources/WindowsResources.py
     ${ORTHANC_WSI_VERSION} OrthancWSIDicomToTiff OrthancWSIDicomToTiff.exe "Companion tool to Orthanc for whole-slide imaging"
     ERROR_VARIABLE Failure
     OUTPUT_FILE ${AUTOGENERATED_DIR}/OrthancWSIDicomToTiff.rc