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