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