Mercurial > hg > orthanc
comparison OrthancServer/Plugins/Samples/DelayedDeletion/CMakeLists.txt @ 5024:c2ebc47f4f18 delayed-deletion
wip: adding DelayedDeletion plugin
author | Alain Mazy <am@osimis.io> |
---|---|
date | Mon, 20 Jun 2022 16:53:21 +0200 |
parents | |
children | eec3e4a91663 |
comparison
equal
deleted
inserted
replaced
5021:559b35d18ef7 | 5024:c2ebc47f4f18 |
---|---|
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_LOGGING_PLUGIN=1 | |
60 -DORTHANC_ENABLE_PLUGINS=1 | |
61 -DORTHANC_BUILDING_SERVER_LIBRARY=0 | |
62 ) | |
63 | |
64 include_directories( | |
65 ${CMAKE_SOURCE_DIR}/../../Include/ | |
66 ${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Sources/ | |
67 ) | |
68 | |
69 add_library(DelayedDeletion SHARED | |
70 ${ADDITIONAL_RESOURCES} | |
71 ${AUTOGENERATED_SOURCES} | |
72 ${ORTHANC_CORE_SOURCES} | |
73 ${CMAKE_SOURCE_DIR}/../../../Plugins/Samples/DelayedDeletion/Plugin.cpp | |
74 ${CMAKE_SOURCE_DIR}/../../../Plugins/Samples/DelayedDeletion/LargeDeleteJob.cpp | |
75 ${CMAKE_SOURCE_DIR}/../../../Plugins/Samples/DelayedDeletion/PendingDeletionsDatabase.cpp | |
76 ${CMAKE_SOURCE_DIR}/../../../Plugins/Engine/PluginsEnumerations.cpp | |
77 ${CMAKE_SOURCE_DIR}/../../../Plugins/Samples/Common/OrthancPluginCppWrapper.cpp | |
78 Plugin.cpp | |
79 ) | |
80 | |
81 set_target_properties( | |
82 DelayedDeletion PROPERTIES | |
83 VERSION ${PLUGIN_VERSION} | |
84 SOVERSION ${PLUGIN_VERSION} | |
85 ) | |
86 | |
87 install( | |
88 TARGETS DelayedDeletion | |
89 DESTINATION . | |
90 ) |