annotate CMakeLists.txt @ 4078:c5c41f66ec29 framework

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