Mercurial > hg > orthanc
annotate OrthancServer/CMakeLists.txt @ 5084:9770d537880d attach-custom-data
added support for revision in SQLite + avoid upgrading DB version
author | Alain Mazy <am@osimis.io> |
---|---|
date | Thu, 15 Sep 2022 09:02:07 +0200 |
parents | 75e949689c08 |
children | 8279eaab0d1d |
rev | line source |
---|---|
4124
28944db5318b
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4121
diff
changeset
|
1 # Orthanc - A Lightweight, RESTful DICOM Store |
28944db5318b
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4121
diff
changeset
|
2 # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics |
28944db5318b
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4121
diff
changeset
|
3 # Department, University Hospital of Liege, Belgium |
4870
43e613a7756b
upgrade to year 2022
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4831
diff
changeset
|
4 # Copyright (C) 2017-2022 Osimis S.A., Belgium |
43e613a7756b
upgrade to year 2022
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4831
diff
changeset
|
5 # Copyright (C) 2021-2022 Sebastien Jodogne, ICTEAM UCLouvain, Belgium |
4124
28944db5318b
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4121
diff
changeset
|
6 # |
28944db5318b
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4121
diff
changeset
|
7 # This program is free software: you can redistribute it and/or |
28944db5318b
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4121
diff
changeset
|
8 # modify it under the terms of the GNU General Public License as |
28944db5318b
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4121
diff
changeset
|
9 # published by the Free Software Foundation, either version 3 of the |
28944db5318b
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4121
diff
changeset
|
10 # License, or (at your option) any later version. |
28944db5318b
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4121
diff
changeset
|
11 # |
28944db5318b
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4121
diff
changeset
|
12 # This program is distributed in the hope that it will be useful, but |
28944db5318b
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4121
diff
changeset
|
13 # WITHOUT ANY WARRANTY; without even the implied warranty of |
28944db5318b
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4121
diff
changeset
|
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
28944db5318b
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4121
diff
changeset
|
15 # General Public License for more details. |
28944db5318b
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4121
diff
changeset
|
16 # |
28944db5318b
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4121
diff
changeset
|
17 # You should have received a copy of the GNU General Public License |
28944db5318b
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4121
diff
changeset
|
18 # along with this program. If not, see <http://www.gnu.org/licenses/>. |
28944db5318b
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4121
diff
changeset
|
19 |
28944db5318b
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4121
diff
changeset
|
20 |
2691 | 21 cmake_minimum_required(VERSION 2.8) |
4170
1657c8700974
better fix for CMP0058
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4168
diff
changeset
|
22 cmake_policy(SET CMP0058 NEW) |
2691 | 23 |
24 project(Orthanc) | |
25 | |
26 | |
27 ##################################################################### | |
28 ## Generic parameters of the Orthanc framework | |
29 ##################################################################### | |
30 | |
4091
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
31 include(${CMAKE_SOURCE_DIR}/../OrthancFramework/Resources/CMake/OrthancFrameworkParameters.cmake) |
2691 | 32 |
33 # Enable all the optional components of the Orthanc framework | |
34 set(ENABLE_CRYPTO_OPTIONS ON) | |
35 set(ENABLE_DCMTK ON) | |
36 set(ENABLE_DCMTK_NETWORKING ON) | |
3893 | 37 set(ENABLE_DCMTK_TRANSCODING ON) |
2691 | 38 set(ENABLE_GOOGLE_TEST ON) |
39 set(ENABLE_JPEG ON) | |
40 set(ENABLE_LOCALE ON) | |
41 set(ENABLE_LUA ON) | |
3723
cc6d4edfe8fe
fix pkcs11 compilation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3633
diff
changeset
|
42 set(ENABLE_OPENSSL_ENGINES ON) # OpenSSL engines are necessary for PKCS11 |
2691 | 43 set(ENABLE_PNG ON) |
44 set(ENABLE_PUGIXML ON) | |
45 set(ENABLE_SQLITE ON) | |
46 set(ENABLE_WEB_CLIENT ON) | |
47 set(ENABLE_WEB_SERVER ON) | |
48 set(ENABLE_ZLIB ON) | |
49 | |
50 | |
51 ##################################################################### | |
52 ## CMake parameters tunable at the command line to configure the | |
53 ## plugins, the companion tools, and the unit tests | |
54 ##################################################################### | |
55 | |
56 # Parameters of the build | |
4030
100fbe970762
DANGEROUS commit: removing HAS_EMBEDDED_RESOURCES
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4015
diff
changeset
|
57 set(STANDALONE_BUILD ON CACHE BOOL "Standalone build (all the resources are embedded, necessary for releases)") |
2691 | 58 SET(BUILD_MODALITY_WORKLISTS ON CACHE BOOL "Whether to build the sample plugin to serve modality worklists") |
59 SET(BUILD_RECOVER_COMPRESSED_FILE ON CACHE BOOL "Whether to build the companion tool to recover files compressed using Orthanc") | |
60 SET(BUILD_SERVE_FOLDERS ON CACHE BOOL "Whether to build the ServeFolders plugin") | |
3622
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
61 SET(BUILD_CONNECTIVITY_CHECKS ON CACHE BOOL "Whether to build the ConnectivityChecks plugin") |
4979
f316413027fd
renamed DbOptizer into Housekeeper + add Scheduler & triggers
Alain Mazy <am@osimis.io>
parents:
4971
diff
changeset
|
62 SET(BUILD_HOUSEKEEPER ON CACHE BOOL "Whether to build the Housekeeper plugin") |
5024
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
63 SET(BUILD_DELAYED_DELETION ON CACHE BOOL "Whether to build the DelayedDeletion plugin") |
5080
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
64 SET(BUILD_ADVANCED_STORAGE ON CACHE BOOL "Whether to build the AdvancedStorage plugin") |
2691 | 65 SET(ENABLE_PLUGINS ON CACHE BOOL "Enable plugins") |
66 SET(UNIT_TESTS_WITH_HTTP_CONNEXIONS ON CACHE BOOL "Allow unit tests to make HTTP requests") | |
67 | |
68 | |
69 ##################################################################### | |
70 ## Configuration of the Orthanc framework | |
71 ##################################################################### | |
72 | |
4091
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
73 include(${CMAKE_SOURCE_DIR}/../OrthancFramework/Resources/CMake/VisualStudioPrecompiledHeaders.cmake) |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
74 include(${CMAKE_SOURCE_DIR}/../OrthancFramework/Resources/CMake/OrthancFrameworkConfiguration.cmake) |
2691 | 75 |
4099
bf1a17f12306
moving version scripts from OrthancFramework to OrthancServer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4096
diff
changeset
|
76 # To export the proper symbols in the sample plugins |
bf1a17f12306
moving version scripts from OrthancFramework to OrthancServer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4096
diff
changeset
|
77 include(${CMAKE_SOURCE_DIR}/Plugins/Samples/Common/OrthancPluginsExports.cmake) |
bf1a17f12306
moving version scripts from OrthancFramework to OrthancServer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4096
diff
changeset
|
78 |
2691 | 79 |
80 ##################################################################### | |
81 ## List of source files | |
82 ##################################################################### | |
83 | |
84 set(ORTHANC_SERVER_SOURCES | |
4091
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
85 ${CMAKE_SOURCE_DIR}/Sources/Database/Compatibility/DatabaseLookup.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
86 ${CMAKE_SOURCE_DIR}/Sources/Database/Compatibility/ICreateInstance.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
87 ${CMAKE_SOURCE_DIR}/Sources/Database/Compatibility/IGetChildrenMetadata.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
88 ${CMAKE_SOURCE_DIR}/Sources/Database/Compatibility/ILookupResourceAndParent.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
89 ${CMAKE_SOURCE_DIR}/Sources/Database/Compatibility/ILookupResources.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
90 ${CMAKE_SOURCE_DIR}/Sources/Database/Compatibility/SetOfResources.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
91 ${CMAKE_SOURCE_DIR}/Sources/Database/ResourcesContent.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
92 ${CMAKE_SOURCE_DIR}/Sources/Database/SQLiteDatabaseWrapper.cpp |
4586
1d96fe7e054e
taking StatelessDatabaseOperations out of ServerIndex
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4520
diff
changeset
|
93 ${CMAKE_SOURCE_DIR}/Sources/Database/StatelessDatabaseOperations.cpp |
4591
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4586
diff
changeset
|
94 ${CMAKE_SOURCE_DIR}/Sources/Database/VoidDatabaseListener.cpp |
4091
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
95 ${CMAKE_SOURCE_DIR}/Sources/DicomInstanceOrigin.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
96 ${CMAKE_SOURCE_DIR}/Sources/DicomInstanceToStore.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
97 ${CMAKE_SOURCE_DIR}/Sources/EmbeddedResourceHttpHandler.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
98 ${CMAKE_SOURCE_DIR}/Sources/ExportedResource.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
99 ${CMAKE_SOURCE_DIR}/Sources/LuaScripting.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
100 ${CMAKE_SOURCE_DIR}/Sources/OrthancConfiguration.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
101 ${CMAKE_SOURCE_DIR}/Sources/OrthancFindRequestHandler.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
102 ${CMAKE_SOURCE_DIR}/Sources/OrthancGetRequestHandler.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
103 ${CMAKE_SOURCE_DIR}/Sources/OrthancHttpHandler.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
104 ${CMAKE_SOURCE_DIR}/Sources/OrthancInitialization.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
105 ${CMAKE_SOURCE_DIR}/Sources/OrthancMoveRequestHandler.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
106 ${CMAKE_SOURCE_DIR}/Sources/OrthancRestApi/OrthancRestAnonymizeModify.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
107 ${CMAKE_SOURCE_DIR}/Sources/OrthancRestApi/OrthancRestApi.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
108 ${CMAKE_SOURCE_DIR}/Sources/OrthancRestApi/OrthancRestArchive.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
109 ${CMAKE_SOURCE_DIR}/Sources/OrthancRestApi/OrthancRestChanges.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
110 ${CMAKE_SOURCE_DIR}/Sources/OrthancRestApi/OrthancRestModalities.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
111 ${CMAKE_SOURCE_DIR}/Sources/OrthancRestApi/OrthancRestResources.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
112 ${CMAKE_SOURCE_DIR}/Sources/OrthancRestApi/OrthancRestSystem.cpp |
4240 | 113 ${CMAKE_SOURCE_DIR}/Sources/OrthancWebDav.cpp |
4091
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
114 ${CMAKE_SOURCE_DIR}/Sources/QueryRetrieveHandler.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
115 ${CMAKE_SOURCE_DIR}/Sources/Search/DatabaseConstraint.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
116 ${CMAKE_SOURCE_DIR}/Sources/Search/DatabaseLookup.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
117 ${CMAKE_SOURCE_DIR}/Sources/Search/DicomTagConstraint.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
118 ${CMAKE_SOURCE_DIR}/Sources/Search/HierarchicalMatcher.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
119 ${CMAKE_SOURCE_DIR}/Sources/Search/ISqlLookupFormatter.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
120 ${CMAKE_SOURCE_DIR}/Sources/ServerContext.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
121 ${CMAKE_SOURCE_DIR}/Sources/ServerEnumerations.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
122 ${CMAKE_SOURCE_DIR}/Sources/ServerIndex.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
123 ${CMAKE_SOURCE_DIR}/Sources/ServerJobs/ArchiveJob.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
124 ${CMAKE_SOURCE_DIR}/Sources/ServerJobs/CleaningInstancesJob.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
125 ${CMAKE_SOURCE_DIR}/Sources/ServerJobs/DicomModalityStoreJob.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
126 ${CMAKE_SOURCE_DIR}/Sources/ServerJobs/DicomMoveScuJob.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
127 ${CMAKE_SOURCE_DIR}/Sources/ServerJobs/LuaJobManager.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
128 ${CMAKE_SOURCE_DIR}/Sources/ServerJobs/MergeStudyJob.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
129 ${CMAKE_SOURCE_DIR}/Sources/ServerJobs/Operations/DeleteResourceOperation.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
130 ${CMAKE_SOURCE_DIR}/Sources/ServerJobs/Operations/DicomInstanceOperationValue.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
131 ${CMAKE_SOURCE_DIR}/Sources/ServerJobs/Operations/ModifyInstanceOperation.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
132 ${CMAKE_SOURCE_DIR}/Sources/ServerJobs/Operations/StorePeerOperation.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
133 ${CMAKE_SOURCE_DIR}/Sources/ServerJobs/Operations/StoreScuOperation.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
134 ${CMAKE_SOURCE_DIR}/Sources/ServerJobs/Operations/SystemCallOperation.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
135 ${CMAKE_SOURCE_DIR}/Sources/ServerJobs/OrthancJobUnserializer.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
136 ${CMAKE_SOURCE_DIR}/Sources/ServerJobs/OrthancPeerStoreJob.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
137 ${CMAKE_SOURCE_DIR}/Sources/ServerJobs/ResourceModificationJob.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
138 ${CMAKE_SOURCE_DIR}/Sources/ServerJobs/SplitStudyJob.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
139 ${CMAKE_SOURCE_DIR}/Sources/ServerJobs/StorageCommitmentScpJob.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
140 ${CMAKE_SOURCE_DIR}/Sources/ServerToolbox.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
141 ${CMAKE_SOURCE_DIR}/Sources/SliceOrdering.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
142 ${CMAKE_SOURCE_DIR}/Sources/StorageCommitmentReports.cpp |
2691 | 143 ) |
144 | |
145 | |
4045 | 146 set(ORTHANC_FRAMEWORK_UNIT_TESTS |
4091
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
147 ${CMAKE_SOURCE_DIR}/../OrthancFramework/UnitTestsSources/DicomMapTests.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
148 ${CMAKE_SOURCE_DIR}/../OrthancFramework/UnitTestsSources/FileStorageTests.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
149 ${CMAKE_SOURCE_DIR}/../OrthancFramework/UnitTestsSources/FrameworkTests.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
150 ${CMAKE_SOURCE_DIR}/../OrthancFramework/UnitTestsSources/FromDcmtkTests.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
151 ${CMAKE_SOURCE_DIR}/../OrthancFramework/UnitTestsSources/ImageProcessingTests.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
152 ${CMAKE_SOURCE_DIR}/../OrthancFramework/UnitTestsSources/ImageTests.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
153 ${CMAKE_SOURCE_DIR}/../OrthancFramework/UnitTestsSources/JobsTests.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
154 ${CMAKE_SOURCE_DIR}/../OrthancFramework/UnitTestsSources/JpegLosslessTests.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
155 ${CMAKE_SOURCE_DIR}/../OrthancFramework/UnitTestsSources/LoggingTests.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
156 ${CMAKE_SOURCE_DIR}/../OrthancFramework/UnitTestsSources/LuaTests.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
157 ${CMAKE_SOURCE_DIR}/../OrthancFramework/UnitTestsSources/MemoryCacheTests.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
158 ${CMAKE_SOURCE_DIR}/../OrthancFramework/UnitTestsSources/RestApiTests.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
159 ${CMAKE_SOURCE_DIR}/../OrthancFramework/UnitTestsSources/SQLiteChromiumTests.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
160 ${CMAKE_SOURCE_DIR}/../OrthancFramework/UnitTestsSources/SQLiteTests.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
161 ${CMAKE_SOURCE_DIR}/../OrthancFramework/UnitTestsSources/StreamTests.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
162 ${CMAKE_SOURCE_DIR}/../OrthancFramework/UnitTestsSources/ToolboxTests.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
163 ${CMAKE_SOURCE_DIR}/../OrthancFramework/UnitTestsSources/ZipTests.cpp |
4045 | 164 ) |
165 | |
166 set(ORTHANC_SERVER_UNIT_TESTS | |
4091
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
167 ${CMAKE_SOURCE_DIR}/UnitTestsSources/DatabaseLookupTests.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
168 ${CMAKE_SOURCE_DIR}/UnitTestsSources/LuaServerTests.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
169 ${CMAKE_SOURCE_DIR}/UnitTestsSources/PluginsTests.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
170 ${CMAKE_SOURCE_DIR}/UnitTestsSources/ServerIndexTests.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
171 ${CMAKE_SOURCE_DIR}/UnitTestsSources/ServerJobsTests.cpp |
4520
f5cb0c0ffbed
added unit test OrthancFramework.SizeOf to dump sizeof all the public classes in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
172 ${CMAKE_SOURCE_DIR}/UnitTestsSources/SizeOfTests.cpp |
4091
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
173 ${CMAKE_SOURCE_DIR}/UnitTestsSources/UnitTestsMain.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
174 ${CMAKE_SOURCE_DIR}/UnitTestsSources/VersionsTests.cpp |
2691 | 175 ) |
176 | |
177 | |
178 if (ENABLE_PLUGINS) | |
4091
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
179 include_directories(${CMAKE_SOURCE_DIR}/Plugins/Include) |
3074
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3071
diff
changeset
|
180 |
2691 | 181 list(APPEND ORTHANC_SERVER_SOURCES |
4091
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
182 ${CMAKE_SOURCE_DIR}/Plugins/Engine/OrthancPluginDatabase.cpp |
4595
cc64385593ef
added OrthancPluginRegisterDatabaseBackendV3() to plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4591
diff
changeset
|
183 ${CMAKE_SOURCE_DIR}/Plugins/Engine/OrthancPluginDatabaseV3.cpp |
5083
75e949689c08
PluginDatabaseV4 to handle customData
Alain Mazy <am@osimis.io>
parents:
5080
diff
changeset
|
184 ${CMAKE_SOURCE_DIR}/Plugins/Engine/OrthancPluginDatabaseV4.cpp |
4091
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
185 ${CMAKE_SOURCE_DIR}/Plugins/Engine/OrthancPlugins.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
186 ${CMAKE_SOURCE_DIR}/Plugins/Engine/PluginsEnumerations.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
187 ${CMAKE_SOURCE_DIR}/Plugins/Engine/PluginsErrorDictionary.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
188 ${CMAKE_SOURCE_DIR}/Plugins/Engine/PluginsJob.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
189 ${CMAKE_SOURCE_DIR}/Plugins/Engine/PluginsManager.cpp |
2691 | 190 ) |
191 | |
4045 | 192 list(APPEND ORTHANC_SERVER_UNIT_TESTS |
4091
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
193 ${CMAKE_SOURCE_DIR}/UnitTestsSources/PluginsTests.cpp |
2691 | 194 ) |
195 endif() | |
196 | |
197 | |
198 if (CMAKE_COMPILER_IS_GNUCXX | |
199 AND NOT CMAKE_CROSSCOMPILING | |
3275 | 200 AND DCMTK_STATIC_VERSION STREQUAL "3.6.0") |
2691 | 201 # Add the "-pedantic" flag only on the Orthanc sources, and only if |
202 # cross-compiling DCMTK 3.6.0 | |
203 set(ORTHANC_ALL_SOURCES | |
204 ${ORTHANC_CORE_SOURCES_INTERNAL} | |
205 ${ORTHANC_DICOM_SOURCES_INTERNAL} | |
206 ${ORTHANC_SERVER_SOURCES} | |
4045 | 207 ${ORTHANC_FRAMEWORK_UNIT_TESTS} |
208 ${ORTHANC_SERVER_UNIT_TESTS} | |
4091
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
209 ${CMAKE_SOURCE_DIR}/Plugins/Samples/ModalityWorklists/Plugin.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
210 ${CMAKE_SOURCE_DIR}/Plugins/Samples/ServeFolders/Plugin.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
211 ${CMAKE_SOURCE_DIR}/Sources/EmbeddedResourceHttpHandler.cpp |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
212 ${CMAKE_SOURCE_DIR}/Sources/main.cpp |
2691 | 213 ) |
214 | |
215 set_source_files_properties(${ORTHANC_ALL_SOURCES} | |
216 PROPERTIES COMPILE_FLAGS -pedantic | |
217 ) | |
218 endif() | |
219 | |
220 | |
221 ##################################################################### | |
222 ## Autogeneration of files | |
223 ##################################################################### | |
224 | |
225 set(ORTHANC_EMBEDDED_FILES | |
4091
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
226 CONFIGURATION_SAMPLE ${CMAKE_SOURCE_DIR}/Resources/Configuration.json |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
227 DICOM_CONFORMANCE_STATEMENT ${CMAKE_SOURCE_DIR}/Resources/DicomConformanceStatement.txt |
4121 | 228 FONT_UBUNTU_MONO_BOLD_16 ${CMAKE_SOURCE_DIR}/Resources/Fonts/UbuntuMonoBold-16.json |
4091
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
229 LUA_TOOLBOX ${CMAKE_SOURCE_DIR}/Resources/Toolbox.lua |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
230 PREPARE_DATABASE ${CMAKE_SOURCE_DIR}/Sources/Database/PrepareDatabase.sql |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
231 UPGRADE_DATABASE_3_TO_4 ${CMAKE_SOURCE_DIR}/Sources/Database/Upgrade3To4.sql |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
232 UPGRADE_DATABASE_4_TO_5 ${CMAKE_SOURCE_DIR}/Sources/Database/Upgrade4To5.sql |
5084
9770d537880d
added support for revision in SQLite + avoid upgrading DB version
Alain Mazy <am@osimis.io>
parents:
5083
diff
changeset
|
233 INSTALL_REVISION_AND_CUSTOM_DATA |
9770d537880d
added support for revision in SQLite + avoid upgrading DB version
Alain Mazy <am@osimis.io>
parents:
5083
diff
changeset
|
234 ${CMAKE_SOURCE_DIR}/Sources/Database/InstallRevisionAndCustomData.sql |
3094
61da3c9b4121
cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3093
diff
changeset
|
235 |
61da3c9b4121
cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3093
diff
changeset
|
236 INSTALL_TRACK_ATTACHMENTS_SIZE |
4091
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
237 ${CMAKE_SOURCE_DIR}/Sources/Database/InstallTrackAttachmentsSize.sql |
2691 | 238 ) |
239 | |
240 if (STANDALONE_BUILD) | |
241 # We embed all the resources in the binaries for standalone builds | |
4030
100fbe970762
DANGEROUS commit: removing HAS_EMBEDDED_RESOURCES
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4015
diff
changeset
|
242 add_definitions( |
100fbe970762
DANGEROUS commit: removing HAS_EMBEDDED_RESOURCES
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4015
diff
changeset
|
243 -DORTHANC_STANDALONE=1 |
100fbe970762
DANGEROUS commit: removing HAS_EMBEDDED_RESOURCES
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4015
diff
changeset
|
244 ) |
4031
e3b3af80732d
ServerResources, and moving EmbeddedResourceHttpHandler from Core to OrthancServer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4030
diff
changeset
|
245 |
e3b3af80732d
ServerResources, and moving EmbeddedResourceHttpHandler from Core to OrthancServer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4030
diff
changeset
|
246 list(APPEND ORTHANC_EMBEDDED_FILES |
4091
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
247 ORTHANC_EXPLORER ${CMAKE_SOURCE_DIR}/OrthancExplorer |
2691 | 248 ) |
249 else() | |
250 add_definitions( | |
4030
100fbe970762
DANGEROUS commit: removing HAS_EMBEDDED_RESOURCES
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4015
diff
changeset
|
251 -DORTHANC_PATH=\"${CMAKE_SOURCE_DIR}\" |
2691 | 252 -DORTHANC_STANDALONE=0 |
253 ) | |
254 endif() | |
255 | |
4031
e3b3af80732d
ServerResources, and moving EmbeddedResourceHttpHandler from Core to OrthancServer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4030
diff
changeset
|
256 EmbedResources( |
e3b3af80732d
ServerResources, and moving EmbeddedResourceHttpHandler from Core to OrthancServer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4030
diff
changeset
|
257 --namespace=Orthanc.ServerResources |
4032
058b5ade8acd
renaming embedded resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4031
diff
changeset
|
258 --target=OrthancServerResources |
4091
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
259 --framework-path=${CMAKE_SOURCE_DIR}/../OrthancFramework/Sources |
4031
e3b3af80732d
ServerResources, and moving EmbeddedResourceHttpHandler from Core to OrthancServer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4030
diff
changeset
|
260 ${ORTHANC_EMBEDDED_FILES} |
e3b3af80732d
ServerResources, and moving EmbeddedResourceHttpHandler from Core to OrthancServer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4030
diff
changeset
|
261 ) |
e3b3af80732d
ServerResources, and moving EmbeddedResourceHttpHandler from Core to OrthancServer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4030
diff
changeset
|
262 |
e3b3af80732d
ServerResources, and moving EmbeddedResourceHttpHandler from Core to OrthancServer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4030
diff
changeset
|
263 |
2691 | 264 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") |
265 execute_process( | |
266 COMMAND | |
4091
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
267 ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/../OrthancFramework/Resources/WindowsResources.py |
2691 | 268 ${ORTHANC_VERSION} Orthanc Orthanc.exe "Lightweight, RESTful DICOM server for medical imaging" |
269 ERROR_VARIABLE Failure | |
270 OUTPUT_FILE ${AUTOGENERATED_DIR}/Orthanc.rc | |
271 ) | |
272 | |
273 if (Failure) | |
274 message(FATAL_ERROR "Error while computing the version information: ${Failure}") | |
275 endif() | |
276 | |
277 list(APPEND ORTHANC_RESOURCES ${AUTOGENERATED_DIR}/Orthanc.rc) | |
278 endif() | |
279 | |
280 | |
281 | |
282 ##################################################################### | |
283 ## Configuration of the C/C++ macros | |
284 ##################################################################### | |
285 | |
4366
6a39ca7083b9
New config option "MallocArenaMax" to control memory usage on GNU/Linux
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4240
diff
changeset
|
286 check_symbol_exists(mallopt "malloc.h" HAVE_MALLOPT) |
6a39ca7083b9
New config option "MallocArenaMax" to control memory usage on GNU/Linux
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4240
diff
changeset
|
287 |
6a39ca7083b9
New config option "MallocArenaMax" to control memory usage on GNU/Linux
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4240
diff
changeset
|
288 if (HAVE_MALLOPT) |
6a39ca7083b9
New config option "MallocArenaMax" to control memory usage on GNU/Linux
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4240
diff
changeset
|
289 add_definitions(-DHAVE_MALLOPT=1) |
6a39ca7083b9
New config option "MallocArenaMax" to control memory usage on GNU/Linux
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4240
diff
changeset
|
290 else() |
6a39ca7083b9
New config option "MallocArenaMax" to control memory usage on GNU/Linux
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4240
diff
changeset
|
291 add_definitions(-DHAVE_MALLOPT=0) |
6a39ca7083b9
New config option "MallocArenaMax" to control memory usage on GNU/Linux
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4240
diff
changeset
|
292 endif() |
6a39ca7083b9
New config option "MallocArenaMax" to control memory usage on GNU/Linux
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4240
diff
changeset
|
293 |
6a39ca7083b9
New config option "MallocArenaMax" to control memory usage on GNU/Linux
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4240
diff
changeset
|
294 |
4063
e00f3d089991
shared library of orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4060
diff
changeset
|
295 if (STATIC_BUILD) |
e00f3d089991
shared library of orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4060
diff
changeset
|
296 add_definitions(-DORTHANC_STATIC=1) |
e00f3d089991
shared library of orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4060
diff
changeset
|
297 else() |
e00f3d089991
shared library of orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4060
diff
changeset
|
298 add_definitions(-DORTHANC_STATIC=0) |
e00f3d089991
shared library of orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4060
diff
changeset
|
299 endif() |
e00f3d089991
shared library of orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4060
diff
changeset
|
300 |
e00f3d089991
shared library of orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4060
diff
changeset
|
301 |
2691 | 302 if (ENABLE_PLUGINS) |
303 add_definitions(-DORTHANC_ENABLE_PLUGINS=1) | |
304 else() | |
305 add_definitions(-DORTHANC_ENABLE_PLUGINS=0) | |
306 endif() | |
307 | |
308 | |
309 if (UNIT_TESTS_WITH_HTTP_CONNEXIONS) | |
310 add_definitions(-DUNIT_TESTS_WITH_HTTP_CONNEXIONS=1) | |
311 else() | |
312 add_definitions(-DUNIT_TESTS_WITH_HTTP_CONNEXIONS=0) | |
313 endif() | |
314 | |
315 | |
316 add_definitions( | |
317 -DORTHANC_BUILD_UNIT_TESTS=1 | |
4096
d633e5bb7ba3
reusing of ISqlLookupFormatter and DatabaseConstraint in orthanc-databases project
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4091
diff
changeset
|
318 -DORTHANC_BUILDING_SERVER_LIBRARY=1 |
2691 | 319 |
320 # Macros for the plugins | |
321 -DHAS_ORTHANC_EXCEPTION=0 | |
322 -DMODALITY_WORKLISTS_VERSION="${ORTHANC_VERSION}" | |
323 -DSERVE_FOLDERS_VERSION="${ORTHANC_VERSION}" | |
4981 | 324 -DHOUSEKEEPER_VERSION="${ORTHANC_VERSION}" |
5080
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
325 -DADVANCED_STORAGE_VERSION="${ORTHANC_VERSION}" |
2691 | 326 ) |
327 | |
328 | |
329 # Setup precompiled headers for Microsoft Visual Studio | |
330 | |
331 # WARNING: There must be NO MORE "add_definitions()", "include()" or | |
332 # "include_directories()" below, otherwise the generated precompiled | |
333 # headers might get broken! | |
334 | |
335 if (MSVC) | |
336 add_definitions(-DORTHANC_USE_PRECOMPILED_HEADERS=1) | |
337 | |
338 set(TMP | |
339 ${ORTHANC_CORE_SOURCES_INTERNAL} | |
340 ${ORTHANC_DICOM_SOURCES_INTERNAL} | |
341 ) | |
342 | |
343 ADD_VISUAL_STUDIO_PRECOMPILED_HEADERS( | |
4091
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
344 "PrecompiledHeaders.h" "${CMAKE_SOURCE_DIR}/../OrthancFramework/Sources/PrecompiledHeaders.cpp" |
2691 | 345 TMP ORTHANC_CORE_PCH) |
346 | |
347 ADD_VISUAL_STUDIO_PRECOMPILED_HEADERS( | |
4091
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
348 "PrecompiledHeadersServer.h" "${CMAKE_SOURCE_DIR}/Sources/PrecompiledHeadersServer.cpp" |
2691 | 349 ORTHANC_SERVER_SOURCES ORTHANC_SERVER_PCH) |
350 | |
351 ADD_VISUAL_STUDIO_PRECOMPILED_HEADERS( | |
4091
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
352 "PrecompiledHeadersUnitTests.h" "${CMAKE_SOURCE_DIR}/UnitTestsSources/PrecompiledHeadersUnitTests.cpp" |
4045 | 353 ORTHANC_SERVER_UNIT_TESTS ORTHANC_UNIT_TESTS_PCH) |
2691 | 354 endif() |
355 | |
356 | |
357 | |
358 ##################################################################### | |
359 ## Build the core of Orthanc | |
360 ##################################################################### | |
361 | |
362 # "CoreLibrary" contains all the third-party dependencies and the | |
363 # content of the "Core" folder | |
364 add_library(CoreLibrary | |
365 STATIC | |
366 ${ORTHANC_CORE_PCH} | |
367 ${ORTHANC_CORE_SOURCES} | |
368 ${ORTHANC_DICOM_SOURCES} | |
369 ${AUTOGENERATED_SOURCES} | |
3270 | 370 ) |
371 | |
372 if (LIBICU_LIBRARIES) | |
373 target_link_libraries(CoreLibrary ${LIBICU_LIBRARIES}) | |
374 endif() | |
2691 | 375 |
376 | |
377 ##################################################################### | |
378 ## Build the Orthanc server | |
379 ##################################################################### | |
380 | |
381 add_library(ServerLibrary | |
382 STATIC | |
383 ${ORTHANC_SERVER_PCH} | |
384 ${ORTHANC_SERVER_SOURCES} | |
385 ) | |
386 | |
387 # Ensure autogenerated code is built before building ServerLibrary | |
388 add_dependencies(ServerLibrary CoreLibrary) | |
389 | |
390 add_executable(Orthanc | |
4091
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
391 ${CMAKE_SOURCE_DIR}/Sources/main.cpp |
2691 | 392 ${ORTHANC_RESOURCES} |
393 ) | |
394 | |
395 target_link_libraries(Orthanc ServerLibrary CoreLibrary ${DCMTK_LIBRARIES}) | |
396 | |
4761
31e12d2ce275
Linux Standard Base (LSB) builds of Orthanc can load non-LSB builds of plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4595
diff
changeset
|
397 if ("${CMAKE_SYSTEM_VERSION}" STREQUAL "LinuxStandardBase") |
31e12d2ce275
Linux Standard Base (LSB) builds of Orthanc can load non-LSB builds of plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4595
diff
changeset
|
398 # The link flag below hides all the global functions so that a Linux |
31e12d2ce275
Linux Standard Base (LSB) builds of Orthanc can load non-LSB builds of plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4595
diff
changeset
|
399 # Standard Base (LSB) build of Orthanc can load plugins that are not |
31e12d2ce275
Linux Standard Base (LSB) builds of Orthanc can load non-LSB builds of plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4595
diff
changeset
|
400 # built using LSB (new in Orthanc 1.9.7) |
31e12d2ce275
Linux Standard Base (LSB) builds of Orthanc can load non-LSB builds of plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4595
diff
changeset
|
401 set_property( |
31e12d2ce275
Linux Standard Base (LSB) builds of Orthanc can load non-LSB builds of plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4595
diff
changeset
|
402 TARGET Orthanc |
31e12d2ce275
Linux Standard Base (LSB) builds of Orthanc can load non-LSB builds of plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4595
diff
changeset
|
403 PROPERTY LINK_FLAGS "-Wl,--version-script=${CMAKE_SOURCE_DIR}/Resources/VersionScriptOrthanc.map" |
31e12d2ce275
Linux Standard Base (LSB) builds of Orthanc can load non-LSB builds of plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4595
diff
changeset
|
404 ) |
31e12d2ce275
Linux Standard Base (LSB) builds of Orthanc can load non-LSB builds of plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4595
diff
changeset
|
405 endif() |
31e12d2ce275
Linux Standard Base (LSB) builds of Orthanc can load non-LSB builds of plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4595
diff
changeset
|
406 |
2691 | 407 install( |
408 TARGETS Orthanc | |
409 RUNTIME DESTINATION sbin | |
410 ) | |
411 | |
412 | |
413 ##################################################################### | |
414 ## Build the unit tests | |
415 ##################################################################### | |
416 | |
417 add_executable(UnitTests | |
418 ${GOOGLE_TEST_SOURCES} | |
419 ${ORTHANC_UNIT_TESTS_PCH} | |
4045 | 420 ${ORTHANC_FRAMEWORK_UNIT_TESTS} |
421 ${ORTHANC_SERVER_UNIT_TESTS} | |
3326
b21d4cc8e5d1
speed up base64 decoding + added tests
Alain Mazy <alain@mazy.be>
parents:
3295
diff
changeset
|
422 ${BOOST_EXTENDED_SOURCES} |
2691 | 423 ) |
424 | |
425 target_link_libraries(UnitTests | |
426 ServerLibrary | |
427 CoreLibrary | |
428 ${DCMTK_LIBRARIES} | |
429 ${GOOGLE_TEST_LIBRARIES} | |
430 ) | |
431 | |
432 | |
433 ##################################################################### | |
3233
47fbb0467a62
Build a static library to share code between the plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3187
diff
changeset
|
434 ## Build a static library to share code between the plugins |
47fbb0467a62
Build a static library to share code between the plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3187
diff
changeset
|
435 ##################################################################### |
47fbb0467a62
Build a static library to share code between the plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3187
diff
changeset
|
436 |
47fbb0467a62
Build a static library to share code between the plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3187
diff
changeset
|
437 if (ENABLE_PLUGINS AND |
5080
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
438 (BUILD_SERVE_FOLDERS OR BUILD_MODALITY_WORKLISTS OR BUILD_HOUSEKEEPER OR BUILD_ADVANCED_STORAGE)) |
3233
47fbb0467a62
Build a static library to share code between the plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3187
diff
changeset
|
439 add_library(ThirdPartyPlugins STATIC |
47fbb0467a62
Build a static library to share code between the plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3187
diff
changeset
|
440 ${BOOST_SOURCES} |
47fbb0467a62
Build a static library to share code between the plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3187
diff
changeset
|
441 ${JSONCPP_SOURCES} |
47fbb0467a62
Build a static library to share code between the plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3187
diff
changeset
|
442 ${LIBICONV_SOURCES} |
47fbb0467a62
Build a static library to share code between the plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3187
diff
changeset
|
443 ${LIBICU_SOURCES} |
4091
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
444 Plugins/Samples/Common/OrthancPluginCppWrapper.cpp |
3233
47fbb0467a62
Build a static library to share code between the plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3187
diff
changeset
|
445 ) |
47fbb0467a62
Build a static library to share code between the plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3187
diff
changeset
|
446 |
3271 | 447 if (LIBICU_LIBRARIES) |
448 target_link_libraries(ThirdPartyPlugins ${LIBICU_LIBRARIES}) | |
449 endif() | |
450 | |
3233
47fbb0467a62
Build a static library to share code between the plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3187
diff
changeset
|
451 # Add the "-fPIC" option as this static library must be embedded |
47fbb0467a62
Build a static library to share code between the plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3187
diff
changeset
|
452 # inside shared libraries (important on UNIX) |
47fbb0467a62
Build a static library to share code between the plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3187
diff
changeset
|
453 set_property( |
47fbb0467a62
Build a static library to share code between the plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3187
diff
changeset
|
454 TARGET ThirdPartyPlugins |
47fbb0467a62
Build a static library to share code between the plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3187
diff
changeset
|
455 PROPERTY POSITION_INDEPENDENT_CODE ON |
47fbb0467a62
Build a static library to share code between the plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3187
diff
changeset
|
456 ) |
47fbb0467a62
Build a static library to share code between the plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3187
diff
changeset
|
457 endif() |
47fbb0467a62
Build a static library to share code between the plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3187
diff
changeset
|
458 |
47fbb0467a62
Build a static library to share code between the plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3187
diff
changeset
|
459 |
47fbb0467a62
Build a static library to share code between the plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3187
diff
changeset
|
460 ##################################################################### |
2691 | 461 ## Build the "ServeFolders" plugin |
462 ##################################################################### | |
463 | |
464 if (ENABLE_PLUGINS AND BUILD_SERVE_FOLDERS) | |
465 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") | |
466 execute_process( | |
467 COMMAND | |
4091
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
468 ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/../OrthancFramework/Resources/WindowsResources.py |
2691 | 469 ${ORTHANC_VERSION} ServeFolders ServeFolders.dll "Orthanc plugin to serve additional folders" |
470 ERROR_VARIABLE Failure | |
471 OUTPUT_FILE ${AUTOGENERATED_DIR}/ServeFolders.rc | |
472 ) | |
473 | |
474 if (Failure) | |
475 message(FATAL_ERROR "Error while computing the version information: ${Failure}") | |
476 endif() | |
477 | |
478 list(APPEND SERVE_FOLDERS_RESOURCES ${AUTOGENERATED_DIR}/ServeFolders.rc) | |
479 endif() | |
480 | |
481 add_library(ServeFolders SHARED | |
4091
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
482 ${CMAKE_SOURCE_DIR}/Plugins/Samples/ServeFolders/Plugin.cpp |
2691 | 483 ${SERVE_FOLDERS_RESOURCES} |
484 ) | |
485 | |
3233
47fbb0467a62
Build a static library to share code between the plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3187
diff
changeset
|
486 target_link_libraries(ServeFolders ThirdPartyPlugins) |
47fbb0467a62
Build a static library to share code between the plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3187
diff
changeset
|
487 |
2691 | 488 set_target_properties( |
489 ServeFolders PROPERTIES | |
490 VERSION ${ORTHANC_VERSION} | |
491 SOVERSION ${ORTHANC_VERSION} | |
492 ) | |
493 | |
494 install( | |
495 TARGETS ServeFolders | |
496 RUNTIME DESTINATION lib # Destination for Windows | |
497 LIBRARY DESTINATION share/orthanc/plugins # Destination for Linux | |
498 ) | |
499 endif() | |
500 | |
501 | |
502 | |
503 ##################################################################### | |
504 ## Build the "ModalityWorklists" plugin | |
505 ##################################################################### | |
506 | |
507 if (ENABLE_PLUGINS AND BUILD_MODALITY_WORKLISTS) | |
508 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") | |
509 execute_process( | |
510 COMMAND | |
4091
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
511 ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/../OrthancFramework/Resources/WindowsResources.py |
2691 | 512 ${ORTHANC_VERSION} ModalityWorklists ModalityWorklists.dll "Sample Orthanc plugin to serve modality worklists" |
513 ERROR_VARIABLE Failure | |
514 OUTPUT_FILE ${AUTOGENERATED_DIR}/ModalityWorklists.rc | |
515 ) | |
516 | |
517 if (Failure) | |
518 message(FATAL_ERROR "Error while computing the version information: ${Failure}") | |
519 endif() | |
520 | |
521 list(APPEND MODALITY_WORKLISTS_RESOURCES ${AUTOGENERATED_DIR}/ModalityWorklists.rc) | |
522 endif() | |
523 | |
524 add_library(ModalityWorklists SHARED | |
4091
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
525 ${CMAKE_SOURCE_DIR}/Plugins/Samples/ModalityWorklists/Plugin.cpp |
2691 | 526 ${MODALITY_WORKLISTS_RESOURCES} |
527 ) | |
528 | |
3233
47fbb0467a62
Build a static library to share code between the plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3187
diff
changeset
|
529 target_link_libraries(ModalityWorklists ThirdPartyPlugins) |
47fbb0467a62
Build a static library to share code between the plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3187
diff
changeset
|
530 |
2691 | 531 set_target_properties( |
532 ModalityWorklists PROPERTIES | |
533 VERSION ${ORTHANC_VERSION} | |
534 SOVERSION ${ORTHANC_VERSION} | |
535 ) | |
536 | |
537 install( | |
538 TARGETS ModalityWorklists | |
539 RUNTIME DESTINATION lib # Destination for Windows | |
540 LIBRARY DESTINATION share/orthanc/plugins # Destination for Linux | |
541 ) | |
542 endif() | |
543 | |
544 | |
5024
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
545 if (ENABLE_PLUGINS AND (BUILD_DELAYED_DELETION OR BUILD_CONNECTIVITY_CHECKS)) |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
546 include(ExternalProject) |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
547 |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
548 endif() |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
549 |
2691 | 550 |
551 ##################################################################### | |
3622
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
552 ## Build the "ConnectivityChecks" plugin |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
553 ##################################################################### |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
554 |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
555 if (ENABLE_PLUGINS AND BUILD_CONNECTIVITY_CHECKS) |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
556 |
5024
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
557 set(ConnectivityChecksFlags) |
3627
b03854e0f796
trying to fix output folders for OS X and windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3626
diff
changeset
|
558 |
3622
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
559 if (CMAKE_TOOLCHAIN_FILE) |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
560 # Take absolute path to the toolchain |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
561 get_filename_component(TMP ${CMAKE_TOOLCHAIN_FILE} REALPATH BASE ${CMAKE_SOURCE_DIR}) |
5024
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
562 list(APPEND ConnectivityChecksFlags -DCMAKE_TOOLCHAIN_FILE=${TMP}) |
3622
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
563 endif() |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
564 |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
565 if ("${CMAKE_SYSTEM_VERSION}" STREQUAL "LinuxStandardBase") |
5024
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
566 list(APPEND ConnectivityChecksFlags |
3625 | 567 -DLSB_CC=${CMAKE_LSB_CC} |
568 -DLSB_CXX=${CMAKE_LSB_CXX} | |
3622
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
569 ) |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
570 endif() |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
571 |
3637
06eb59faf4da
use a shorter path for VS2008
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3636
diff
changeset
|
572 externalproject_add(ConnectivityChecks |
4091
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
573 SOURCE_DIR "${CMAKE_SOURCE_DIR}/Plugins/Samples/ConnectivityChecks" |
3622
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
574 |
3637
06eb59faf4da
use a shorter path for VS2008
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3636
diff
changeset
|
575 # We explicitly provide a build directory, in order to avoid paths |
06eb59faf4da
use a shorter path for VS2008
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3636
diff
changeset
|
576 # that are too long on our Visual Studio 2008 CIS |
06eb59faf4da
use a shorter path for VS2008
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3636
diff
changeset
|
577 BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/ConnectivityChecks-build" |
06eb59faf4da
use a shorter path for VS2008
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3636
diff
changeset
|
578 |
5024
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
579 # this helps triggering build when changing the external project |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
580 BUILD_ALWAYS 1 |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
581 |
3622
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
582 CMAKE_ARGS |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
583 -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} |
3623 | 584 -DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR} |
3622
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
585 -DPLUGIN_VERSION=${ORTHANC_VERSION} |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
586 -DSTATIC_BUILD=${STATIC_BUILD} |
3625 | 587 -DALLOW_DOWNLOADS=${ALLOW_DOWNLOADS} |
4168
88d704264d64
fix for ubuntu 14.04
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4124
diff
changeset
|
588 -DUSE_SYSTEM_BOOST=${USE_SYSTEM_BOOST} |
3622
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
589 -DUSE_LEGACY_JSONCPP=${USE_LEGACY_JSONCPP} |
5067
6ad2bea0e07e
upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5024
diff
changeset
|
590 -DUSE_LEGACY_BOOST=${USE_LEGACY_BOOST} |
5024
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
591 ${ConnectivityChecksFlags} |
4966
ee6d7937a6cf
pass user-specific compiler flags to the ConnectivityChecks subproject
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4892
diff
changeset
|
592 |
ee6d7937a6cf
pass user-specific compiler flags to the ConnectivityChecks subproject
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4892
diff
changeset
|
593 -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} |
ee6d7937a6cf
pass user-specific compiler flags to the ConnectivityChecks subproject
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4892
diff
changeset
|
594 -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS} |
ee6d7937a6cf
pass user-specific compiler flags to the ConnectivityChecks subproject
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4892
diff
changeset
|
595 -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} |
ee6d7937a6cf
pass user-specific compiler flags to the ConnectivityChecks subproject
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4892
diff
changeset
|
596 -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} |
4970 | 597 -DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET} |
598 -DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES} | |
3622
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
599 ) |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
600 |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
601 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
602 if (MSVC) |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
603 set(Prefix "") |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
604 else() |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
605 set(Prefix "lib") # MinGW |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
606 endif() |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
607 |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
608 install(FILES |
3633
5295a49dd78a
removing not working tricks for ConnectivityChecks plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3628
diff
changeset
|
609 ${CMAKE_CURRENT_BINARY_DIR}/${Prefix}ConnectivityChecks.dll |
3622
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
610 DESTINATION "lib") |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
611 else() |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
612 list(GET CMAKE_FIND_LIBRARY_PREFIXES 0 Prefix) |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
613 list(GET CMAKE_FIND_LIBRARY_SUFFIXES 0 Suffix) |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
614 install(FILES |
3633
5295a49dd78a
removing not working tricks for ConnectivityChecks plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3628
diff
changeset
|
615 ${CMAKE_CURRENT_BINARY_DIR}/${Prefix}ConnectivityChecks${Suffix} |
5295a49dd78a
removing not working tricks for ConnectivityChecks plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3628
diff
changeset
|
616 ${CMAKE_CURRENT_BINARY_DIR}/${Prefix}ConnectivityChecks${Suffix}.${ORTHANC_VERSION} |
3622
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
617 DESTINATION "share/orthanc/plugins") |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
618 endif() |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
619 endif() |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
620 |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
621 |
5024
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
622 ##################################################################### |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
623 ## Build the "DelayedDeletion" plugin |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
624 ##################################################################### |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
625 |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
626 if (ENABLE_PLUGINS AND BUILD_DELAYED_DELETION) |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
627 |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
628 set(DelayedDeletionFlags) |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
629 |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
630 if (CMAKE_TOOLCHAIN_FILE) |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
631 # Take absolute path to the toolchain |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
632 get_filename_component(TMP ${CMAKE_TOOLCHAIN_FILE} REALPATH BASE ${CMAKE_SOURCE_DIR}) |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
633 list(APPEND DelayedDeletionFlags -DCMAKE_TOOLCHAIN_FILE=${TMP}) |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
634 endif() |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
635 |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
636 if ("${CMAKE_SYSTEM_VERSION}" STREQUAL "LinuxStandardBase") |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
637 list(APPEND DelayedDeletionFlags |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
638 -DLSB_CC=${CMAKE_LSB_CC} |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
639 -DLSB_CXX=${CMAKE_LSB_CXX} |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
640 ) |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
641 endif() |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
642 |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
643 externalproject_add(DelayedDeletion |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
644 SOURCE_DIR "${CMAKE_SOURCE_DIR}/Plugins/Samples/DelayedDeletion" |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
645 |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
646 # We explicitly provide a build directory, in order to avoid paths |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
647 # that are too long on our Visual Studio 2008 CIS |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
648 BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/DelayedDeletion-build" |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
649 |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
650 # this helps triggering build when changing the external project |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
651 BUILD_ALWAYS 1 |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
652 |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
653 CMAKE_ARGS |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
654 -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
655 -DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR} |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
656 -DPLUGIN_VERSION=${ORTHANC_VERSION} |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
657 -DSTATIC_BUILD=${STATIC_BUILD} |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
658 -DALLOW_DOWNLOADS=${ALLOW_DOWNLOADS} |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
659 -DUSE_SYSTEM_BOOST=${USE_SYSTEM_BOOST} |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
660 -DUSE_LEGACY_JSONCPP=${USE_LEGACY_JSONCPP} |
5067
6ad2bea0e07e
upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5024
diff
changeset
|
661 -DUSE_LEGACY_BOOST=${USE_LEGACY_BOOST} |
5024
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
662 ${DelayedDeletionFlags} |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
663 |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
664 -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
665 -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS} |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
666 -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
667 -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
668 -DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET} |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
669 -DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES} |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
670 ) |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
671 |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
672 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
673 if (MSVC) |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
674 set(Prefix "") |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
675 else() |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
676 set(Prefix "lib") # MinGW |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
677 endif() |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
678 |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
679 install(FILES |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
680 ${CMAKE_CURRENT_BINARY_DIR}/${Prefix}DelayedDeletion.dll |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
681 DESTINATION "lib") |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
682 else() |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
683 list(GET CMAKE_FIND_LIBRARY_PREFIXES 0 Prefix) |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
684 list(GET CMAKE_FIND_LIBRARY_SUFFIXES 0 Suffix) |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
685 install(FILES |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
686 ${CMAKE_CURRENT_BINARY_DIR}/${Prefix}DelayedDeletion${Suffix} |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
687 ${CMAKE_CURRENT_BINARY_DIR}/${Prefix}DelayedDeletion${Suffix}.${ORTHANC_VERSION} |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
688 DESTINATION "share/orthanc/plugins") |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
689 endif() |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
690 endif() |
c2ebc47f4f18
wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents:
4981
diff
changeset
|
691 |
3622
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
692 |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
693 ##################################################################### |
4979
f316413027fd
renamed DbOptizer into Housekeeper + add Scheduler & triggers
Alain Mazy <am@osimis.io>
parents:
4971
diff
changeset
|
694 ## Build the "Housekeeper" plugin |
4961 | 695 ##################################################################### |
696 | |
4981 | 697 if (ENABLE_PLUGINS AND BUILD_HOUSEKEEPER) |
698 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") | |
699 execute_process( | |
700 COMMAND | |
701 ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/../OrthancFramework/Resources/WindowsResources.py | |
702 ${ORTHANC_VERSION} Housekeeper Housekeeper.dll "Sample Orthanc plugin to optimize/clean the DB/Storage" | |
703 ERROR_VARIABLE Failure | |
704 OUTPUT_FILE ${AUTOGENERATED_DIR}/Housekeeper.rc | |
705 ) | |
706 | |
707 if (Failure) | |
708 message(FATAL_ERROR "Error while computing the version information: ${Failure}") | |
709 endif() | |
710 | |
711 list(APPEND HOUSEKEEPER_RESOURCES ${AUTOGENERATED_DIR}/Housekeeper.rc) | |
712 endif() | |
713 | |
714 add_library(Housekeeper SHARED | |
715 ${CMAKE_SOURCE_DIR}/Plugins/Samples/Housekeeper/Plugin.cpp | |
716 ${HOUSEKEEPER_RESOURCES} | |
717 ) | |
718 | |
719 target_link_libraries(Housekeeper | |
720 ThirdPartyPlugins | |
721 ) | |
722 | |
723 set_target_properties( | |
724 Housekeeper PROPERTIES | |
725 VERSION ${ORTHANC_VERSION} | |
726 SOVERSION ${ORTHANC_VERSION} | |
727 ) | |
728 | |
729 install( | |
730 TARGETS Housekeeper | |
731 RUNTIME DESTINATION lib # Destination for Windows | |
732 LIBRARY DESTINATION share/orthanc/plugins # Destination for Linux | |
733 ) | |
4961 | 734 endif() |
735 | |
736 | |
737 ##################################################################### | |
5080
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
738 ## Build the "AdvancedStorage" plugin |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
739 ##################################################################### |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
740 |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
741 if (ENABLE_PLUGINS AND BUILD_ADVANCED_STORAGE) |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
742 |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
743 set(AdvancedStorageFlags) |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
744 |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
745 if (CMAKE_TOOLCHAIN_FILE) |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
746 # Take absolute path to the toolchain |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
747 get_filename_component(TMP ${CMAKE_TOOLCHAIN_FILE} REALPATH BASE ${CMAKE_SOURCE_DIR}) |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
748 list(APPEND AdvancedStorageFlags -DCMAKE_TOOLCHAIN_FILE=${TMP}) |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
749 endif() |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
750 |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
751 if ("${CMAKE_SYSTEM_VERSION}" STREQUAL "LinuxStandardBase") |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
752 list(APPEND AdvancedStorageFlags |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
753 -DLSB_CC=${CMAKE_LSB_CC} |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
754 -DLSB_CXX=${CMAKE_LSB_CXX} |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
755 ) |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
756 endif() |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
757 |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
758 externalproject_add(AdvancedStorage |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
759 SOURCE_DIR "${CMAKE_SOURCE_DIR}/Plugins/Samples/AdvancedStorage" |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
760 |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
761 # We explicitly provide a build directory, in order to avoid paths |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
762 # that are too long on our Visual Studio 2008 CIS |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
763 BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/AdvancedStorage-build" |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
764 |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
765 # this helps triggering build when changing the external project |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
766 BUILD_ALWAYS 1 |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
767 |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
768 CMAKE_ARGS |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
769 -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
770 -DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR} |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
771 -DPLUGIN_VERSION=${ORTHANC_VERSION} |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
772 -DSTATIC_BUILD=${STATIC_BUILD} |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
773 -DALLOW_DOWNLOADS=${ALLOW_DOWNLOADS} |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
774 -DUSE_SYSTEM_BOOST=${USE_SYSTEM_BOOST} |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
775 -DUSE_LEGACY_JSONCPP=${USE_LEGACY_JSONCPP} |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
776 -DUSE_LEGACY_BOOST=${USE_LEGACY_BOOST} |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
777 ${AdvancedStorageFlags} |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
778 |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
779 -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
780 -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS} |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
781 -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
782 -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
783 -DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET} |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
784 -DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES} |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
785 ) |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
786 |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
787 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
788 if (MSVC) |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
789 set(Prefix "") |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
790 else() |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
791 set(Prefix "lib") # MinGW |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
792 endif() |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
793 |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
794 install(FILES |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
795 ${CMAKE_CURRENT_BINARY_DIR}/${Prefix}AdvancedStorage.dll |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
796 DESTINATION "lib") |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
797 else() |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
798 list(GET CMAKE_FIND_LIBRARY_PREFIXES 0 Prefix) |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
799 list(GET CMAKE_FIND_LIBRARY_SUFFIXES 0 Suffix) |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
800 install(FILES |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
801 ${CMAKE_CURRENT_BINARY_DIR}/${Prefix}AdvancedStorage${Suffix} |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
802 ${CMAKE_CURRENT_BINARY_DIR}/${Prefix}AdvancedStorage${Suffix}.${ORTHANC_VERSION} |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
803 DESTINATION "share/orthanc/plugins") |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
804 endif() |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
805 endif() |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
806 |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
807 |
d7274e43ea7c
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
Alain Mazy <am@osimis.io>
parents:
5067
diff
changeset
|
808 ##################################################################### |
2691 | 809 ## Build the companion tool to recover files compressed using Orthanc |
810 ##################################################################### | |
811 | |
812 if (BUILD_RECOVER_COMPRESSED_FILE) | |
813 set(RECOVER_COMPRESSED_SOURCES | |
4091
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
814 ${CMAKE_SOURCE_DIR}/Resources/Samples/Tools/RecoverCompressedFile.cpp |
2691 | 815 ) |
816 | |
817 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") | |
818 execute_process( | |
819 COMMAND | |
4091
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
820 ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/../OrthancFramework/Resources/WindowsResources.py |
2691 | 821 ${ORTHANC_VERSION} OrthancRecoverCompressedFile OrthancRecoverCompressedFile.exe |
822 "Lightweight, RESTful DICOM server for medical imaging" | |
823 ERROR_VARIABLE Failure | |
824 OUTPUT_FILE ${AUTOGENERATED_DIR}/OrthancRecoverCompressedFile.rc | |
825 ) | |
826 | |
827 if (Failure) | |
828 message(FATAL_ERROR "Error while computing the version information: ${Failure}") | |
829 endif() | |
830 | |
831 list(APPEND RECOVER_COMPRESSED_SOURCES | |
832 ${AUTOGENERATED_DIR}/OrthancRecoverCompressedFile.rc | |
833 ) | |
834 endif() | |
835 | |
836 add_executable(OrthancRecoverCompressedFile ${RECOVER_COMPRESSED_SOURCES}) | |
837 | |
838 target_link_libraries(OrthancRecoverCompressedFile CoreLibrary) | |
839 | |
840 install( | |
841 TARGETS OrthancRecoverCompressedFile | |
842 RUNTIME DESTINATION bin | |
843 ) | |
844 endif() | |
845 | |
846 | |
847 | |
848 ##################################################################### | |
849 ## Generate the documentation if Doxygen is present | |
850 ##################################################################### | |
851 | |
852 find_package(Doxygen) | |
853 if (DOXYGEN_FOUND) | |
854 configure_file( | |
4091
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
855 ${CMAKE_SOURCE_DIR}/Resources/Orthanc.doxygen |
2691 | 856 ${CMAKE_CURRENT_BINARY_DIR}/Orthanc.doxygen |
857 @ONLY) | |
858 | |
859 configure_file( | |
4091
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
860 ${CMAKE_SOURCE_DIR}/Resources/OrthancPlugin.doxygen |
2691 | 861 ${CMAKE_CURRENT_BINARY_DIR}/OrthancPlugin.doxygen |
862 @ONLY) | |
863 | |
864 add_custom_target(doc | |
865 ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Orthanc.doxygen | |
866 COMMENT "Generating internal documentation with Doxygen" VERBATIM | |
867 ) | |
868 | |
869 add_custom_command(TARGET Orthanc | |
870 POST_BUILD | |
871 COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/OrthancPlugin.doxygen | |
872 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} | |
873 COMMENT "Generating plugin documentation with Doxygen" VERBATIM | |
874 ) | |
875 | |
876 install( | |
877 DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/OrthancPluginDocumentation/doc/ | |
878 DESTINATION share/doc/orthanc/OrthancPlugin | |
879 ) | |
880 else() | |
881 message("Doxygen not found. The documentation will not be built.") | |
882 endif() | |
883 | |
884 | |
885 | |
886 ##################################################################### | |
887 ## Install the plugin SDK | |
888 ##################################################################### | |
889 | |
890 if (ENABLE_PLUGINS) | |
891 install( | |
892 FILES | |
4091
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
893 ${CMAKE_SOURCE_DIR}/Plugins/Include/orthanc/OrthancCPlugin.h |
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
894 ${CMAKE_SOURCE_DIR}/Plugins/Include/orthanc/OrthancCDatabasePlugin.h |
2691 | 895 DESTINATION include/orthanc |
896 ) | |
897 endif() | |
898 | |
899 | |
900 | |
901 ##################################################################### | |
902 ## Prepare the "uninstall" target | |
903 ## http://www.cmake.org/Wiki/CMake_FAQ#Can_I_do_.22make_uninstall.22_with_CMake.3F | |
904 ##################################################################### | |
905 | |
906 configure_file( | |
4091
19a2f1d2b816
moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
907 "${CMAKE_SOURCE_DIR}/../OrthancFramework/Resources/CMake/Uninstall.cmake.in" |
2691 | 908 "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" |
909 IMMEDIATE @ONLY) | |
910 | |
911 add_custom_target(uninstall | |
912 COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake) |