Mercurial > hg > orthanc
comparison OrthancServer/Plugins/Samples/AdvancedStorage/CMakeLists.txt @ 5080:d7274e43ea7c attach-custom-data
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
author | Alain Mazy <am@osimis.io> |
---|---|
date | Thu, 08 Sep 2022 17:42:08 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
5079:4366b4c41441 | 5080:d7274e43ea7c |
---|---|
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(AdvancedStorage) | |
25 | |
26 SET(PLUGIN_VERSION "mainline" CACHE STRING "Version of the plugin") | |
27 | |
28 include(${CMAKE_CURRENT_SOURCE_DIR}/../../../../OrthancFramework/Resources/CMake/OrthancFrameworkParameters.cmake) | |
29 include(${CMAKE_CURRENT_SOURCE_DIR}/../../../../OrthancFramework/Resources/CMake/OrthancFrameworkConfiguration.cmake) | |
30 | |
31 include(${CMAKE_CURRENT_LIST_DIR}/../Common/OrthancPluginsExports.cmake) | |
32 | |
33 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") | |
34 execute_process( | |
35 COMMAND | |
36 ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Resources/WindowsResources.py | |
37 ${PLUGIN_VERSION} AdvancedStorage AdvancedStorage.dll "Orthanc plugin to extend Orthanc Storage" | |
38 ERROR_VARIABLE Failure | |
39 OUTPUT_FILE ${AUTOGENERATED_DIR}/AdvancedStorage.rc | |
40 ) | |
41 | |
42 if (Failure) | |
43 message(FATAL_ERROR "Error while computing the version information: ${Failure}") | |
44 endif() | |
45 | |
46 list(APPEND ADDITIONAL_RESOURCES ${AUTOGENERATED_DIR}/AdvancedStorage.rc) | |
47 endif() | |
48 | |
49 add_definitions( | |
50 -DHAS_ORTHANC_EXCEPTION=1 | |
51 -DORTHANC_PLUGIN_VERSION="${PLUGIN_VERSION}" | |
52 ) | |
53 | |
54 include_directories( | |
55 ${CMAKE_SOURCE_DIR}/../../Include/ | |
56 ${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Sources/ | |
57 ) | |
58 | |
59 add_library(AdvancedStorage SHARED | |
60 ${ADDITIONAL_RESOURCES} | |
61 ${AUTOGENERATED_SOURCES} | |
62 ${ORTHANC_CORE_SOURCES_DEPENDENCIES} | |
63 ${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Sources/Enumerations.cpp | |
64 ${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Sources/Logging.cpp | |
65 ${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Sources/OrthancException.cpp | |
66 ${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Sources/SystemToolbox.cpp | |
67 ${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Sources/Toolbox.cpp | |
68 ${CMAKE_SOURCE_DIR}/../../../../OrthancServer/Plugins/Samples/Common/OrthancPluginCppWrapper.cpp | |
69 Plugin.cpp | |
70 ) | |
71 | |
72 set_target_properties( | |
73 AdvancedStorage PROPERTIES | |
74 VERSION ${PLUGIN_VERSION} | |
75 SOVERSION ${PLUGIN_VERSION} | |
76 ) | |
77 | |
78 install( | |
79 TARGETS AdvancedStorage | |
80 DESTINATION . | |
81 ) |