Mercurial > hg > orthanc
annotate CMakeLists.txt @ 3747:7b6058f8f7aa transcoding
new branch: transcoding
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 13 Mar 2020 08:32:13 +0100 |
parents | 33c19a6643e1 |
children | 3b5feb2bbd4b |
rev | line source |
---|---|
2691 | 1 cmake_minimum_required(VERSION 2.8) |
2 | |
3 project(Orthanc) | |
4 | |
5 | |
6 ##################################################################### | |
7 ## Generic parameters of the Orthanc framework | |
8 ##################################################################### | |
9 | |
10 include(${CMAKE_SOURCE_DIR}/Resources/CMake/OrthancFrameworkParameters.cmake) | |
11 | |
12 # Enable all the optional components of the Orthanc framework | |
13 set(ENABLE_CRYPTO_OPTIONS ON) | |
14 set(ENABLE_DCMTK ON) | |
15 set(ENABLE_DCMTK_NETWORKING ON) | |
16 set(ENABLE_GOOGLE_TEST ON) | |
17 set(ENABLE_JPEG ON) | |
18 set(ENABLE_LOCALE ON) | |
19 set(ENABLE_LUA ON) | |
3723
cc6d4edfe8fe
fix pkcs11 compilation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3633
diff
changeset
|
20 set(ENABLE_OPENSSL_ENGINES ON) # OpenSSL engines are necessary for PKCS11 |
2691 | 21 set(ENABLE_PNG ON) |
22 set(ENABLE_PUGIXML ON) | |
23 set(ENABLE_SQLITE ON) | |
24 set(ENABLE_WEB_CLIENT ON) | |
25 set(ENABLE_WEB_SERVER ON) | |
26 set(ENABLE_ZLIB ON) | |
27 | |
3743
33c19a6643e1
creating IDicomTranscoder abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3723
diff
changeset
|
28 # To test transcoding |
3747
7b6058f8f7aa
new branch: transcoding
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3743
diff
changeset
|
29 set(ENABLE_DCMTK_TRANSCODING ON) |
3743
33c19a6643e1
creating IDicomTranscoder abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3723
diff
changeset
|
30 |
2691 | 31 set(HAS_EMBEDDED_RESOURCES ON) |
32 | |
33 | |
34 ##################################################################### | |
35 ## CMake parameters tunable at the command line to configure the | |
36 ## plugins, the companion tools, and the unit tests | |
37 ##################################################################### | |
38 | |
39 # Parameters of the build | |
40 SET(BUILD_MODALITY_WORKLISTS ON CACHE BOOL "Whether to build the sample plugin to serve modality worklists") | |
41 SET(BUILD_RECOVER_COMPRESSED_FILE ON CACHE BOOL "Whether to build the companion tool to recover files compressed using Orthanc") | |
42 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
|
43 SET(BUILD_CONNECTIVITY_CHECKS ON CACHE BOOL "Whether to build the ConnectivityChecks plugin") |
2691 | 44 SET(ENABLE_PLUGINS ON CACHE BOOL "Enable plugins") |
45 SET(UNIT_TESTS_WITH_HTTP_CONNEXIONS ON CACHE BOOL "Allow unit tests to make HTTP requests") | |
46 | |
47 | |
48 ##################################################################### | |
49 ## Configuration of the Orthanc framework | |
50 ##################################################################### | |
51 | |
52 include(${CMAKE_SOURCE_DIR}/Resources/CMake/VisualStudioPrecompiledHeaders.cmake) | |
53 include(${CMAKE_SOURCE_DIR}/Resources/CMake/OrthancFrameworkConfiguration.cmake) | |
54 | |
55 | |
56 ##################################################################### | |
57 ## List of source files | |
58 ##################################################################### | |
59 | |
60 set(ORTHANC_SERVER_SOURCES | |
3093
2e1808b6146a
reorganization of folders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3091
diff
changeset
|
61 OrthancServer/Database/Compatibility/DatabaseLookup.cpp |
2e1808b6146a
reorganization of folders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3091
diff
changeset
|
62 OrthancServer/Database/Compatibility/ICreateInstance.cpp |
2e1808b6146a
reorganization of folders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3091
diff
changeset
|
63 OrthancServer/Database/Compatibility/IGetChildrenMetadata.cpp |
3187
4bbadcd03966
refactoring retrieval of metadata from database
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3095
diff
changeset
|
64 OrthancServer/Database/Compatibility/ILookupResourceAndParent.cpp |
3093
2e1808b6146a
reorganization of folders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3091
diff
changeset
|
65 OrthancServer/Database/Compatibility/ILookupResources.cpp |
2e1808b6146a
reorganization of folders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3091
diff
changeset
|
66 OrthancServer/Database/Compatibility/SetOfResources.cpp |
3094
61da3c9b4121
cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3093
diff
changeset
|
67 OrthancServer/Database/ResourcesContent.cpp |
3093
2e1808b6146a
reorganization of folders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3091
diff
changeset
|
68 OrthancServer/Database/SQLiteDatabaseWrapper.cpp |
2691 | 69 OrthancServer/DicomInstanceOrigin.cpp |
70 OrthancServer/DicomInstanceToStore.cpp | |
71 OrthancServer/ExportedResource.cpp | |
72 OrthancServer/LuaScripting.cpp | |
2933
4a38d7d4f0e0
new class: OrthancConfiguration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2893
diff
changeset
|
73 OrthancServer/OrthancConfiguration.cpp |
2691 | 74 OrthancServer/OrthancFindRequestHandler.cpp |
75 OrthancServer/OrthancHttpHandler.cpp | |
76 OrthancServer/OrthancInitialization.cpp | |
77 OrthancServer/OrthancMoveRequestHandler.cpp | |
78 OrthancServer/OrthancRestApi/OrthancRestAnonymizeModify.cpp | |
79 OrthancServer/OrthancRestApi/OrthancRestApi.cpp | |
80 OrthancServer/OrthancRestApi/OrthancRestArchive.cpp | |
81 OrthancServer/OrthancRestApi/OrthancRestChanges.cpp | |
82 OrthancServer/OrthancRestApi/OrthancRestModalities.cpp | |
83 OrthancServer/OrthancRestApi/OrthancRestResources.cpp | |
84 OrthancServer/OrthancRestApi/OrthancRestSystem.cpp | |
85 OrthancServer/QueryRetrieveHandler.cpp | |
3029
ea653ec47f31
new class: DatabaseConstraint
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3018
diff
changeset
|
86 OrthancServer/Search/DatabaseConstraint.cpp |
2892
ce310baccda6
DicomTagConstraint and DatabaseLookup
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2867
diff
changeset
|
87 OrthancServer/Search/DatabaseLookup.cpp |
ce310baccda6
DicomTagConstraint and DatabaseLookup
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2867
diff
changeset
|
88 OrthancServer/Search/DicomTagConstraint.cpp |
2691 | 89 OrthancServer/Search/HierarchicalMatcher.cpp |
3058
6faf575ba9cc
refactoring: class ISqlLookupFormatter to be used in orthanc-databases
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3057
diff
changeset
|
90 OrthancServer/Search/ISqlLookupFormatter.cpp |
2691 | 91 OrthancServer/ServerContext.cpp |
92 OrthancServer/ServerEnumerations.cpp | |
93 OrthancServer/ServerIndex.cpp | |
94 OrthancServer/ServerJobs/ArchiveJob.cpp | |
95 OrthancServer/ServerJobs/DicomModalityStoreJob.cpp | |
2867 | 96 OrthancServer/ServerJobs/DicomMoveScuJob.cpp |
2691 | 97 OrthancServer/ServerJobs/LuaJobManager.cpp |
2853
52b017d22a4f
New URI: "/studies/.../merge" to merge a study
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2844
diff
changeset
|
98 OrthancServer/ServerJobs/MergeStudyJob.cpp |
2691 | 99 OrthancServer/ServerJobs/Operations/DeleteResourceOperation.cpp |
3095
beeeb6096f27
removing dependencies upon ServerContext
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3094
diff
changeset
|
100 OrthancServer/ServerJobs/Operations/DicomInstanceOperationValue.cpp |
2691 | 101 OrthancServer/ServerJobs/Operations/ModifyInstanceOperation.cpp |
102 OrthancServer/ServerJobs/Operations/StorePeerOperation.cpp | |
103 OrthancServer/ServerJobs/Operations/StoreScuOperation.cpp | |
104 OrthancServer/ServerJobs/Operations/SystemCallOperation.cpp | |
105 OrthancServer/ServerJobs/OrthancJobUnserializer.cpp | |
106 OrthancServer/ServerJobs/OrthancPeerStoreJob.cpp | |
107 OrthancServer/ServerJobs/ResourceModificationJob.cpp | |
2844
99863d6245b2
New URI: "/studies/.../split" to split a study
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2808
diff
changeset
|
108 OrthancServer/ServerJobs/SplitStudyJob.cpp |
2691 | 109 OrthancServer/ServerToolbox.cpp |
110 OrthancServer/SliceOrdering.cpp | |
111 ) | |
112 | |
113 | |
114 set(ORTHANC_UNIT_TESTS_SOURCES | |
2893
1723cbba55c7
testing DicomTagConstraint
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2892
diff
changeset
|
115 UnitTestsSources/DatabaseLookupTests.cpp |
2691 | 116 UnitTestsSources/DicomMapTests.cpp |
117 UnitTestsSources/FileStorageTests.cpp | |
118 UnitTestsSources/FromDcmtkTests.cpp | |
2893
1723cbba55c7
testing DicomTagConstraint
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2892
diff
changeset
|
119 UnitTestsSources/ImageProcessingTests.cpp |
1723cbba55c7
testing DicomTagConstraint
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2892
diff
changeset
|
120 UnitTestsSources/ImageTests.cpp |
1723cbba55c7
testing DicomTagConstraint
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2892
diff
changeset
|
121 UnitTestsSources/JpegLosslessTests.cpp |
3353
54cdad5a7228
Added a public function that will use emscripten-specific logging functions when using its SDK + scaffolding work. Build and UT OK on msvc15 x64. Not actually tested under *nix or emscripten yet
Benjamin Golinvaux <bgo@osimis.io>
parents:
3333
diff
changeset
|
122 UnitTestsSources/LoggingTests.cpp |
2893
1723cbba55c7
testing DicomTagConstraint
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2892
diff
changeset
|
123 UnitTestsSources/LuaTests.cpp |
2691 | 124 UnitTestsSources/MemoryCacheTests.cpp |
2893
1723cbba55c7
testing DicomTagConstraint
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2892
diff
changeset
|
125 UnitTestsSources/MultiThreadingTests.cpp |
2691 | 126 UnitTestsSources/RestApiTests.cpp |
2893
1723cbba55c7
testing DicomTagConstraint
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2892
diff
changeset
|
127 UnitTestsSources/SQLiteChromiumTests.cpp |
2691 | 128 UnitTestsSources/SQLiteTests.cpp |
129 UnitTestsSources/ServerIndexTests.cpp | |
2893
1723cbba55c7
testing DicomTagConstraint
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2892
diff
changeset
|
130 UnitTestsSources/StreamTests.cpp |
3326
b21d4cc8e5d1
speed up base64 decoding + added tests
Alain Mazy <alain@mazy.be>
parents:
3295
diff
changeset
|
131 UnitTestsSources/ToolboxTests.cpp |
2893
1723cbba55c7
testing DicomTagConstraint
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2892
diff
changeset
|
132 UnitTestsSources/UnitTestsMain.cpp |
2691 | 133 UnitTestsSources/VersionsTests.cpp |
134 UnitTestsSources/ZipTests.cpp | |
135 ) | |
136 | |
137 | |
138 if (ENABLE_PLUGINS) | |
3074
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3071
diff
changeset
|
139 include_directories(${CMAKE_SOURCE_DIR}/Plugins/Include) |
495c5edce708
new extension for database plugin SDK: lookupResources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3071
diff
changeset
|
140 |
2691 | 141 list(APPEND ORTHANC_SERVER_SOURCES |
142 Plugins/Engine/OrthancPluginDatabase.cpp | |
143 Plugins/Engine/OrthancPlugins.cpp | |
144 Plugins/Engine/PluginsEnumerations.cpp | |
145 Plugins/Engine/PluginsErrorDictionary.cpp | |
2808
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2773
diff
changeset
|
146 Plugins/Engine/PluginsJob.cpp |
2691 | 147 Plugins/Engine/PluginsManager.cpp |
148 ) | |
149 | |
150 list(APPEND ORTHANC_UNIT_TESTS_SOURCES | |
151 UnitTestsSources/PluginsTests.cpp | |
152 ) | |
153 endif() | |
154 | |
155 | |
156 if (CMAKE_COMPILER_IS_GNUCXX | |
157 AND NOT CMAKE_CROSSCOMPILING | |
3275 | 158 AND DCMTK_STATIC_VERSION STREQUAL "3.6.0") |
2691 | 159 # Add the "-pedantic" flag only on the Orthanc sources, and only if |
160 # cross-compiling DCMTK 3.6.0 | |
161 set(ORTHANC_ALL_SOURCES | |
162 ${ORTHANC_CORE_SOURCES_INTERNAL} | |
163 ${ORTHANC_DICOM_SOURCES_INTERNAL} | |
164 ${ORTHANC_SERVER_SOURCES} | |
165 ${ORTHANC_UNIT_TESTS_SOURCES} | |
166 Plugins/Samples/ServeFolders/Plugin.cpp | |
167 Plugins/Samples/ModalityWorklists/Plugin.cpp | |
168 OrthancServer/main.cpp | |
169 ) | |
170 | |
171 set_source_files_properties(${ORTHANC_ALL_SOURCES} | |
172 PROPERTIES COMPILE_FLAGS -pedantic | |
173 ) | |
174 endif() | |
175 | |
176 | |
177 ##################################################################### | |
178 ## Autogeneration of files | |
179 ##################################################################### | |
180 | |
181 set(ORTHANC_EMBEDDED_FILES | |
3094
61da3c9b4121
cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3093
diff
changeset
|
182 CONFIGURATION_SAMPLE ${CMAKE_CURRENT_SOURCE_DIR}/Resources/Configuration.json |
61da3c9b4121
cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3093
diff
changeset
|
183 DICOM_CONFORMANCE_STATEMENT ${CMAKE_CURRENT_SOURCE_DIR}/Resources/DicomConformanceStatement.txt |
61da3c9b4121
cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3093
diff
changeset
|
184 FONT_UBUNTU_MONO_BOLD_16 ${CMAKE_CURRENT_SOURCE_DIR}/Resources/Fonts/UbuntuMonoBold-16.json |
61da3c9b4121
cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3093
diff
changeset
|
185 LUA_TOOLBOX ${CMAKE_CURRENT_SOURCE_DIR}/Resources/Toolbox.lua |
61da3c9b4121
cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3093
diff
changeset
|
186 PREPARE_DATABASE ${CMAKE_CURRENT_SOURCE_DIR}/OrthancServer/Database/PrepareDatabase.sql |
61da3c9b4121
cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3093
diff
changeset
|
187 UPGRADE_DATABASE_3_TO_4 ${CMAKE_CURRENT_SOURCE_DIR}/OrthancServer/Database/Upgrade3To4.sql |
61da3c9b4121
cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3093
diff
changeset
|
188 UPGRADE_DATABASE_4_TO_5 ${CMAKE_CURRENT_SOURCE_DIR}/OrthancServer/Database/Upgrade4To5.sql |
61da3c9b4121
cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3093
diff
changeset
|
189 |
61da3c9b4121
cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3093
diff
changeset
|
190 INSTALL_TRACK_ATTACHMENTS_SIZE |
61da3c9b4121
cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3093
diff
changeset
|
191 ${CMAKE_CURRENT_SOURCE_DIR}/OrthancServer/Database/InstallTrackAttachmentsSize.sql |
2691 | 192 ) |
193 | |
194 if (STANDALONE_BUILD) | |
195 # We embed all the resources in the binaries for standalone builds | |
196 add_definitions(-DORTHANC_STANDALONE=1) | |
197 EmbedResources( | |
198 ${ORTHANC_EMBEDDED_FILES} | |
199 ORTHANC_EXPLORER ${CMAKE_CURRENT_SOURCE_DIR}/OrthancExplorer | |
200 ${DCMTK_DICTIONARIES} | |
3333
2a38e00a0638
Size of the Orthanc static binaries are reduced by compressing ICU data
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3326
diff
changeset
|
201 ${LIBICU_RESOURCES} |
2691 | 202 ) |
203 else() | |
204 add_definitions( | |
205 -DORTHANC_STANDALONE=0 | |
206 -DORTHANC_PATH=\"${CMAKE_SOURCE_DIR}\" | |
207 ) | |
208 EmbedResources( | |
209 ${ORTHANC_EMBEDDED_FILES} | |
3333
2a38e00a0638
Size of the Orthanc static binaries are reduced by compressing ICU data
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3326
diff
changeset
|
210 ${LIBICU_RESOURCES} |
2691 | 211 ) |
212 endif() | |
213 | |
214 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") | |
215 execute_process( | |
216 COMMAND | |
217 ${PYTHON_EXECUTABLE} ${ORTHANC_ROOT}/Resources/WindowsResources.py | |
218 ${ORTHANC_VERSION} Orthanc Orthanc.exe "Lightweight, RESTful DICOM server for medical imaging" | |
219 ERROR_VARIABLE Failure | |
220 OUTPUT_FILE ${AUTOGENERATED_DIR}/Orthanc.rc | |
221 ) | |
222 | |
223 if (Failure) | |
224 message(FATAL_ERROR "Error while computing the version information: ${Failure}") | |
225 endif() | |
226 | |
227 list(APPEND ORTHANC_RESOURCES ${AUTOGENERATED_DIR}/Orthanc.rc) | |
228 endif() | |
229 | |
230 | |
231 | |
232 ##################################################################### | |
233 ## Configuration of the C/C++ macros | |
234 ##################################################################### | |
235 | |
236 if (ENABLE_PLUGINS) | |
237 add_definitions(-DORTHANC_ENABLE_PLUGINS=1) | |
238 else() | |
239 add_definitions(-DORTHANC_ENABLE_PLUGINS=0) | |
240 endif() | |
241 | |
242 | |
243 if (UNIT_TESTS_WITH_HTTP_CONNEXIONS) | |
244 add_definitions(-DUNIT_TESTS_WITH_HTTP_CONNEXIONS=1) | |
245 else() | |
246 add_definitions(-DUNIT_TESTS_WITH_HTTP_CONNEXIONS=0) | |
247 endif() | |
248 | |
249 | |
250 add_definitions( | |
251 -DORTHANC_BUILD_UNIT_TESTS=1 | |
252 -DORTHANC_ENABLE_LOGGING_PLUGIN=0 | |
253 | |
254 # Macros for the plugins | |
255 -DHAS_ORTHANC_EXCEPTION=0 | |
256 -DMODALITY_WORKLISTS_VERSION="${ORTHANC_VERSION}" | |
257 -DSERVE_FOLDERS_VERSION="${ORTHANC_VERSION}" | |
258 ) | |
259 | |
260 | |
261 # Setup precompiled headers for Microsoft Visual Studio | |
262 | |
263 # WARNING: There must be NO MORE "add_definitions()", "include()" or | |
264 # "include_directories()" below, otherwise the generated precompiled | |
265 # headers might get broken! | |
266 | |
267 if (MSVC) | |
268 add_definitions(-DORTHANC_USE_PRECOMPILED_HEADERS=1) | |
269 | |
270 set(TMP | |
271 ${ORTHANC_CORE_SOURCES_INTERNAL} | |
272 ${ORTHANC_DICOM_SOURCES_INTERNAL} | |
273 ) | |
274 | |
275 ADD_VISUAL_STUDIO_PRECOMPILED_HEADERS( | |
276 "PrecompiledHeaders.h" "Core/PrecompiledHeaders.cpp" | |
277 TMP ORTHANC_CORE_PCH) | |
278 | |
279 ADD_VISUAL_STUDIO_PRECOMPILED_HEADERS( | |
280 "PrecompiledHeadersServer.h" "OrthancServer/PrecompiledHeadersServer.cpp" | |
281 ORTHANC_SERVER_SOURCES ORTHANC_SERVER_PCH) | |
282 | |
283 ADD_VISUAL_STUDIO_PRECOMPILED_HEADERS( | |
284 "PrecompiledHeadersUnitTests.h" "UnitTestsSources/PrecompiledHeadersUnitTests.cpp" | |
285 ORTHANC_UNIT_TESTS_SOURCES ORTHANC_UNIT_TESTS_PCH) | |
286 endif() | |
287 | |
288 | |
289 | |
290 ##################################################################### | |
291 ## Build the core of Orthanc | |
292 ##################################################################### | |
293 | |
294 # "CoreLibrary" contains all the third-party dependencies and the | |
295 # content of the "Core" folder | |
296 add_library(CoreLibrary | |
297 STATIC | |
298 ${ORTHANC_CORE_PCH} | |
299 ${ORTHANC_CORE_SOURCES} | |
300 ${ORTHANC_DICOM_SOURCES} | |
301 ${AUTOGENERATED_SOURCES} | |
3270 | 302 ) |
303 | |
304 if (LIBICU_LIBRARIES) | |
305 target_link_libraries(CoreLibrary ${LIBICU_LIBRARIES}) | |
306 endif() | |
2691 | 307 |
308 | |
309 ##################################################################### | |
310 ## Build the Orthanc server | |
311 ##################################################################### | |
312 | |
313 add_library(ServerLibrary | |
314 STATIC | |
315 ${ORTHANC_SERVER_PCH} | |
316 ${ORTHANC_SERVER_SOURCES} | |
317 ) | |
318 | |
319 # Ensure autogenerated code is built before building ServerLibrary | |
320 add_dependencies(ServerLibrary CoreLibrary) | |
321 | |
322 add_executable(Orthanc | |
323 OrthancServer/main.cpp | |
324 ${ORTHANC_RESOURCES} | |
325 ) | |
326 | |
327 target_link_libraries(Orthanc ServerLibrary CoreLibrary ${DCMTK_LIBRARIES}) | |
328 | |
329 install( | |
330 TARGETS Orthanc | |
331 RUNTIME DESTINATION sbin | |
332 ) | |
333 | |
334 | |
335 ##################################################################### | |
336 ## Build the unit tests | |
337 ##################################################################### | |
338 | |
339 add_executable(UnitTests | |
340 ${GOOGLE_TEST_SOURCES} | |
341 ${ORTHANC_UNIT_TESTS_PCH} | |
342 ${ORTHANC_UNIT_TESTS_SOURCES} | |
3326
b21d4cc8e5d1
speed up base64 decoding + added tests
Alain Mazy <alain@mazy.be>
parents:
3295
diff
changeset
|
343 ${BOOST_EXTENDED_SOURCES} |
2691 | 344 ) |
345 | |
346 target_link_libraries(UnitTests | |
347 ServerLibrary | |
348 CoreLibrary | |
349 ${DCMTK_LIBRARIES} | |
350 ${GOOGLE_TEST_LIBRARIES} | |
351 ) | |
352 | |
353 | |
354 ##################################################################### | |
3233
47fbb0467a62
Build a static library to share code between the plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3187
diff
changeset
|
355 ## 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
|
356 ##################################################################### |
47fbb0467a62
Build a static library to share code between the plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3187
diff
changeset
|
357 |
47fbb0467a62
Build a static library to share code between the plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3187
diff
changeset
|
358 if (ENABLE_PLUGINS AND |
47fbb0467a62
Build a static library to share code between the plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3187
diff
changeset
|
359 (BUILD_SERVE_FOLDERS OR BUILD_MODALITY_WORKLISTS)) |
47fbb0467a62
Build a static library to share code between the plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3187
diff
changeset
|
360 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
|
361 ${BOOST_SOURCES} |
47fbb0467a62
Build a static library to share code between the plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3187
diff
changeset
|
362 ${JSONCPP_SOURCES} |
47fbb0467a62
Build a static library to share code between the plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3187
diff
changeset
|
363 ${LIBICONV_SOURCES} |
47fbb0467a62
Build a static library to share code between the plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3187
diff
changeset
|
364 ${LIBICU_SOURCES} |
47fbb0467a62
Build a static library to share code between the plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3187
diff
changeset
|
365 Plugins/Samples/Common/OrthancPluginCppWrapper.cpp |
47fbb0467a62
Build a static library to share code between the plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3187
diff
changeset
|
366 ) |
47fbb0467a62
Build a static library to share code between the plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3187
diff
changeset
|
367 |
3271 | 368 if (LIBICU_LIBRARIES) |
369 target_link_libraries(ThirdPartyPlugins ${LIBICU_LIBRARIES}) | |
370 endif() | |
371 | |
3233
47fbb0467a62
Build a static library to share code between the plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3187
diff
changeset
|
372 # 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
|
373 # 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
|
374 set_property( |
47fbb0467a62
Build a static library to share code between the plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3187
diff
changeset
|
375 TARGET ThirdPartyPlugins |
47fbb0467a62
Build a static library to share code between the plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3187
diff
changeset
|
376 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
|
377 ) |
47fbb0467a62
Build a static library to share code between the plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3187
diff
changeset
|
378 endif() |
47fbb0467a62
Build a static library to share code between the plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3187
diff
changeset
|
379 |
47fbb0467a62
Build a static library to share code between the plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3187
diff
changeset
|
380 |
47fbb0467a62
Build a static library to share code between the plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3187
diff
changeset
|
381 ##################################################################### |
2691 | 382 ## Build the "ServeFolders" plugin |
383 ##################################################################### | |
384 | |
385 if (ENABLE_PLUGINS AND BUILD_SERVE_FOLDERS) | |
386 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") | |
387 execute_process( | |
388 COMMAND | |
389 ${PYTHON_EXECUTABLE} ${ORTHANC_ROOT}/Resources/WindowsResources.py | |
390 ${ORTHANC_VERSION} ServeFolders ServeFolders.dll "Orthanc plugin to serve additional folders" | |
391 ERROR_VARIABLE Failure | |
392 OUTPUT_FILE ${AUTOGENERATED_DIR}/ServeFolders.rc | |
393 ) | |
394 | |
395 if (Failure) | |
396 message(FATAL_ERROR "Error while computing the version information: ${Failure}") | |
397 endif() | |
398 | |
399 list(APPEND SERVE_FOLDERS_RESOURCES ${AUTOGENERATED_DIR}/ServeFolders.rc) | |
400 endif() | |
401 | |
402 add_library(ServeFolders SHARED | |
403 Plugins/Samples/ServeFolders/Plugin.cpp | |
404 ${SERVE_FOLDERS_RESOURCES} | |
405 ) | |
406 | |
3233
47fbb0467a62
Build a static library to share code between the plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3187
diff
changeset
|
407 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
|
408 |
2691 | 409 set_target_properties( |
410 ServeFolders PROPERTIES | |
411 VERSION ${ORTHANC_VERSION} | |
412 SOVERSION ${ORTHANC_VERSION} | |
413 ) | |
414 | |
415 install( | |
416 TARGETS ServeFolders | |
417 RUNTIME DESTINATION lib # Destination for Windows | |
418 LIBRARY DESTINATION share/orthanc/plugins # Destination for Linux | |
419 ) | |
420 endif() | |
421 | |
422 | |
423 | |
424 ##################################################################### | |
425 ## Build the "ModalityWorklists" plugin | |
426 ##################################################################### | |
427 | |
428 if (ENABLE_PLUGINS AND BUILD_MODALITY_WORKLISTS) | |
429 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") | |
430 execute_process( | |
431 COMMAND | |
432 ${PYTHON_EXECUTABLE} ${ORTHANC_ROOT}/Resources/WindowsResources.py | |
433 ${ORTHANC_VERSION} ModalityWorklists ModalityWorklists.dll "Sample Orthanc plugin to serve modality worklists" | |
434 ERROR_VARIABLE Failure | |
435 OUTPUT_FILE ${AUTOGENERATED_DIR}/ModalityWorklists.rc | |
436 ) | |
437 | |
438 if (Failure) | |
439 message(FATAL_ERROR "Error while computing the version information: ${Failure}") | |
440 endif() | |
441 | |
442 list(APPEND MODALITY_WORKLISTS_RESOURCES ${AUTOGENERATED_DIR}/ModalityWorklists.rc) | |
443 endif() | |
444 | |
445 add_library(ModalityWorklists SHARED | |
446 Plugins/Samples/ModalityWorklists/Plugin.cpp | |
447 ${MODALITY_WORKLISTS_RESOURCES} | |
448 ) | |
449 | |
3233
47fbb0467a62
Build a static library to share code between the plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3187
diff
changeset
|
450 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
|
451 |
2691 | 452 set_target_properties( |
453 ModalityWorklists PROPERTIES | |
454 VERSION ${ORTHANC_VERSION} | |
455 SOVERSION ${ORTHANC_VERSION} | |
456 ) | |
457 | |
458 install( | |
459 TARGETS ModalityWorklists | |
460 RUNTIME DESTINATION lib # Destination for Windows | |
461 LIBRARY DESTINATION share/orthanc/plugins # Destination for Linux | |
462 ) | |
463 endif() | |
464 | |
465 | |
466 | |
467 ##################################################################### | |
3622
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
468 ## Build the "ConnectivityChecks" plugin |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
469 ##################################################################### |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
470 |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
471 if (ENABLE_PLUGINS AND BUILD_CONNECTIVITY_CHECKS) |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
472 include(ExternalProject) |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
473 |
3625 | 474 set(Flags) |
3627
b03854e0f796
trying to fix output folders for OS X and windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3626
diff
changeset
|
475 |
3622
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
476 if (CMAKE_TOOLCHAIN_FILE) |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
477 # Take absolute path to the toolchain |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
478 get_filename_component(TMP ${CMAKE_TOOLCHAIN_FILE} REALPATH BASE ${CMAKE_SOURCE_DIR}) |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
479 list(APPEND Flags -DCMAKE_TOOLCHAIN_FILE=${TMP}) |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
480 endif() |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
481 |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
482 if ("${CMAKE_SYSTEM_VERSION}" STREQUAL "LinuxStandardBase") |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
483 list(APPEND Flags |
3625 | 484 -DLSB_CC=${CMAKE_LSB_CC} |
485 -DLSB_CXX=${CMAKE_LSB_CXX} | |
3622
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
486 ) |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
487 endif() |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
488 |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
489 externalproject_add(ConnectivityChecksProject |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
490 SOURCE_DIR "${ORTHANC_ROOT}/Plugins/Samples/ConnectivityChecks" |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
491 |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
492 CMAKE_ARGS |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
493 -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} |
3623 | 494 -DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR} |
3622
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
495 -DPLUGIN_VERSION=${ORTHANC_VERSION} |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
496 -DSTATIC_BUILD=${STATIC_BUILD} |
3625 | 497 -DALLOW_DOWNLOADS=${ALLOW_DOWNLOADS} |
3622
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
498 -DUSE_LEGACY_JSONCPP=${USE_LEGACY_JSONCPP} |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
499 ${Flags} |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
500 ) |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
501 |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
502 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
503 if (MSVC) |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
504 set(Prefix "") |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
505 else() |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
506 set(Prefix "lib") # MinGW |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
507 endif() |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
508 |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
509 install(FILES |
3633
5295a49dd78a
removing not working tricks for ConnectivityChecks plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3628
diff
changeset
|
510 ${CMAKE_CURRENT_BINARY_DIR}/${Prefix}ConnectivityChecks.dll |
3622
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
511 DESTINATION "lib") |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
512 else() |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
513 list(GET CMAKE_FIND_LIBRARY_PREFIXES 0 Prefix) |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
514 list(GET CMAKE_FIND_LIBRARY_SUFFIXES 0 Suffix) |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
515 install(FILES |
3633
5295a49dd78a
removing not working tricks for ConnectivityChecks plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3628
diff
changeset
|
516 ${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
|
517 ${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
|
518 DESTINATION "share/orthanc/plugins") |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
519 endif() |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
520 endif() |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
521 |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
522 |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
523 |
8afc14fab01f
New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3353
diff
changeset
|
524 ##################################################################### |
2691 | 525 ## Build the companion tool to recover files compressed using Orthanc |
526 ##################################################################### | |
527 | |
528 if (BUILD_RECOVER_COMPRESSED_FILE) | |
529 set(RECOVER_COMPRESSED_SOURCES | |
530 Resources/Samples/Tools/RecoverCompressedFile.cpp | |
531 ) | |
532 | |
533 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") | |
534 execute_process( | |
535 COMMAND | |
536 ${PYTHON_EXECUTABLE} ${ORTHANC_ROOT}/Resources/WindowsResources.py | |
537 ${ORTHANC_VERSION} OrthancRecoverCompressedFile OrthancRecoverCompressedFile.exe | |
538 "Lightweight, RESTful DICOM server for medical imaging" | |
539 ERROR_VARIABLE Failure | |
540 OUTPUT_FILE ${AUTOGENERATED_DIR}/OrthancRecoverCompressedFile.rc | |
541 ) | |
542 | |
543 if (Failure) | |
544 message(FATAL_ERROR "Error while computing the version information: ${Failure}") | |
545 endif() | |
546 | |
547 list(APPEND RECOVER_COMPRESSED_SOURCES | |
548 ${AUTOGENERATED_DIR}/OrthancRecoverCompressedFile.rc | |
549 ) | |
550 endif() | |
551 | |
552 add_executable(OrthancRecoverCompressedFile ${RECOVER_COMPRESSED_SOURCES}) | |
553 | |
554 target_link_libraries(OrthancRecoverCompressedFile CoreLibrary) | |
555 | |
556 install( | |
557 TARGETS OrthancRecoverCompressedFile | |
558 RUNTIME DESTINATION bin | |
559 ) | |
560 endif() | |
561 | |
562 | |
563 | |
564 ##################################################################### | |
565 ## Generate the documentation if Doxygen is present | |
566 ##################################################################### | |
567 | |
568 find_package(Doxygen) | |
569 if (DOXYGEN_FOUND) | |
570 configure_file( | |
571 ${CMAKE_SOURCE_DIR}/Resources/Orthanc.doxygen | |
572 ${CMAKE_CURRENT_BINARY_DIR}/Orthanc.doxygen | |
573 @ONLY) | |
574 | |
575 configure_file( | |
576 ${CMAKE_SOURCE_DIR}/Resources/OrthancPlugin.doxygen | |
577 ${CMAKE_CURRENT_BINARY_DIR}/OrthancPlugin.doxygen | |
578 @ONLY) | |
579 | |
580 add_custom_target(doc | |
581 ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Orthanc.doxygen | |
582 COMMENT "Generating internal documentation with Doxygen" VERBATIM | |
583 ) | |
584 | |
585 add_custom_command(TARGET Orthanc | |
586 POST_BUILD | |
587 COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/OrthancPlugin.doxygen | |
588 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} | |
589 COMMENT "Generating plugin documentation with Doxygen" VERBATIM | |
590 ) | |
591 | |
592 install( | |
593 DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/OrthancPluginDocumentation/doc/ | |
594 DESTINATION share/doc/orthanc/OrthancPlugin | |
595 ) | |
596 else() | |
597 message("Doxygen not found. The documentation will not be built.") | |
598 endif() | |
599 | |
600 | |
601 | |
602 ##################################################################### | |
603 ## Install the plugin SDK | |
604 ##################################################################### | |
605 | |
606 if (ENABLE_PLUGINS) | |
607 install( | |
608 FILES | |
609 Plugins/Include/orthanc/OrthancCPlugin.h | |
610 Plugins/Include/orthanc/OrthancCDatabasePlugin.h | |
611 DESTINATION include/orthanc | |
612 ) | |
613 endif() | |
614 | |
615 | |
616 | |
617 ##################################################################### | |
618 ## Prepare the "uninstall" target | |
619 ## http://www.cmake.org/Wiki/CMake_FAQ#Can_I_do_.22make_uninstall.22_with_CMake.3F | |
620 ##################################################################### | |
621 | |
622 configure_file( | |
623 "${CMAKE_CURRENT_SOURCE_DIR}/Resources/CMake/Uninstall.cmake.in" | |
624 "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" | |
625 IMMEDIATE @ONLY) | |
626 | |
627 add_custom_target(uninstall | |
628 COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake) |