5024
|
1 # Orthanc - A Lightweight, RESTful DICOM Store
|
|
2 # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
|
|
3 # Department, University Hospital of Liege, Belgium
|
|
4 # Copyright (C) 2017-2022 Osimis S.A., Belgium
|
|
5 # Copyright (C) 2021-2022 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
|
|
6 #
|
|
7 # This program is free software: you can redistribute it and/or
|
|
8 # modify it under the terms of the GNU General Public License as
|
|
9 # published by the Free Software Foundation, either version 3 of the
|
|
10 # License, or (at your option) any later version.
|
|
11 #
|
|
12 # This program is distributed in the hope that it will be useful, but
|
|
13 # WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
15 # General Public License for more details.
|
|
16 #
|
|
17 # You should have received a copy of the GNU General Public License
|
|
18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
19
|
|
20
|
|
21 cmake_minimum_required(VERSION 2.8)
|
|
22 cmake_policy(SET CMP0058 NEW)
|
|
23
|
|
24 project(DelayedDeletion)
|
|
25
|
|
26 SET(PLUGIN_NAME "delayed-deletion" CACHE STRING "Name of the plugin")
|
|
27 SET(PLUGIN_VERSION "mainline" CACHE STRING "Version of the plugin")
|
|
28
|
|
29 include(${CMAKE_CURRENT_SOURCE_DIR}/../../../../OrthancFramework/Resources/CMake/OrthancFrameworkParameters.cmake)
|
|
30
|
|
31 set(ENABLE_SQLITE ON)
|
|
32 set(ENABLE_MODULE_IMAGES OFF)
|
|
33 set(ENABLE_MODULE_JOBS OFF)
|
|
34 set(ENABLE_MODULE_DICOM OFF)
|
|
35
|
|
36 include(${CMAKE_CURRENT_SOURCE_DIR}/../../../../OrthancFramework/Resources/CMake/OrthancFrameworkConfiguration.cmake)
|
|
37
|
|
38 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
|
|
39 execute_process(
|
|
40 COMMAND
|
|
41 ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Resources/WindowsResources.py
|
|
42 ${PLUGIN_VERSION} DelayedDeletion DelayedDeletion.dll "Orthanc plugin to delay deletion of files"
|
|
43 ERROR_VARIABLE Failure
|
|
44 OUTPUT_FILE ${AUTOGENERATED_DIR}/DelayedDeletion.rc
|
|
45 )
|
|
46
|
|
47 if (Failure)
|
|
48 message(FATAL_ERROR "Error while computing the version information: ${Failure}")
|
|
49 endif()
|
|
50
|
|
51 list(APPEND ADDITIONAL_RESOURCES ${AUTOGENERATED_DIR}/DelayedDeletion.rc)
|
|
52 endif()
|
|
53
|
|
54 add_definitions(
|
|
55 -DHAS_ORTHANC_EXCEPTION=1
|
|
56 -DORTHANC_PLUGIN_NAME="${PLUGIN_NAME}"
|
|
57 -DORTHANC_PLUGIN_VERSION="${PLUGIN_VERSION}"
|
|
58 -DORTHANC_ENABLE_LOGGING=1
|
|
59 -DORTHANC_ENABLE_PLUGINS=1
|
|
60 -DORTHANC_BUILDING_SERVER_LIBRARY=0
|
|
61 )
|
|
62
|
|
63 include_directories(
|
|
64 ${CMAKE_SOURCE_DIR}/../../Include/
|
|
65 ${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Sources/
|
|
66 )
|
|
67
|
|
68 add_library(DelayedDeletion SHARED
|
|
69 ${ADDITIONAL_RESOURCES}
|
|
70 ${AUTOGENERATED_SOURCES}
|
|
71 ${ORTHANC_CORE_SOURCES}
|
|
72 ${CMAKE_SOURCE_DIR}/../../../Plugins/Samples/DelayedDeletion/Plugin.cpp
|
|
73 ${CMAKE_SOURCE_DIR}/../../../Plugins/Samples/DelayedDeletion/PendingDeletionsDatabase.cpp
|
|
74 ${CMAKE_SOURCE_DIR}/../../../Plugins/Engine/PluginsEnumerations.cpp
|
|
75 ${CMAKE_SOURCE_DIR}/../../../Plugins/Samples/Common/OrthancPluginCppWrapper.cpp
|
|
76 Plugin.cpp
|
|
77 )
|
|
78
|
|
79 set_target_properties(
|
|
80 DelayedDeletion PROPERTIES
|
|
81 VERSION ${PLUGIN_VERSION}
|
|
82 SOVERSION ${PLUGIN_VERSION}
|
|
83 )
|
|
84
|
|
85 install(
|
|
86 TARGETS DelayedDeletion
|
|
87 DESTINATION .
|
|
88 )
|