Mercurial > hg > orthanc
annotate OrthancServer/Plugins/Samples/DelayedDeletion/CMakeLists.txt @ 5408:095c59b52f04
todo
author | Alain Mazy <am@osimis.io> |
---|---|
date | Tue, 07 Nov 2023 08:31:43 +0100 |
parents | fddb5d8d0021 |
children | 48b8dae6dc77 |
rev | line source |
---|---|
5024 | 1 # Orthanc - A Lightweight, RESTful DICOM Store |
2 # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics | |
3 # Department, University Hospital of Liege, Belgium | |
5185
0ea402b4d901
upgrade to year 2023
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5056
diff
changeset
|
4 # Copyright (C) 2017-2023 Osimis S.A., Belgium |
0ea402b4d901
upgrade to year 2023
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5056
diff
changeset
|
5 # Copyright (C) 2021-2023 Sebastien Jodogne, ICTEAM UCLouvain, Belgium |
5024 | 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 | |
5056
191e86305f19
DelayedDeletion plugin: Fix leaking of symbols
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5031
diff
changeset
|
38 include(${CMAKE_CURRENT_LIST_DIR}/../Common/OrthancPluginsExports.cmake) |
191e86305f19
DelayedDeletion plugin: Fix leaking of symbols
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5031
diff
changeset
|
39 |
5024 | 40 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") |
41 execute_process( | |
42 COMMAND | |
43 ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Resources/WindowsResources.py | |
44 ${PLUGIN_VERSION} DelayedDeletion DelayedDeletion.dll "Orthanc plugin to delay deletion of files" | |
45 ERROR_VARIABLE Failure | |
46 OUTPUT_FILE ${AUTOGENERATED_DIR}/DelayedDeletion.rc | |
47 ) | |
48 | |
49 if (Failure) | |
50 message(FATAL_ERROR "Error while computing the version information: ${Failure}") | |
51 endif() | |
52 | |
53 list(APPEND ADDITIONAL_RESOURCES ${AUTOGENERATED_DIR}/DelayedDeletion.rc) | |
54 endif() | |
55 | |
56 add_definitions( | |
57 -DHAS_ORTHANC_EXCEPTION=1 | |
58 -DORTHANC_PLUGIN_NAME="${PLUGIN_NAME}" | |
59 -DORTHANC_PLUGIN_VERSION="${PLUGIN_VERSION}" | |
60 -DORTHANC_ENABLE_LOGGING=1 | |
61 -DORTHANC_ENABLE_PLUGINS=1 | |
62 -DORTHANC_BUILDING_SERVER_LIBRARY=0 | |
63 ) | |
64 | |
65 include_directories( | |
66 ${CMAKE_SOURCE_DIR}/../../Include/ | |
67 ${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Sources/ | |
68 ) | |
69 | |
70 add_library(DelayedDeletion SHARED | |
71 ${ADDITIONAL_RESOURCES} | |
72 ${AUTOGENERATED_SOURCES} | |
73 ${ORTHANC_CORE_SOURCES} | |
74 ${CMAKE_SOURCE_DIR}/../../../Plugins/Samples/DelayedDeletion/Plugin.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 | |
5357
fddb5d8d0021
Prevent the leak of the full path of the source files in the binaries
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5185
diff
changeset
|
81 DefineSourceBasenameForTarget(DelayedDeletion) |
fddb5d8d0021
Prevent the leak of the full path of the source files in the binaries
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5185
diff
changeset
|
82 |
5024 | 83 set_target_properties( |
84 DelayedDeletion PROPERTIES | |
85 VERSION ${PLUGIN_VERSION} | |
86 SOVERSION ${PLUGIN_VERSION} | |
87 ) | |
88 | |
89 install( | |
90 TARGETS DelayedDeletion | |
91 DESTINATION . | |
92 ) |