annotate OrthancServer/CMakeLists.txt @ 4608:de5e6b04442d db-changes

added ErrorCode_Revision
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 31 Mar 2021 14:34:41 +0200
parents cc64385593ef
children f0038043fb97 31e12d2ce275
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
4437
d9473bd5ed43 upgrade to year 2021
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4366
diff changeset
4 # Copyright (C) 2017-2021 Osimis S.A., Belgium
4124
28944db5318b adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4121
diff changeset
5 #
28944db5318b adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4121
diff changeset
6 # 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
7 # 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
8 # 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
9 # License, or (at your option) any later version.
28944db5318b adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4121
diff changeset
10 #
28944db5318b adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4121
diff changeset
11 # In addition, as a special exception, the copyright holders of this
28944db5318b adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4121
diff changeset
12 # program give permission to link the code of its release with the
28944db5318b adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4121
diff changeset
13 # OpenSSL project's "OpenSSL" library (or with modified versions of it
28944db5318b adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4121
diff changeset
14 # that use the same license as the "OpenSSL" library), and distribute
28944db5318b adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4121
diff changeset
15 # the linked executables. You must obey the GNU General Public License
28944db5318b adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4121
diff changeset
16 # in all respects for all of the code used other than "OpenSSL". If you
28944db5318b adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4121
diff changeset
17 # modify file(s) with this exception, you may extend this exception to
28944db5318b adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4121
diff changeset
18 # your version of the file(s), but you are not obligated to do so. If
28944db5318b adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4121
diff changeset
19 # you do not wish to do so, delete this exception statement from your
28944db5318b adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4121
diff changeset
20 # version. If you delete this exception statement from all source files
28944db5318b adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4121
diff changeset
21 # in the program, then also delete it here.
28944db5318b adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4121
diff changeset
22 #
28944db5318b adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4121
diff changeset
23 # 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
24 # WITHOUT ANY WARRANTY; without even the implied warranty of
28944db5318b adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4121
diff changeset
25 # 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
26 # General Public License for more details.
28944db5318b adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4121
diff changeset
27 #
28944db5318b adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4121
diff changeset
28 # 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
29 # 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
30
28944db5318b adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4121
diff changeset
31
2691
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
32 cmake_minimum_required(VERSION 2.8)
4170
1657c8700974 better fix for CMP0058
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4168
diff changeset
33 cmake_policy(SET CMP0058 NEW)
2691
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
34
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
35 project(Orthanc)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
36
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
37
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
38 #####################################################################
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
39 ## Generic parameters of the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
40 #####################################################################
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
41
4091
19a2f1d2b816 moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4063
diff changeset
42 include(${CMAKE_SOURCE_DIR}/../OrthancFramework/Resources/CMake/OrthancFrameworkParameters.cmake)
2691
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
43
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
44 # Enable all the optional components of the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
45 set(ENABLE_CRYPTO_OPTIONS ON)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
46 set(ENABLE_DCMTK ON)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
47 set(ENABLE_DCMTK_NETWORKING ON)
3893
7a5fa8f307e9 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3761
diff changeset
48 set(ENABLE_DCMTK_TRANSCODING ON)
2691
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
49 set(ENABLE_GOOGLE_TEST ON)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
50 set(ENABLE_JPEG ON)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
51 set(ENABLE_LOCALE ON)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
52 set(ENABLE_LUA ON)
3723
cc6d4edfe8fe fix pkcs11 compilation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3633
diff changeset
53 set(ENABLE_OPENSSL_ENGINES ON) # OpenSSL engines are necessary for PKCS11
2691
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
54 set(ENABLE_PNG ON)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
55 set(ENABLE_PUGIXML ON)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
56 set(ENABLE_SQLITE ON)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
57 set(ENABLE_WEB_CLIENT ON)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
58 set(ENABLE_WEB_SERVER ON)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
59 set(ENABLE_ZLIB ON)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
60
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
61
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
62 #####################################################################
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
63 ## CMake parameters tunable at the command line to configure the
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
64 ## plugins, the companion tools, and the unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
65 #####################################################################
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
66
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
67 # Parameters of the build
4030
100fbe970762 DANGEROUS commit: removing HAS_EMBEDDED_RESOURCES
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4015
diff changeset
68 set(STANDALONE_BUILD ON CACHE BOOL "Standalone build (all the resources are embedded, necessary for releases)")
2691
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
69 SET(BUILD_MODALITY_WORKLISTS ON CACHE BOOL "Whether to build the sample plugin to serve modality worklists")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
70 SET(BUILD_RECOVER_COMPRESSED_FILE ON CACHE BOOL "Whether to build the companion tool to recover files compressed using Orthanc")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
71 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
72 SET(BUILD_CONNECTIVITY_CHECKS ON CACHE BOOL "Whether to build the ConnectivityChecks plugin")
2691
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
73 SET(ENABLE_PLUGINS ON CACHE BOOL "Enable plugins")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
74 SET(UNIT_TESTS_WITH_HTTP_CONNEXIONS ON CACHE BOOL "Allow unit tests to make HTTP requests")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
75
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
76
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
77 #####################################################################
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
78 ## Configuration of the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
79 #####################################################################
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
80
4091
19a2f1d2b816 moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4063
diff changeset
81 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
82 include(${CMAKE_SOURCE_DIR}/../OrthancFramework/Resources/CMake/OrthancFrameworkConfiguration.cmake)
2691
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
83
4099
bf1a17f12306 moving version scripts from OrthancFramework to OrthancServer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4096
diff changeset
84 # 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
85 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
86
2691
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
87
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
88 #####################################################################
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
89 ## List of source files
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
90 #####################################################################
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
91
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
92 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
93 ${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
94 ${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
95 ${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
96 ${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
97 ${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
98 ${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
99 ${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
100 ${CMAKE_SOURCE_DIR}/Sources/Database/SQLiteDatabaseWrapper.cpp
4586
1d96fe7e054e taking StatelessDatabaseOperations out of ServerIndex
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4520
diff changeset
101 ${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
102 ${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
103 ${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
104 ${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
105 ${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
106 ${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
107 ${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
108 ${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
109 ${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
110 ${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
111 ${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
112 ${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
113 ${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
114 ${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
115 ${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
116 ${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
117 ${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
118 ${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
119 ${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
120 ${CMAKE_SOURCE_DIR}/Sources/OrthancRestApi/OrthancRestSystem.cpp
4240
799c0c527ced reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4170
diff changeset
121 ${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
122 ${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
123 ${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
124 ${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
125 ${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
126 ${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
127 ${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
128 ${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
129 ${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
130 ${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
131 ${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
132 ${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
133 ${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
134 ${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
135 ${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
136 ${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
137 ${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
138 ${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
139 ${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
140 ${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
141 ${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
142 ${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
143 ${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
144 ${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
145 ${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
146 ${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
147 ${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
148 ${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
149 ${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
150 ${CMAKE_SOURCE_DIR}/Sources/StorageCommitmentReports.cpp
2691
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
151 )
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
152
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
153
4045
05b8fd21089c fix path
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4034
diff changeset
154 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
155 ${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
156 ${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
157 ${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
158 ${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
159 ${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
160 ${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
161 ${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
162 ${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
163 ${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
164 ${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
165 ${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
166 ${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
167 ${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
168 ${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
169 ${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
170 ${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
171 ${CMAKE_SOURCE_DIR}/../OrthancFramework/UnitTestsSources/ZipTests.cpp
4045
05b8fd21089c fix path
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4034
diff changeset
172 )
05b8fd21089c fix path
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4034
diff changeset
173
05b8fd21089c fix path
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4034
diff changeset
174 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
175 ${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
176 ${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
177 ${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
178 ${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
179 ${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
180 ${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
181 ${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
182 ${CMAKE_SOURCE_DIR}/UnitTestsSources/VersionsTests.cpp
2691
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
183 )
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
184
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
185
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
186 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
187 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
188
2691
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
189 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
190 ${CMAKE_SOURCE_DIR}/Plugins/Engine/OrthancPluginDatabase.cpp
4595
cc64385593ef added OrthancPluginRegisterDatabaseBackendV3() to plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4591
diff changeset
191 ${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
192 ${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
193 ${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
194 ${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
195 ${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
196 ${CMAKE_SOURCE_DIR}/Plugins/Engine/PluginsManager.cpp
2691
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
197 )
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
198
4045
05b8fd21089c fix path
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4034
diff changeset
199 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
200 ${CMAKE_SOURCE_DIR}/UnitTestsSources/PluginsTests.cpp
2691
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
201 )
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
202 endif()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
203
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
204
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
205 if (CMAKE_COMPILER_IS_GNUCXX
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
206 AND NOT CMAKE_CROSSCOMPILING
3275
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3271
diff changeset
207 AND DCMTK_STATIC_VERSION STREQUAL "3.6.0")
2691
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
208 # Add the "-pedantic" flag only on the Orthanc sources, and only if
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
209 # cross-compiling DCMTK 3.6.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
210 set(ORTHANC_ALL_SOURCES
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
211 ${ORTHANC_CORE_SOURCES_INTERNAL}
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
212 ${ORTHANC_DICOM_SOURCES_INTERNAL}
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
213 ${ORTHANC_SERVER_SOURCES}
4045
05b8fd21089c fix path
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4034
diff changeset
214 ${ORTHANC_FRAMEWORK_UNIT_TESTS}
05b8fd21089c fix path
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4034
diff changeset
215 ${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
216 ${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
217 ${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
218 ${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
219 ${CMAKE_SOURCE_DIR}/Sources/main.cpp
2691
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
220 )
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
221
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
222 set_source_files_properties(${ORTHANC_ALL_SOURCES}
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
223 PROPERTIES COMPILE_FLAGS -pedantic
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
224 )
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
225 endif()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
226
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
227
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
228 #####################################################################
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
229 ## Autogeneration of files
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
230 #####################################################################
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
231
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
232 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
233 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
234 DICOM_CONFORMANCE_STATEMENT ${CMAKE_SOURCE_DIR}/Resources/DicomConformanceStatement.txt
4121
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4099
diff changeset
235 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
236 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
237 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
238 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
239 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
240
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3093
diff changeset
241 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
242 ${CMAKE_SOURCE_DIR}/Sources/Database/InstallTrackAttachmentsSize.sql
2691
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
243 )
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
244
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
245 if (STANDALONE_BUILD)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
246 # 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
247 add_definitions(
100fbe970762 DANGEROUS commit: removing HAS_EMBEDDED_RESOURCES
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4015
diff changeset
248 -DORTHANC_STANDALONE=1
100fbe970762 DANGEROUS commit: removing HAS_EMBEDDED_RESOURCES
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4015
diff changeset
249 )
4031
e3b3af80732d ServerResources, and moving EmbeddedResourceHttpHandler from Core to OrthancServer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4030
diff changeset
250
e3b3af80732d ServerResources, and moving EmbeddedResourceHttpHandler from Core to OrthancServer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4030
diff changeset
251 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
252 ORTHANC_EXPLORER ${CMAKE_SOURCE_DIR}/OrthancExplorer
2691
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
253 )
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
254 else()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
255 add_definitions(
4030
100fbe970762 DANGEROUS commit: removing HAS_EMBEDDED_RESOURCES
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4015
diff changeset
256 -DORTHANC_PATH=\"${CMAKE_SOURCE_DIR}\"
2691
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
257 -DORTHANC_STANDALONE=0
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
258 )
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
259 endif()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
260
4031
e3b3af80732d ServerResources, and moving EmbeddedResourceHttpHandler from Core to OrthancServer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4030
diff changeset
261 EmbedResources(
e3b3af80732d ServerResources, and moving EmbeddedResourceHttpHandler from Core to OrthancServer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4030
diff changeset
262 --namespace=Orthanc.ServerResources
4032
058b5ade8acd renaming embedded resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4031
diff changeset
263 --target=OrthancServerResources
4091
19a2f1d2b816 moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4063
diff changeset
264 --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
265 ${ORTHANC_EMBEDDED_FILES}
e3b3af80732d ServerResources, and moving EmbeddedResourceHttpHandler from Core to OrthancServer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4030
diff changeset
266 )
e3b3af80732d ServerResources, and moving EmbeddedResourceHttpHandler from Core to OrthancServer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4030
diff changeset
267
e3b3af80732d ServerResources, and moving EmbeddedResourceHttpHandler from Core to OrthancServer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4030
diff changeset
268
2691
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
269 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
270 execute_process(
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
271 COMMAND
4091
19a2f1d2b816 moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4063
diff changeset
272 ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/../OrthancFramework/Resources/WindowsResources.py
2691
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
273 ${ORTHANC_VERSION} Orthanc Orthanc.exe "Lightweight, RESTful DICOM server for medical imaging"
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
274 ERROR_VARIABLE Failure
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
275 OUTPUT_FILE ${AUTOGENERATED_DIR}/Orthanc.rc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
276 )
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
277
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
278 if (Failure)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
279 message(FATAL_ERROR "Error while computing the version information: ${Failure}")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
280 endif()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
281
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
282 list(APPEND ORTHANC_RESOURCES ${AUTOGENERATED_DIR}/Orthanc.rc)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
283 endif()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
284
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
285
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
286
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
287 #####################################################################
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
288 ## Configuration of the C/C++ macros
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
289 #####################################################################
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
290
4366
6a39ca7083b9 New config option "MallocArenaMax" to control memory usage on GNU/Linux
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4240
diff changeset
291 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
292
6a39ca7083b9 New config option "MallocArenaMax" to control memory usage on GNU/Linux
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4240
diff changeset
293 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
294 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
295 else()
6a39ca7083b9 New config option "MallocArenaMax" to control memory usage on GNU/Linux
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4240
diff changeset
296 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
297 endif()
6a39ca7083b9 New config option "MallocArenaMax" to control memory usage on GNU/Linux
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4240
diff changeset
298
6a39ca7083b9 New config option "MallocArenaMax" to control memory usage on GNU/Linux
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4240
diff changeset
299
4063
e00f3d089991 shared library of orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4060
diff changeset
300 if (STATIC_BUILD)
e00f3d089991 shared library of orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4060
diff changeset
301 add_definitions(-DORTHANC_STATIC=1)
e00f3d089991 shared library of orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4060
diff changeset
302 else()
e00f3d089991 shared library of orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4060
diff changeset
303 add_definitions(-DORTHANC_STATIC=0)
e00f3d089991 shared library of orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4060
diff changeset
304 endif()
e00f3d089991 shared library of orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4060
diff changeset
305
e00f3d089991 shared library of orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4060
diff changeset
306
2691
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
307 if (ENABLE_PLUGINS)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
308 add_definitions(-DORTHANC_ENABLE_PLUGINS=1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
309 else()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
310 add_definitions(-DORTHANC_ENABLE_PLUGINS=0)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
311 endif()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
312
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
313
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
314 if (UNIT_TESTS_WITH_HTTP_CONNEXIONS)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
315 add_definitions(-DUNIT_TESTS_WITH_HTTP_CONNEXIONS=1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
316 else()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
317 add_definitions(-DUNIT_TESTS_WITH_HTTP_CONNEXIONS=0)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
318 endif()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
319
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
320
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
321 add_definitions(
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
322 -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
323 -DORTHANC_BUILDING_SERVER_LIBRARY=1
2691
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
324
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
325 # Macros for the plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
326 -DHAS_ORTHANC_EXCEPTION=0
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
327 -DMODALITY_WORKLISTS_VERSION="${ORTHANC_VERSION}"
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
328 -DSERVE_FOLDERS_VERSION="${ORTHANC_VERSION}"
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
329 )
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
330
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
331
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
332 # Setup precompiled headers for Microsoft Visual Studio
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
333
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
334 # WARNING: There must be NO MORE "add_definitions()", "include()" or
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
335 # "include_directories()" below, otherwise the generated precompiled
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
336 # headers might get broken!
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
337
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
338 if (MSVC)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
339 add_definitions(-DORTHANC_USE_PRECOMPILED_HEADERS=1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
340
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
341 set(TMP
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
342 ${ORTHANC_CORE_SOURCES_INTERNAL}
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
343 ${ORTHANC_DICOM_SOURCES_INTERNAL}
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
344 )
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
345
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
346 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
347 "PrecompiledHeaders.h" "${CMAKE_SOURCE_DIR}/../OrthancFramework/Sources/PrecompiledHeaders.cpp"
2691
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
348 TMP ORTHANC_CORE_PCH)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
349
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
350 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
351 "PrecompiledHeadersServer.h" "${CMAKE_SOURCE_DIR}/Sources/PrecompiledHeadersServer.cpp"
2691
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
352 ORTHANC_SERVER_SOURCES ORTHANC_SERVER_PCH)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
353
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
354 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
355 "PrecompiledHeadersUnitTests.h" "${CMAKE_SOURCE_DIR}/UnitTestsSources/PrecompiledHeadersUnitTests.cpp"
4045
05b8fd21089c fix path
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4034
diff changeset
356 ORTHANC_SERVER_UNIT_TESTS ORTHANC_UNIT_TESTS_PCH)
2691
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
357 endif()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
358
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
359
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
360
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
361 #####################################################################
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
362 ## Build the core of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
363 #####################################################################
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
364
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
365 # "CoreLibrary" contains all the third-party dependencies and the
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
366 # content of the "Core" folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
367 add_library(CoreLibrary
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
368 STATIC
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
369 ${ORTHANC_CORE_PCH}
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
370 ${ORTHANC_CORE_SOURCES}
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
371 ${ORTHANC_DICOM_SOURCES}
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
372 ${AUTOGENERATED_SOURCES}
3270
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3233
diff changeset
373 )
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3233
diff changeset
374
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3233
diff changeset
375 if (LIBICU_LIBRARIES)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3233
diff changeset
376 target_link_libraries(CoreLibrary ${LIBICU_LIBRARIES})
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3233
diff changeset
377 endif()
2691
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
378
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
379
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
380 #####################################################################
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
381 ## Build the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
382 #####################################################################
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
383
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
384 add_library(ServerLibrary
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
385 STATIC
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
386 ${ORTHANC_SERVER_PCH}
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
387 ${ORTHANC_SERVER_SOURCES}
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
388 )
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
389
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
390 # Ensure autogenerated code is built before building ServerLibrary
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
391 add_dependencies(ServerLibrary CoreLibrary)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
392
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
393 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
394 ${CMAKE_SOURCE_DIR}/Sources/main.cpp
2691
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
395 ${ORTHANC_RESOURCES}
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
396 )
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
397
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
398 target_link_libraries(Orthanc ServerLibrary CoreLibrary ${DCMTK_LIBRARIES})
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
399
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
400 install(
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
401 TARGETS Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
402 RUNTIME DESTINATION sbin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
403 )
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
404
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
405
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
406 #####################################################################
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
407 ## Build the unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
408 #####################################################################
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
409
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
410 add_executable(UnitTests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
411 ${GOOGLE_TEST_SOURCES}
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
412 ${ORTHANC_UNIT_TESTS_PCH}
4045
05b8fd21089c fix path
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4034
diff changeset
413 ${ORTHANC_FRAMEWORK_UNIT_TESTS}
05b8fd21089c fix path
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4034
diff changeset
414 ${ORTHANC_SERVER_UNIT_TESTS}
3326
b21d4cc8e5d1 speed up base64 decoding + added tests
Alain Mazy <alain@mazy.be>
parents: 3295
diff changeset
415 ${BOOST_EXTENDED_SOURCES}
2691
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
416 )
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
417
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
418 target_link_libraries(UnitTests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
419 ServerLibrary
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
420 CoreLibrary
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
421 ${DCMTK_LIBRARIES}
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
422 ${GOOGLE_TEST_LIBRARIES}
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
423 )
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
424
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
425
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
426 #####################################################################
3233
47fbb0467a62 Build a static library to share code between the plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3187
diff changeset
427 ## 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
428 #####################################################################
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 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
431 (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
432 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
433 ${BOOST_SOURCES}
47fbb0467a62 Build a static library to share code between the plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3187
diff changeset
434 ${JSONCPP_SOURCES}
47fbb0467a62 Build a static library to share code between the plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3187
diff changeset
435 ${LIBICONV_SOURCES}
47fbb0467a62 Build a static library to share code between the plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3187
diff changeset
436 ${LIBICU_SOURCES}
4091
19a2f1d2b816 moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4063
diff changeset
437 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
438 )
47fbb0467a62 Build a static library to share code between the plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3187
diff changeset
439
3271
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3270
diff changeset
440 if (LIBICU_LIBRARIES)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3270
diff changeset
441 target_link_libraries(ThirdPartyPlugins ${LIBICU_LIBRARIES})
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3270
diff changeset
442 endif()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3270
diff changeset
443
3233
47fbb0467a62 Build a static library to share code between the plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3187
diff changeset
444 # 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
445 # 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
446 set_property(
47fbb0467a62 Build a static library to share code between the plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3187
diff changeset
447 TARGET ThirdPartyPlugins
47fbb0467a62 Build a static library to share code between the plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3187
diff changeset
448 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
449 )
47fbb0467a62 Build a static library to share code between the plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3187
diff changeset
450 endif()
47fbb0467a62 Build a static library to share code between the plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3187
diff changeset
451
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 #####################################################################
2691
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
454 ## Build the "ServeFolders" plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
455 #####################################################################
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
456
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
457 if (ENABLE_PLUGINS AND BUILD_SERVE_FOLDERS)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
458 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
459 execute_process(
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
460 COMMAND
4091
19a2f1d2b816 moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4063
diff changeset
461 ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/../OrthancFramework/Resources/WindowsResources.py
2691
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
462 ${ORTHANC_VERSION} ServeFolders ServeFolders.dll "Orthanc plugin to serve additional folders"
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
463 ERROR_VARIABLE Failure
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
464 OUTPUT_FILE ${AUTOGENERATED_DIR}/ServeFolders.rc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
465 )
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
466
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
467 if (Failure)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
468 message(FATAL_ERROR "Error while computing the version information: ${Failure}")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
469 endif()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
470
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
471 list(APPEND SERVE_FOLDERS_RESOURCES ${AUTOGENERATED_DIR}/ServeFolders.rc)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
472 endif()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
473
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
474 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
475 ${CMAKE_SOURCE_DIR}/Plugins/Samples/ServeFolders/Plugin.cpp
2691
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
476 ${SERVE_FOLDERS_RESOURCES}
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
477 )
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
478
3233
47fbb0467a62 Build a static library to share code between the plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3187
diff changeset
479 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
480
2691
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
481 set_target_properties(
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
482 ServeFolders PROPERTIES
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
483 VERSION ${ORTHANC_VERSION}
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
484 SOVERSION ${ORTHANC_VERSION}
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
485 )
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
486
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
487 install(
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
488 TARGETS ServeFolders
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
489 RUNTIME DESTINATION lib # Destination for Windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
490 LIBRARY DESTINATION share/orthanc/plugins # Destination for Linux
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
491 )
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
492 endif()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
493
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
494
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
495
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
496 #####################################################################
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
497 ## Build the "ModalityWorklists" plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
498 #####################################################################
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
499
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
500 if (ENABLE_PLUGINS AND BUILD_MODALITY_WORKLISTS)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
501 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
502 execute_process(
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
503 COMMAND
4091
19a2f1d2b816 moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4063
diff changeset
504 ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/../OrthancFramework/Resources/WindowsResources.py
2691
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
505 ${ORTHANC_VERSION} ModalityWorklists ModalityWorklists.dll "Sample Orthanc plugin to serve modality worklists"
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
506 ERROR_VARIABLE Failure
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
507 OUTPUT_FILE ${AUTOGENERATED_DIR}/ModalityWorklists.rc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
508 )
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
509
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
510 if (Failure)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
511 message(FATAL_ERROR "Error while computing the version information: ${Failure}")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
512 endif()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
513
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
514 list(APPEND MODALITY_WORKLISTS_RESOURCES ${AUTOGENERATED_DIR}/ModalityWorklists.rc)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
515 endif()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
516
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
517 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
518 ${CMAKE_SOURCE_DIR}/Plugins/Samples/ModalityWorklists/Plugin.cpp
2691
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
519 ${MODALITY_WORKLISTS_RESOURCES}
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
520 )
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
521
3233
47fbb0467a62 Build a static library to share code between the plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3187
diff changeset
522 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
523
2691
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
524 set_target_properties(
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
525 ModalityWorklists PROPERTIES
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
526 VERSION ${ORTHANC_VERSION}
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
527 SOVERSION ${ORTHANC_VERSION}
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
528 )
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
529
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
530 install(
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
531 TARGETS ModalityWorklists
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
532 RUNTIME DESTINATION lib # Destination for Windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
533 LIBRARY DESTINATION share/orthanc/plugins # Destination for Linux
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
534 )
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
535 endif()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
536
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
537
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
538
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
539 #####################################################################
3622
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3353
diff changeset
540 ## Build the "ConnectivityChecks" plugin
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3353
diff changeset
541 #####################################################################
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 if (ENABLE_PLUGINS AND BUILD_CONNECTIVITY_CHECKS)
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3353
diff changeset
544 include(ExternalProject)
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3353
diff changeset
545
3625
d5cf43519a49 fix lsb
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3624
diff changeset
546 set(Flags)
3627
b03854e0f796 trying to fix output folders for OS X and windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3626
diff changeset
547
3622
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3353
diff changeset
548 if (CMAKE_TOOLCHAIN_FILE)
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3353
diff changeset
549 # Take absolute path to the toolchain
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3353
diff changeset
550 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
551 list(APPEND Flags -DCMAKE_TOOLCHAIN_FILE=${TMP})
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3353
diff changeset
552 endif()
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3353
diff changeset
553
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3353
diff changeset
554 if ("${CMAKE_SYSTEM_VERSION}" STREQUAL "LinuxStandardBase")
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3353
diff changeset
555 list(APPEND Flags
3625
d5cf43519a49 fix lsb
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3624
diff changeset
556 -DLSB_CC=${CMAKE_LSB_CC}
d5cf43519a49 fix lsb
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3624
diff changeset
557 -DLSB_CXX=${CMAKE_LSB_CXX}
3622
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3353
diff changeset
558 )
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3353
diff changeset
559 endif()
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3353
diff changeset
560
3637
06eb59faf4da use a shorter path for VS2008
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
561 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
562 SOURCE_DIR "${CMAKE_SOURCE_DIR}/Plugins/Samples/ConnectivityChecks"
3622
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3353
diff changeset
563
3637
06eb59faf4da use a shorter path for VS2008
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
564 # 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
565 # 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
566 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
567
3622
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3353
diff changeset
568 CMAKE_ARGS
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3353
diff changeset
569 -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
3623
a6bfa09df8b3 fix for cis
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3622
diff changeset
570 -DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR}
3622
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3353
diff changeset
571 -DPLUGIN_VERSION=${ORTHANC_VERSION}
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3353
diff changeset
572 -DSTATIC_BUILD=${STATIC_BUILD}
3625
d5cf43519a49 fix lsb
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3624
diff changeset
573 -DALLOW_DOWNLOADS=${ALLOW_DOWNLOADS}
4168
88d704264d64 fix for ubuntu 14.04
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4124
diff changeset
574 -DUSE_SYSTEM_BOOST=${USE_SYSTEM_BOOST}
3622
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3353
diff changeset
575 -DUSE_LEGACY_JSONCPP=${USE_LEGACY_JSONCPP}
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3353
diff changeset
576 ${Flags}
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3353
diff changeset
577 )
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3353
diff changeset
578
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3353
diff changeset
579 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3353
diff changeset
580 if (MSVC)
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3353
diff changeset
581 set(Prefix "")
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3353
diff changeset
582 else()
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3353
diff changeset
583 set(Prefix "lib") # MinGW
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3353
diff changeset
584 endif()
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 install(FILES
3633
5295a49dd78a removing not working tricks for ConnectivityChecks plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3628
diff changeset
587 ${CMAKE_CURRENT_BINARY_DIR}/${Prefix}ConnectivityChecks.dll
3622
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3353
diff changeset
588 DESTINATION "lib")
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3353
diff changeset
589 else()
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3353
diff changeset
590 list(GET CMAKE_FIND_LIBRARY_PREFIXES 0 Prefix)
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3353
diff changeset
591 list(GET CMAKE_FIND_LIBRARY_SUFFIXES 0 Suffix)
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3353
diff changeset
592 install(FILES
3633
5295a49dd78a removing not working tricks for ConnectivityChecks plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3628
diff changeset
593 ${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
594 ${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
595 DESTINATION "share/orthanc/plugins")
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3353
diff changeset
596 endif()
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3353
diff changeset
597 endif()
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3353
diff changeset
598
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3353
diff changeset
599
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3353
diff changeset
600
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3353
diff changeset
601 #####################################################################
2691
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
602 ## Build the companion tool to recover files compressed using Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
603 #####################################################################
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
604
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
605 if (BUILD_RECOVER_COMPRESSED_FILE)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
606 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
607 ${CMAKE_SOURCE_DIR}/Resources/Samples/Tools/RecoverCompressedFile.cpp
2691
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
608 )
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
609
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
610 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
611 execute_process(
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
612 COMMAND
4091
19a2f1d2b816 moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4063
diff changeset
613 ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/../OrthancFramework/Resources/WindowsResources.py
2691
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
614 ${ORTHANC_VERSION} OrthancRecoverCompressedFile OrthancRecoverCompressedFile.exe
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
615 "Lightweight, RESTful DICOM server for medical imaging"
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
616 ERROR_VARIABLE Failure
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
617 OUTPUT_FILE ${AUTOGENERATED_DIR}/OrthancRecoverCompressedFile.rc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
618 )
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
619
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
620 if (Failure)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
621 message(FATAL_ERROR "Error while computing the version information: ${Failure}")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
622 endif()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
623
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
624 list(APPEND RECOVER_COMPRESSED_SOURCES
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
625 ${AUTOGENERATED_DIR}/OrthancRecoverCompressedFile.rc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
626 )
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
627 endif()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
628
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
629 add_executable(OrthancRecoverCompressedFile ${RECOVER_COMPRESSED_SOURCES})
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
630
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
631 target_link_libraries(OrthancRecoverCompressedFile CoreLibrary)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
632
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
633 install(
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
634 TARGETS OrthancRecoverCompressedFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
635 RUNTIME DESTINATION bin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
636 )
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
637 endif()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
638
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
639
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
640
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
641 #####################################################################
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
642 ## Generate the documentation if Doxygen is present
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
643 #####################################################################
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
644
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
645 find_package(Doxygen)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
646 if (DOXYGEN_FOUND)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
647 configure_file(
4091
19a2f1d2b816 moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4063
diff changeset
648 ${CMAKE_SOURCE_DIR}/Resources/Orthanc.doxygen
2691
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
649 ${CMAKE_CURRENT_BINARY_DIR}/Orthanc.doxygen
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
650 @ONLY)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
651
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
652 configure_file(
4091
19a2f1d2b816 moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4063
diff changeset
653 ${CMAKE_SOURCE_DIR}/Resources/OrthancPlugin.doxygen
2691
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
654 ${CMAKE_CURRENT_BINARY_DIR}/OrthancPlugin.doxygen
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
655 @ONLY)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
656
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
657 add_custom_target(doc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
658 ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Orthanc.doxygen
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
659 COMMENT "Generating internal documentation with Doxygen" VERBATIM
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
660 )
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
661
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
662 add_custom_command(TARGET Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
663 POST_BUILD
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
664 COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/OrthancPlugin.doxygen
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
665 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
666 COMMENT "Generating plugin documentation with Doxygen" VERBATIM
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
667 )
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
668
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
669 install(
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
670 DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/OrthancPluginDocumentation/doc/
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
671 DESTINATION share/doc/orthanc/OrthancPlugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
672 )
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
673 else()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
674 message("Doxygen not found. The documentation will not be built.")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
675 endif()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
676
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
677
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
678
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
679 #####################################################################
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
680 ## Install the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
681 #####################################################################
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
682
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
683 if (ENABLE_PLUGINS)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
684 install(
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
685 FILES
4091
19a2f1d2b816 moved CMakeLists.txt for the server to the OrthancServer folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4063
diff changeset
686 ${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
687 ${CMAKE_SOURCE_DIR}/Plugins/Include/orthanc/OrthancCDatabasePlugin.h
2691
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
688 DESTINATION include/orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
689 )
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
690 endif()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
691
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
692
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
693
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
694 #####################################################################
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
695 ## Prepare the "uninstall" target
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
696 ## http://www.cmake.org/Wiki/CMake_FAQ#Can_I_do_.22make_uninstall.22_with_CMake.3F
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
697 #####################################################################
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
698
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
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}/../OrthancFramework/Resources/CMake/Uninstall.cmake.in"
2691
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
701 "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
702 IMMEDIATE @ONLY)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
703
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
704 add_custom_target(uninstall
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2642
diff changeset
705 COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)