Mercurial > hg > orthanc
annotate CMakeLists.txt @ 2892:ce310baccda6 db-changes
DicomTagConstraint and DatabaseLookup
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 16 Oct 2018 18:00:05 +0200 |
parents | 251614c2edac |
children | 1723cbba55c7 |
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) | |
20 set(ENABLE_PNG ON) | |
21 set(ENABLE_PUGIXML ON) | |
22 set(ENABLE_SQLITE ON) | |
23 set(ENABLE_WEB_CLIENT ON) | |
24 set(ENABLE_WEB_SERVER ON) | |
25 set(ENABLE_ZLIB ON) | |
26 | |
27 set(HAS_EMBEDDED_RESOURCES ON) | |
28 | |
29 | |
30 ##################################################################### | |
31 ## CMake parameters tunable at the command line to configure the | |
32 ## plugins, the companion tools, and the unit tests | |
33 ##################################################################### | |
34 | |
35 # Parameters of the build | |
36 SET(BUILD_MODALITY_WORKLISTS ON CACHE BOOL "Whether to build the sample plugin to serve modality worklists") | |
37 SET(BUILD_RECOVER_COMPRESSED_FILE ON CACHE BOOL "Whether to build the companion tool to recover files compressed using Orthanc") | |
38 SET(BUILD_SERVE_FOLDERS ON CACHE BOOL "Whether to build the ServeFolders plugin") | |
39 SET(ENABLE_PLUGINS ON CACHE BOOL "Enable plugins") | |
40 SET(UNIT_TESTS_WITH_HTTP_CONNEXIONS ON CACHE BOOL "Allow unit tests to make HTTP requests") | |
41 | |
42 | |
43 ##################################################################### | |
44 ## Configuration of the Orthanc framework | |
45 ##################################################################### | |
46 | |
47 include(${CMAKE_SOURCE_DIR}/Resources/CMake/VisualStudioPrecompiledHeaders.cmake) | |
48 include(${CMAKE_SOURCE_DIR}/Resources/CMake/OrthancFrameworkConfiguration.cmake) | |
49 | |
50 | |
51 ##################################################################### | |
52 ## List of source files | |
53 ##################################################################### | |
54 | |
55 set(ORTHANC_SERVER_SOURCES | |
56 OrthancServer/DatabaseWrapper.cpp | |
57 OrthancServer/DicomInstanceOrigin.cpp | |
58 OrthancServer/DicomInstanceToStore.cpp | |
59 OrthancServer/ExportedResource.cpp | |
60 OrthancServer/LuaScripting.cpp | |
61 OrthancServer/OrthancFindRequestHandler.cpp | |
62 OrthancServer/OrthancHttpHandler.cpp | |
63 OrthancServer/OrthancInitialization.cpp | |
64 OrthancServer/OrthancMoveRequestHandler.cpp | |
65 OrthancServer/OrthancRestApi/OrthancRestAnonymizeModify.cpp | |
66 OrthancServer/OrthancRestApi/OrthancRestApi.cpp | |
67 OrthancServer/OrthancRestApi/OrthancRestArchive.cpp | |
68 OrthancServer/OrthancRestApi/OrthancRestChanges.cpp | |
69 OrthancServer/OrthancRestApi/OrthancRestModalities.cpp | |
70 OrthancServer/OrthancRestApi/OrthancRestResources.cpp | |
71 OrthancServer/OrthancRestApi/OrthancRestSystem.cpp | |
72 OrthancServer/QueryRetrieveHandler.cpp | |
2892
ce310baccda6
DicomTagConstraint and DatabaseLookup
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2867
diff
changeset
|
73 OrthancServer/Search/DatabaseLookup.cpp |
ce310baccda6
DicomTagConstraint and DatabaseLookup
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2867
diff
changeset
|
74 OrthancServer/Search/DicomTagConstraint.cpp |
2691 | 75 OrthancServer/Search/HierarchicalMatcher.cpp |
76 OrthancServer/Search/IFindConstraint.cpp | |
77 OrthancServer/Search/ListConstraint.cpp | |
78 OrthancServer/Search/LookupIdentifierQuery.cpp | |
79 OrthancServer/Search/LookupResource.cpp | |
80 OrthancServer/Search/RangeConstraint.cpp | |
81 OrthancServer/Search/SetOfResources.cpp | |
82 OrthancServer/Search/ValueConstraint.cpp | |
83 OrthancServer/Search/WildcardConstraint.cpp | |
84 OrthancServer/ServerContext.cpp | |
85 OrthancServer/ServerEnumerations.cpp | |
86 OrthancServer/ServerIndex.cpp | |
87 OrthancServer/ServerJobs/ArchiveJob.cpp | |
88 OrthancServer/ServerJobs/DicomModalityStoreJob.cpp | |
2867 | 89 OrthancServer/ServerJobs/DicomMoveScuJob.cpp |
2691 | 90 OrthancServer/ServerJobs/LuaJobManager.cpp |
2853
52b017d22a4f
New URI: "/studies/.../merge" to merge a study
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2844
diff
changeset
|
91 OrthancServer/ServerJobs/MergeStudyJob.cpp |
2691 | 92 OrthancServer/ServerJobs/Operations/DeleteResourceOperation.cpp |
93 OrthancServer/ServerJobs/Operations/ModifyInstanceOperation.cpp | |
94 OrthancServer/ServerJobs/Operations/StorePeerOperation.cpp | |
95 OrthancServer/ServerJobs/Operations/StoreScuOperation.cpp | |
96 OrthancServer/ServerJobs/Operations/SystemCallOperation.cpp | |
97 OrthancServer/ServerJobs/OrthancJobUnserializer.cpp | |
98 OrthancServer/ServerJobs/OrthancPeerStoreJob.cpp | |
99 OrthancServer/ServerJobs/ResourceModificationJob.cpp | |
2844
99863d6245b2
New URI: "/studies/.../split" to split a study
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2808
diff
changeset
|
100 OrthancServer/ServerJobs/SplitStudyJob.cpp |
2691 | 101 OrthancServer/ServerToolbox.cpp |
102 OrthancServer/SliceOrdering.cpp | |
103 ) | |
104 | |
105 | |
106 set(ORTHANC_UNIT_TESTS_SOURCES | |
107 UnitTestsSources/DicomMapTests.cpp | |
108 UnitTestsSources/FileStorageTests.cpp | |
109 UnitTestsSources/FromDcmtkTests.cpp | |
110 UnitTestsSources/MemoryCacheTests.cpp | |
111 UnitTestsSources/ImageTests.cpp | |
112 UnitTestsSources/RestApiTests.cpp | |
113 UnitTestsSources/SQLiteTests.cpp | |
114 UnitTestsSources/SQLiteChromiumTests.cpp | |
115 UnitTestsSources/ServerIndexTests.cpp | |
116 UnitTestsSources/VersionsTests.cpp | |
117 UnitTestsSources/ZipTests.cpp | |
118 UnitTestsSources/LuaTests.cpp | |
119 UnitTestsSources/MultiThreadingTests.cpp | |
120 UnitTestsSources/UnitTestsMain.cpp | |
121 UnitTestsSources/ImageProcessingTests.cpp | |
122 UnitTestsSources/JpegLosslessTests.cpp | |
123 UnitTestsSources/StreamTests.cpp | |
124 ) | |
125 | |
126 | |
127 if (ENABLE_PLUGINS) | |
128 list(APPEND ORTHANC_SERVER_SOURCES | |
129 Plugins/Engine/OrthancPluginDatabase.cpp | |
130 Plugins/Engine/OrthancPlugins.cpp | |
131 Plugins/Engine/PluginsEnumerations.cpp | |
132 Plugins/Engine/PluginsErrorDictionary.cpp | |
2808
37583cd183ed
primitives to create jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2773
diff
changeset
|
133 Plugins/Engine/PluginsJob.cpp |
2691 | 134 Plugins/Engine/PluginsManager.cpp |
135 ) | |
136 | |
137 list(APPEND ORTHANC_UNIT_TESTS_SOURCES | |
138 UnitTestsSources/PluginsTests.cpp | |
139 ) | |
140 endif() | |
141 | |
142 | |
143 if (CMAKE_COMPILER_IS_GNUCXX | |
144 AND NOT CMAKE_CROSSCOMPILING | |
145 AND USE_DCMTK_360) | |
146 # Add the "-pedantic" flag only on the Orthanc sources, and only if | |
147 # cross-compiling DCMTK 3.6.0 | |
148 set(ORTHANC_ALL_SOURCES | |
149 ${ORTHANC_CORE_SOURCES_INTERNAL} | |
150 ${ORTHANC_DICOM_SOURCES_INTERNAL} | |
151 ${ORTHANC_SERVER_SOURCES} | |
152 ${ORTHANC_UNIT_TESTS_SOURCES} | |
153 Plugins/Samples/ServeFolders/Plugin.cpp | |
154 Plugins/Samples/ModalityWorklists/Plugin.cpp | |
155 OrthancServer/main.cpp | |
156 ) | |
157 | |
158 set_source_files_properties(${ORTHANC_ALL_SOURCES} | |
159 PROPERTIES COMPILE_FLAGS -pedantic | |
160 ) | |
161 endif() | |
162 | |
163 | |
164 ##################################################################### | |
165 ## Autogeneration of files | |
166 ##################################################################### | |
167 | |
168 set(ORTHANC_EMBEDDED_FILES | |
169 PREPARE_DATABASE ${CMAKE_CURRENT_SOURCE_DIR}/OrthancServer/PrepareDatabase.sql | |
170 UPGRADE_DATABASE_3_TO_4 ${CMAKE_CURRENT_SOURCE_DIR}/OrthancServer/Upgrade3To4.sql | |
171 UPGRADE_DATABASE_4_TO_5 ${CMAKE_CURRENT_SOURCE_DIR}/OrthancServer/Upgrade4To5.sql | |
172 CONFIGURATION_SAMPLE ${CMAKE_CURRENT_SOURCE_DIR}/Resources/Configuration.json | |
173 DICOM_CONFORMANCE_STATEMENT ${CMAKE_CURRENT_SOURCE_DIR}/Resources/DicomConformanceStatement.txt | |
174 LUA_TOOLBOX ${CMAKE_CURRENT_SOURCE_DIR}/Resources/Toolbox.lua | |
175 FONT_UBUNTU_MONO_BOLD_16 ${CMAKE_CURRENT_SOURCE_DIR}/Resources/Fonts/UbuntuMonoBold-16.json | |
176 ) | |
177 | |
178 if (STANDALONE_BUILD) | |
179 # We embed all the resources in the binaries for standalone builds | |
180 add_definitions(-DORTHANC_STANDALONE=1) | |
181 EmbedResources( | |
182 ${ORTHANC_EMBEDDED_FILES} | |
183 ORTHANC_EXPLORER ${CMAKE_CURRENT_SOURCE_DIR}/OrthancExplorer | |
184 ${DCMTK_DICTIONARIES} | |
185 ) | |
186 else() | |
187 add_definitions( | |
188 -DORTHANC_STANDALONE=0 | |
189 -DORTHANC_PATH=\"${CMAKE_SOURCE_DIR}\" | |
190 ) | |
191 EmbedResources( | |
192 ${ORTHANC_EMBEDDED_FILES} | |
193 ) | |
194 endif() | |
195 | |
196 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") | |
197 execute_process( | |
198 COMMAND | |
199 ${PYTHON_EXECUTABLE} ${ORTHANC_ROOT}/Resources/WindowsResources.py | |
200 ${ORTHANC_VERSION} Orthanc Orthanc.exe "Lightweight, RESTful DICOM server for medical imaging" | |
201 ERROR_VARIABLE Failure | |
202 OUTPUT_FILE ${AUTOGENERATED_DIR}/Orthanc.rc | |
203 ) | |
204 | |
205 if (Failure) | |
206 message(FATAL_ERROR "Error while computing the version information: ${Failure}") | |
207 endif() | |
208 | |
209 list(APPEND ORTHANC_RESOURCES ${AUTOGENERATED_DIR}/Orthanc.rc) | |
210 endif() | |
211 | |
212 | |
213 | |
214 ##################################################################### | |
215 ## Configuration of the C/C++ macros | |
216 ##################################################################### | |
217 | |
218 if (ENABLE_PLUGINS) | |
219 add_definitions(-DORTHANC_ENABLE_PLUGINS=1) | |
220 else() | |
221 add_definitions(-DORTHANC_ENABLE_PLUGINS=0) | |
222 endif() | |
223 | |
224 | |
225 if (UNIT_TESTS_WITH_HTTP_CONNEXIONS) | |
226 add_definitions(-DUNIT_TESTS_WITH_HTTP_CONNEXIONS=1) | |
227 else() | |
228 add_definitions(-DUNIT_TESTS_WITH_HTTP_CONNEXIONS=0) | |
229 endif() | |
230 | |
231 | |
232 include_directories(${CMAKE_SOURCE_DIR}/Plugins/Include) | |
233 | |
234 add_definitions( | |
235 -DORTHANC_BUILD_UNIT_TESTS=1 | |
236 -DORTHANC_ENABLE_LOGGING_PLUGIN=0 | |
237 | |
238 # Macros for the plugins | |
239 -DHAS_ORTHANC_EXCEPTION=0 | |
240 -DMODALITY_WORKLISTS_VERSION="${ORTHANC_VERSION}" | |
241 -DSERVE_FOLDERS_VERSION="${ORTHANC_VERSION}" | |
242 ) | |
243 | |
244 | |
245 # Setup precompiled headers for Microsoft Visual Studio | |
246 | |
247 # WARNING: There must be NO MORE "add_definitions()", "include()" or | |
248 # "include_directories()" below, otherwise the generated precompiled | |
249 # headers might get broken! | |
250 | |
251 if (MSVC) | |
252 add_definitions(-DORTHANC_USE_PRECOMPILED_HEADERS=1) | |
253 | |
254 set(TMP | |
255 ${ORTHANC_CORE_SOURCES_INTERNAL} | |
256 ${ORTHANC_DICOM_SOURCES_INTERNAL} | |
257 ) | |
258 | |
259 ADD_VISUAL_STUDIO_PRECOMPILED_HEADERS( | |
260 "PrecompiledHeaders.h" "Core/PrecompiledHeaders.cpp" | |
261 TMP ORTHANC_CORE_PCH) | |
262 | |
263 ADD_VISUAL_STUDIO_PRECOMPILED_HEADERS( | |
264 "PrecompiledHeadersServer.h" "OrthancServer/PrecompiledHeadersServer.cpp" | |
265 ORTHANC_SERVER_SOURCES ORTHANC_SERVER_PCH) | |
266 | |
267 ADD_VISUAL_STUDIO_PRECOMPILED_HEADERS( | |
268 "PrecompiledHeadersUnitTests.h" "UnitTestsSources/PrecompiledHeadersUnitTests.cpp" | |
269 ORTHANC_UNIT_TESTS_SOURCES ORTHANC_UNIT_TESTS_PCH) | |
270 endif() | |
271 | |
272 | |
273 | |
274 ##################################################################### | |
275 ## Build the core of Orthanc | |
276 ##################################################################### | |
277 | |
278 # "CoreLibrary" contains all the third-party dependencies and the | |
279 # content of the "Core" folder | |
280 add_library(CoreLibrary | |
281 STATIC | |
282 ${ORTHANC_CORE_PCH} | |
283 ${ORTHANC_CORE_SOURCES} | |
284 ${ORTHANC_DICOM_SOURCES} | |
285 ${AUTOGENERATED_SOURCES} | |
286 ) | |
287 | |
288 | |
289 ##################################################################### | |
290 ## Build the Orthanc server | |
291 ##################################################################### | |
292 | |
293 add_library(ServerLibrary | |
294 STATIC | |
295 ${ORTHANC_SERVER_PCH} | |
296 ${ORTHANC_SERVER_SOURCES} | |
297 ) | |
298 | |
299 # Ensure autogenerated code is built before building ServerLibrary | |
300 add_dependencies(ServerLibrary CoreLibrary) | |
301 | |
302 add_executable(Orthanc | |
303 OrthancServer/main.cpp | |
304 ${ORTHANC_RESOURCES} | |
305 ) | |
306 | |
307 target_link_libraries(Orthanc ServerLibrary CoreLibrary ${DCMTK_LIBRARIES}) | |
308 | |
309 install( | |
310 TARGETS Orthanc | |
311 RUNTIME DESTINATION sbin | |
312 ) | |
313 | |
314 | |
315 ##################################################################### | |
316 ## Build the unit tests | |
317 ##################################################################### | |
318 | |
319 add_executable(UnitTests | |
320 ${GOOGLE_TEST_SOURCES} | |
321 ${ORTHANC_UNIT_TESTS_PCH} | |
322 ${ORTHANC_UNIT_TESTS_SOURCES} | |
323 ) | |
324 | |
325 target_link_libraries(UnitTests | |
326 ServerLibrary | |
327 CoreLibrary | |
328 ${DCMTK_LIBRARIES} | |
329 ${GOOGLE_TEST_LIBRARIES} | |
330 ) | |
331 | |
332 | |
333 ##################################################################### | |
334 ## Build the "ServeFolders" plugin | |
335 ##################################################################### | |
336 | |
337 if (ENABLE_PLUGINS AND BUILD_SERVE_FOLDERS) | |
338 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") | |
339 execute_process( | |
340 COMMAND | |
341 ${PYTHON_EXECUTABLE} ${ORTHANC_ROOT}/Resources/WindowsResources.py | |
342 ${ORTHANC_VERSION} ServeFolders ServeFolders.dll "Orthanc plugin to serve additional folders" | |
343 ERROR_VARIABLE Failure | |
344 OUTPUT_FILE ${AUTOGENERATED_DIR}/ServeFolders.rc | |
345 ) | |
346 | |
347 if (Failure) | |
348 message(FATAL_ERROR "Error while computing the version information: ${Failure}") | |
349 endif() | |
350 | |
351 list(APPEND SERVE_FOLDERS_RESOURCES ${AUTOGENERATED_DIR}/ServeFolders.rc) | |
352 endif() | |
353 | |
354 add_library(ServeFolders SHARED | |
355 ${BOOST_SOURCES} | |
356 ${JSONCPP_SOURCES} | |
357 ${LIBICONV_SOURCES} | |
358 Plugins/Samples/ServeFolders/Plugin.cpp | |
359 Plugins/Samples/Common/OrthancPluginCppWrapper.cpp | |
360 ${SERVE_FOLDERS_RESOURCES} | |
361 ) | |
362 | |
363 set_target_properties( | |
364 ServeFolders PROPERTIES | |
365 VERSION ${ORTHANC_VERSION} | |
366 SOVERSION ${ORTHANC_VERSION} | |
367 ) | |
368 | |
369 install( | |
370 TARGETS ServeFolders | |
371 RUNTIME DESTINATION lib # Destination for Windows | |
372 LIBRARY DESTINATION share/orthanc/plugins # Destination for Linux | |
373 ) | |
374 endif() | |
375 | |
376 | |
377 | |
378 ##################################################################### | |
379 ## Build the "ModalityWorklists" plugin | |
380 ##################################################################### | |
381 | |
382 if (ENABLE_PLUGINS AND BUILD_MODALITY_WORKLISTS) | |
383 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") | |
384 execute_process( | |
385 COMMAND | |
386 ${PYTHON_EXECUTABLE} ${ORTHANC_ROOT}/Resources/WindowsResources.py | |
387 ${ORTHANC_VERSION} ModalityWorklists ModalityWorklists.dll "Sample Orthanc plugin to serve modality worklists" | |
388 ERROR_VARIABLE Failure | |
389 OUTPUT_FILE ${AUTOGENERATED_DIR}/ModalityWorklists.rc | |
390 ) | |
391 | |
392 if (Failure) | |
393 message(FATAL_ERROR "Error while computing the version information: ${Failure}") | |
394 endif() | |
395 | |
396 list(APPEND MODALITY_WORKLISTS_RESOURCES ${AUTOGENERATED_DIR}/ModalityWorklists.rc) | |
397 endif() | |
398 | |
399 add_library(ModalityWorklists SHARED | |
400 ${BOOST_SOURCES} | |
401 ${JSONCPP_SOURCES} | |
402 ${LIBICONV_SOURCES} | |
403 Plugins/Samples/Common/OrthancPluginCppWrapper.cpp | |
404 Plugins/Samples/ModalityWorklists/Plugin.cpp | |
405 ${MODALITY_WORKLISTS_RESOURCES} | |
406 ) | |
407 | |
408 set_target_properties( | |
409 ModalityWorklists PROPERTIES | |
410 VERSION ${ORTHANC_VERSION} | |
411 SOVERSION ${ORTHANC_VERSION} | |
412 ) | |
413 | |
414 install( | |
415 TARGETS ModalityWorklists | |
416 RUNTIME DESTINATION lib # Destination for Windows | |
417 LIBRARY DESTINATION share/orthanc/plugins # Destination for Linux | |
418 ) | |
419 endif() | |
420 | |
421 | |
422 | |
423 ##################################################################### | |
424 ## Build the companion tool to recover files compressed using Orthanc | |
425 ##################################################################### | |
426 | |
427 if (BUILD_RECOVER_COMPRESSED_FILE) | |
428 set(RECOVER_COMPRESSED_SOURCES | |
429 Resources/Samples/Tools/RecoverCompressedFile.cpp | |
430 ) | |
431 | |
432 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") | |
433 execute_process( | |
434 COMMAND | |
435 ${PYTHON_EXECUTABLE} ${ORTHANC_ROOT}/Resources/WindowsResources.py | |
436 ${ORTHANC_VERSION} OrthancRecoverCompressedFile OrthancRecoverCompressedFile.exe | |
437 "Lightweight, RESTful DICOM server for medical imaging" | |
438 ERROR_VARIABLE Failure | |
439 OUTPUT_FILE ${AUTOGENERATED_DIR}/OrthancRecoverCompressedFile.rc | |
440 ) | |
441 | |
442 if (Failure) | |
443 message(FATAL_ERROR "Error while computing the version information: ${Failure}") | |
444 endif() | |
445 | |
446 list(APPEND RECOVER_COMPRESSED_SOURCES | |
447 ${AUTOGENERATED_DIR}/OrthancRecoverCompressedFile.rc | |
448 ) | |
449 endif() | |
450 | |
451 add_executable(OrthancRecoverCompressedFile ${RECOVER_COMPRESSED_SOURCES}) | |
452 | |
453 target_link_libraries(OrthancRecoverCompressedFile CoreLibrary) | |
454 | |
455 install( | |
456 TARGETS OrthancRecoverCompressedFile | |
457 RUNTIME DESTINATION bin | |
458 ) | |
459 endif() | |
460 | |
461 | |
462 | |
463 ##################################################################### | |
464 ## Generate the documentation if Doxygen is present | |
465 ##################################################################### | |
466 | |
467 find_package(Doxygen) | |
468 if (DOXYGEN_FOUND) | |
469 configure_file( | |
470 ${CMAKE_SOURCE_DIR}/Resources/Orthanc.doxygen | |
471 ${CMAKE_CURRENT_BINARY_DIR}/Orthanc.doxygen | |
472 @ONLY) | |
473 | |
474 configure_file( | |
475 ${CMAKE_SOURCE_DIR}/Resources/OrthancPlugin.doxygen | |
476 ${CMAKE_CURRENT_BINARY_DIR}/OrthancPlugin.doxygen | |
477 @ONLY) | |
478 | |
479 add_custom_target(doc | |
480 ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Orthanc.doxygen | |
481 COMMENT "Generating internal documentation with Doxygen" VERBATIM | |
482 ) | |
483 | |
484 add_custom_command(TARGET Orthanc | |
485 POST_BUILD | |
486 COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/OrthancPlugin.doxygen | |
487 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} | |
488 COMMENT "Generating plugin documentation with Doxygen" VERBATIM | |
489 ) | |
490 | |
491 install( | |
492 DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/OrthancPluginDocumentation/doc/ | |
493 DESTINATION share/doc/orthanc/OrthancPlugin | |
494 ) | |
495 else() | |
496 message("Doxygen not found. The documentation will not be built.") | |
497 endif() | |
498 | |
499 | |
500 | |
501 ##################################################################### | |
502 ## Install the plugin SDK | |
503 ##################################################################### | |
504 | |
505 if (ENABLE_PLUGINS) | |
506 install( | |
507 FILES | |
508 Plugins/Include/orthanc/OrthancCPlugin.h | |
509 Plugins/Include/orthanc/OrthancCDatabasePlugin.h | |
510 DESTINATION include/orthanc | |
511 ) | |
512 endif() | |
513 | |
514 | |
515 | |
516 ##################################################################### | |
517 ## Prepare the "uninstall" target | |
518 ## http://www.cmake.org/Wiki/CMake_FAQ#Can_I_do_.22make_uninstall.22_with_CMake.3F | |
519 ##################################################################### | |
520 | |
521 configure_file( | |
522 "${CMAKE_CURRENT_SOURCE_DIR}/Resources/CMake/Uninstall.cmake.in" | |
523 "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" | |
524 IMMEDIATE @ONLY) | |
525 | |
526 add_custom_target(uninstall | |
527 COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake) |