annotate CMakeLists.txt @ 2389:88402bd5dbf5

sample of a micro-service
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 30 Aug 2017 11:48:35 +0200
parents 50cde8246542
children cf0eb76c5e81
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
1 cmake_minimum_required(VERSION 2.8)
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
2
57
4bc019d2f969 renaming
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 52
diff changeset
3 project(Orthanc)
134
bdc60d16cc98 improved cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 133
diff changeset
4
2388
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2382
diff changeset
5
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2382
diff changeset
6 #####################################################################
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2382
diff changeset
7 ## Generic parameters of the Orthanc framework
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2382
diff changeset
8 #####################################################################
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2382
diff changeset
9
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2382
diff changeset
10 include(${CMAKE_SOURCE_DIR}/Resources/CMake/OrthancFrameworkParameters.cmake)
135
a2dbb5024fdf install in cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 134
diff changeset
11
2388
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2382
diff changeset
12 # Enable all the optional components of the Orthanc framework
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2382
diff changeset
13 set(ENABLE_CRYPTO_OPTIONS ON)
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2382
diff changeset
14 set(ENABLE_JPEG ON)
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2382
diff changeset
15 set(ENABLE_LOCALE ON)
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2382
diff changeset
16 set(ENABLE_LUA ON)
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2382
diff changeset
17 set(ENABLE_PNG ON)
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2382
diff changeset
18 set(ENABLE_PUGIXML ON)
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2382
diff changeset
19 set(ENABLE_SQLITE ON)
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2382
diff changeset
20 set(ENABLE_WEB_CLIENT ON)
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2382
diff changeset
21 set(ENABLE_WEB_SERVER ON)
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2382
diff changeset
22 set(ENABLE_DCMTK ON)
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2382
diff changeset
23 set(ENABLE_DCMTK_NETWORKING ON)
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2382
diff changeset
24 set(HAS_EMBEDDED_RESOURCES ON)
1407
d371a66972a4 OrthancPluginGetExpectedDatabaseVersion
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1400
diff changeset
25
516
49a1228d6fe7 building the dll from the main CMakeLists
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 506
diff changeset
26
49a1228d6fe7 building the dll from the main CMakeLists
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 506
diff changeset
27 #####################################################################
49a1228d6fe7 building the dll from the main CMakeLists
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 506
diff changeset
28 ## CMake parameters tunable at the command line
49a1228d6fe7 building the dll from the main CMakeLists
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 506
diff changeset
29 #####################################################################
49a1228d6fe7 building the dll from the main CMakeLists
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 506
diff changeset
30
134
bdc60d16cc98 improved cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 133
diff changeset
31 # Parameters of the build
2034
07f2ba3677df Fix of Debian bug #823139 ("orthanc: Please provide RecoverCompressedFile.cpp")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2025
diff changeset
32 SET(BUILD_MODALITY_WORKLISTS ON CACHE BOOL "Whether to build the sample plugin to serve modality worklists")
07f2ba3677df Fix of Debian bug #823139 ("orthanc: Please provide RecoverCompressedFile.cpp")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2025
diff changeset
33 SET(BUILD_RECOVER_COMPRESSED_FILE ON CACHE BOOL "Whether to build the companion tool to recover files compressed using Orthanc")
2388
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2382
diff changeset
34 SET(BUILD_SERVE_FOLDERS ON CACHE BOOL "Whether to build the ServeFolders plugin")
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2382
diff changeset
35 SET(ENABLE_PLUGINS ON CACHE BOOL "Enable plugins")
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2382
diff changeset
36 SET(STANDALONE_BUILD ON CACHE BOOL "Standalone build (all the resources are embedded, necessary for releases)")
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2382
diff changeset
37 SET(UNIT_TESTS_WITH_HTTP_CONNEXIONS ON CACHE BOOL "Allow unit tests to make HTTP requests")
135
a2dbb5024fdf install in cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 134
diff changeset
38
517
b2b56b4e33b0 simplifications to cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 494
diff changeset
39 # Advanced parameters to fine-tune linking against system libraries
2388
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2382
diff changeset
40 SET(USE_GTEST_DEBIAN_SOURCE_PACKAGE OFF CACHE BOOL "Use the sources of Google Test shipped with libgtest-dev (Debian only)")
634
d775a3cb5a06 refactoring of CMake scripts
jodogne
parents: 633
diff changeset
41 SET(USE_SYSTEM_GOOGLE_TEST ON CACHE BOOL "Use the system version of Google Test")
1323
5a92665dee23 Sample plugin: Serve folders
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1320
diff changeset
42
638
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 635
diff changeset
43 mark_as_advanced(USE_GTEST_DEBIAN_SOURCE_PACKAGE)
2388
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2382
diff changeset
44
134
bdc60d16cc98 improved cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 133
diff changeset
45
2388
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2382
diff changeset
46 #####################################################################
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2382
diff changeset
47 ## Configuration of the Orthanc framework
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2382
diff changeset
48 #####################################################################
1062
804a75413ee7 fix windows build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1046
diff changeset
49
824
a811bdf8b8eb precompiled headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 822
diff changeset
50 include(${CMAKE_SOURCE_DIR}/Resources/CMake/VisualStudioPrecompiledHeaders.cmake)
2388
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2382
diff changeset
51 include(${CMAKE_SOURCE_DIR}/Resources/CMake/OrthancFrameworkConfiguration.cmake)
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2382
diff changeset
52 include(${CMAKE_SOURCE_DIR}/Resources/CMake/GoogleTestConfiguration.cmake)
133
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 130
diff changeset
53
2388
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2382
diff changeset
54 include_directories(${ORTHANC_ROOT})
516
49a1228d6fe7 building the dll from the main CMakeLists
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 506
diff changeset
55
49a1228d6fe7 building the dll from the main CMakeLists
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 506
diff changeset
56
49a1228d6fe7 building the dll from the main CMakeLists
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 506
diff changeset
57 #####################################################################
824
a811bdf8b8eb precompiled headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 822
diff changeset
58 ## List of source files
a811bdf8b8eb precompiled headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 822
diff changeset
59 #####################################################################
a811bdf8b8eb precompiled headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 822
diff changeset
60
a811bdf8b8eb precompiled headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 822
diff changeset
61 set(ORTHANC_SERVER_SOURCES
2388
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2382
diff changeset
62 ${ORTHANC_DICOM_SOURCES}
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2382
diff changeset
63
1702
9980875edc7c started work on SliceOrdering
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1682
diff changeset
64 OrthancServer/DatabaseWrapper.cpp
9980875edc7c started work on SliceOrdering
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1682
diff changeset
65 OrthancServer/DatabaseWrapperBase.cpp
2388
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2382
diff changeset
66 OrthancServer/DicomInstanceToStore.cpp
1702
9980875edc7c started work on SliceOrdering
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1682
diff changeset
67 OrthancServer/ExportedResource.cpp
9980875edc7c started work on SliceOrdering
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1682
diff changeset
68 OrthancServer/LuaScripting.cpp
9980875edc7c started work on SliceOrdering
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1682
diff changeset
69 OrthancServer/OrthancFindRequestHandler.cpp
9980875edc7c started work on SliceOrdering
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1682
diff changeset
70 OrthancServer/OrthancHttpHandler.cpp
824
a811bdf8b8eb precompiled headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 822
diff changeset
71 OrthancServer/OrthancInitialization.cpp
1702
9980875edc7c started work on SliceOrdering
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1682
diff changeset
72 OrthancServer/OrthancMoveRequestHandler.cpp
824
a811bdf8b8eb precompiled headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 822
diff changeset
73 OrthancServer/OrthancRestApi/OrthancRestAnonymizeModify.cpp
a811bdf8b8eb precompiled headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 822
diff changeset
74 OrthancServer/OrthancRestApi/OrthancRestApi.cpp
a811bdf8b8eb precompiled headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 822
diff changeset
75 OrthancServer/OrthancRestApi/OrthancRestArchive.cpp
a811bdf8b8eb precompiled headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 822
diff changeset
76 OrthancServer/OrthancRestApi/OrthancRestChanges.cpp
a811bdf8b8eb precompiled headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 822
diff changeset
77 OrthancServer/OrthancRestApi/OrthancRestModalities.cpp
a811bdf8b8eb precompiled headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 822
diff changeset
78 OrthancServer/OrthancRestApi/OrthancRestResources.cpp
a811bdf8b8eb precompiled headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 822
diff changeset
79 OrthancServer/OrthancRestApi/OrthancRestSystem.cpp
1702
9980875edc7c started work on SliceOrdering
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1682
diff changeset
80 OrthancServer/QueryRetrieveHandler.cpp
2388
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2382
diff changeset
81 OrthancServer/Scheduler/CallSystemCommand.cpp
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2382
diff changeset
82 OrthancServer/Scheduler/DeleteInstanceCommand.cpp
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2382
diff changeset
83 OrthancServer/Scheduler/ModifyInstanceCommand.cpp
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2382
diff changeset
84 OrthancServer/Scheduler/ServerCommandInstance.cpp
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2382
diff changeset
85 OrthancServer/Scheduler/ServerJob.cpp
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2382
diff changeset
86 OrthancServer/Scheduler/ServerScheduler.cpp
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2382
diff changeset
87 OrthancServer/Scheduler/StorePeerCommand.cpp
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2382
diff changeset
88 OrthancServer/Scheduler/StoreScuCommand.cpp
1795
af6840eb23ee HierarchicalMatcher
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1791
diff changeset
89 OrthancServer/Search/HierarchicalMatcher.cpp
1791
91a5d39ec665 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1787
diff changeset
90 OrthancServer/Search/IFindConstraint.cpp
2388
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2382
diff changeset
91 OrthancServer/Search/ListConstraint.cpp
1747
ca69082ab200 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1746
diff changeset
92 OrthancServer/Search/LookupIdentifierQuery.cpp
1749
99f4a05f39fa various types of constraints
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1747
diff changeset
93 OrthancServer/Search/LookupResource.cpp
2388
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2382
diff changeset
94 OrthancServer/Search/RangeConstraint.cpp
1747
ca69082ab200 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1746
diff changeset
95 OrthancServer/Search/SetOfResources.cpp
1749
99f4a05f39fa various types of constraints
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1747
diff changeset
96 OrthancServer/Search/ValueConstraint.cpp
99f4a05f39fa various types of constraints
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1747
diff changeset
97 OrthancServer/Search/WildcardConstraint.cpp
824
a811bdf8b8eb precompiled headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 822
diff changeset
98 OrthancServer/ServerContext.cpp
a811bdf8b8eb precompiled headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 822
diff changeset
99 OrthancServer/ServerEnumerations.cpp
1702
9980875edc7c started work on SliceOrdering
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1682
diff changeset
100 OrthancServer/ServerIndex.cpp
824
a811bdf8b8eb precompiled headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 822
diff changeset
101 OrthancServer/ServerToolbox.cpp
1702
9980875edc7c started work on SliceOrdering
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1682
diff changeset
102 OrthancServer/SliceOrdering.cpp
824
a811bdf8b8eb precompiled headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 822
diff changeset
103 )
a811bdf8b8eb precompiled headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 822
diff changeset
104
a811bdf8b8eb precompiled headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 822
diff changeset
105
827
3d6f9b7d0add precompiled headers in unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 826
diff changeset
106 set(ORTHANC_UNIT_TESTS_SOURCES
967
dfc076546821 add suffix Tests to unit test sources
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 950
diff changeset
107 UnitTestsSources/DicomMapTests.cpp
dfc076546821 add suffix Tests to unit test sources
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 950
diff changeset
108 UnitTestsSources/FileStorageTests.cpp
dfc076546821 add suffix Tests to unit test sources
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 950
diff changeset
109 UnitTestsSources/FromDcmtkTests.cpp
dfc076546821 add suffix Tests to unit test sources
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 950
diff changeset
110 UnitTestsSources/MemoryCacheTests.cpp
1602
292bce3f54ed JpegWriter
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1589
diff changeset
111 UnitTestsSources/ImageTests.cpp
967
dfc076546821 add suffix Tests to unit test sources
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 950
diff changeset
112 UnitTestsSources/RestApiTests.cpp
dfc076546821 add suffix Tests to unit test sources
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 950
diff changeset
113 UnitTestsSources/SQLiteTests.cpp
dfc076546821 add suffix Tests to unit test sources
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 950
diff changeset
114 UnitTestsSources/SQLiteChromiumTests.cpp
827
3d6f9b7d0add precompiled headers in unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 826
diff changeset
115 UnitTestsSources/ServerIndexTests.cpp
967
dfc076546821 add suffix Tests to unit test sources
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 950
diff changeset
116 UnitTestsSources/VersionsTests.cpp
dfc076546821 add suffix Tests to unit test sources
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 950
diff changeset
117 UnitTestsSources/ZipTests.cpp
dfc076546821 add suffix Tests to unit test sources
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 950
diff changeset
118 UnitTestsSources/LuaTests.cpp
dfc076546821 add suffix Tests to unit test sources
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 950
diff changeset
119 UnitTestsSources/MultiThreadingTests.cpp
827
3d6f9b7d0add precompiled headers in unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 826
diff changeset
120 UnitTestsSources/UnitTestsMain.cpp
853
839be3022203 DicomImageInformation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 850
diff changeset
121 UnitTestsSources/ImageProcessingTests.cpp
967
dfc076546821 add suffix Tests to unit test sources
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 950
diff changeset
122 UnitTestsSources/JpegLosslessTests.cpp
1525
f9b0169eb6bb testing
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1519
diff changeset
123 UnitTestsSources/StreamTests.cpp
827
3d6f9b7d0add precompiled headers in unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 826
diff changeset
124 )
3d6f9b7d0add precompiled headers in unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 826
diff changeset
125
3d6f9b7d0add precompiled headers in unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 826
diff changeset
126
1578
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1576
diff changeset
127 if (ENABLE_PLUGINS)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1576
diff changeset
128 list(APPEND ORTHANC_SERVER_SOURCES
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1576
diff changeset
129 Plugins/Engine/OrthancPluginDatabase.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1576
diff changeset
130 Plugins/Engine/OrthancPlugins.cpp
1625
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1621
diff changeset
131 Plugins/Engine/PluginsEnumerations.cpp
1644
939b921b2c81 plugin error dictionary
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1625
diff changeset
132 Plugins/Engine/PluginsErrorDictionary.cpp
1578
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1576
diff changeset
133 Plugins/Engine/PluginsManager.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1576
diff changeset
134 Plugins/Engine/SharedLibrary.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1576
diff changeset
135 )
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1576
diff changeset
136
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1576
diff changeset
137 list(APPEND ORTHANC_UNIT_TESTS_SOURCES
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1576
diff changeset
138 UnitTestsSources/PluginsTests.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1576
diff changeset
139 )
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1576
diff changeset
140 endif()
1467
5068de14eef1 Inject version information into Windows binaries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1463
diff changeset
141
5068de14eef1 Inject version information into Windows binaries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1463
diff changeset
142
1951
01de36d949c3 Possibility to use forthcoming DCMTK 3.6.1 in static builds (instead of 3.6.0)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1924
diff changeset
143 if (CMAKE_COMPILER_IS_GNUCXX
01de36d949c3 Possibility to use forthcoming DCMTK 3.6.1 in static builds (instead of 3.6.0)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1924
diff changeset
144 AND NOT CMAKE_CROSSCOMPILING
2338
86a99fd1bbfb switch to just-released dcmtk 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2326
diff changeset
145 AND USE_DCMTK_360)
1951
01de36d949c3 Possibility to use forthcoming DCMTK 3.6.1 in static builds (instead of 3.6.0)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1924
diff changeset
146 # Add the "-pedantic" flag only on the Orthanc sources, and only if
2388
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2382
diff changeset
147 # cross-compiling DCMTK 3.6.0
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2382
diff changeset
148 set(ORTHANC_ALL_SOURCES
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2382
diff changeset
149 ${ORTHANC_CORE_SOURCES_INTERNAL}
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2382
diff changeset
150 ${ORTHANC_SERVER_SOURCES}
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2382
diff changeset
151 ${ORTHANC_UNIT_TESTS_SOURCES}
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2382
diff changeset
152 Plugins/Samples/ServeFolders/Plugin.cpp
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2382
diff changeset
153 Plugins/Samples/ModalityWorklists/Plugin.cpp
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2382
diff changeset
154 OrthancServer/main.cpp
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2382
diff changeset
155 )
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2382
diff changeset
156
1951
01de36d949c3 Possibility to use forthcoming DCMTK 3.6.1 in static builds (instead of 3.6.0)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1924
diff changeset
157 set_source_files_properties(${ORTHANC_ALL_SOURCES}
01de36d949c3 Possibility to use forthcoming DCMTK 3.6.1 in static builds (instead of 3.6.0)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1924
diff changeset
158 PROPERTIES COMPILE_FLAGS -pedantic
01de36d949c3 Possibility to use forthcoming DCMTK 3.6.1 in static builds (instead of 3.6.0)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1924
diff changeset
159 )
01de36d949c3 Possibility to use forthcoming DCMTK 3.6.1 in static builds (instead of 3.6.0)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1924
diff changeset
160 endif()
01de36d949c3 Possibility to use forthcoming DCMTK 3.6.1 in static builds (instead of 3.6.0)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1924
diff changeset
161
01de36d949c3 Possibility to use forthcoming DCMTK 3.6.1 in static builds (instead of 3.6.0)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1924
diff changeset
162
2388
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2382
diff changeset
163 #####################################################################
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2382
diff changeset
164 ## Autogeneration of files
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2382
diff changeset
165 #####################################################################
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2382
diff changeset
166
1251
ac877a0fcf52 cleaning
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1247
diff changeset
167 set(ORTHANC_EMBEDDED_FILES
ac877a0fcf52 cleaning
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1247
diff changeset
168 PREPARE_DATABASE ${CMAKE_CURRENT_SOURCE_DIR}/OrthancServer/PrepareDatabase.sql
ac877a0fcf52 cleaning
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1247
diff changeset
169 UPGRADE_DATABASE_3_TO_4 ${CMAKE_CURRENT_SOURCE_DIR}/OrthancServer/Upgrade3To4.sql
ac877a0fcf52 cleaning
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1247
diff changeset
170 UPGRADE_DATABASE_4_TO_5 ${CMAKE_CURRENT_SOURCE_DIR}/OrthancServer/Upgrade4To5.sql
ac877a0fcf52 cleaning
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1247
diff changeset
171 CONFIGURATION_SAMPLE ${CMAKE_CURRENT_SOURCE_DIR}/Resources/Configuration.json
ac877a0fcf52 cleaning
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1247
diff changeset
172 DICOM_CONFORMANCE_STATEMENT ${CMAKE_CURRENT_SOURCE_DIR}/Resources/DicomConformanceStatement.txt
ac877a0fcf52 cleaning
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1247
diff changeset
173 LUA_TOOLBOX ${CMAKE_CURRENT_SOURCE_DIR}/Resources/Toolbox.lua
1610
2dff2bdffdb8 font support within Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1604
diff changeset
174 FONT_UBUNTU_MONO_BOLD_16 ${CMAKE_CURRENT_SOURCE_DIR}/Resources/Fonts/UbuntuMonoBold-16.json
1251
ac877a0fcf52 cleaning
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1247
diff changeset
175 )
ac877a0fcf52 cleaning
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1247
diff changeset
176
1414
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1413
diff changeset
177 if (STANDALONE_BUILD)
291
4d7469f72a0b embedding of dicom dictionaries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 289
diff changeset
178 # We embed all the resources in the binaries for standalone builds
4d7469f72a0b embedding of dicom dictionaries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 289
diff changeset
179 add_definitions(-DORTHANC_STANDALONE=1)
4d7469f72a0b embedding of dicom dictionaries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 289
diff changeset
180 EmbedResources(
1251
ac877a0fcf52 cleaning
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1247
diff changeset
181 ${ORTHANC_EMBEDDED_FILES}
291
4d7469f72a0b embedding of dicom dictionaries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 289
diff changeset
182 ORTHANC_EXPLORER ${CMAKE_CURRENT_SOURCE_DIR}/OrthancExplorer
4d7469f72a0b embedding of dicom dictionaries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 289
diff changeset
183 ${DCMTK_DICTIONARIES}
4d7469f72a0b embedding of dicom dictionaries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 289
diff changeset
184 )
4d7469f72a0b embedding of dicom dictionaries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 289
diff changeset
185 else()
4d7469f72a0b embedding of dicom dictionaries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 289
diff changeset
186 add_definitions(
4d7469f72a0b embedding of dicom dictionaries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 289
diff changeset
187 -DORTHANC_STANDALONE=0
4d7469f72a0b embedding of dicom dictionaries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 289
diff changeset
188 -DORTHANC_PATH=\"${CMAKE_SOURCE_DIR}\"
4d7469f72a0b embedding of dicom dictionaries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 289
diff changeset
189 )
4d7469f72a0b embedding of dicom dictionaries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 289
diff changeset
190 EmbedResources(
1251
ac877a0fcf52 cleaning
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1247
diff changeset
191 ${ORTHANC_EMBEDDED_FILES}
291
4d7469f72a0b embedding of dicom dictionaries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 289
diff changeset
192 )
4d7469f72a0b embedding of dicom dictionaries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 289
diff changeset
193 endif()
4d7469f72a0b embedding of dicom dictionaries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 289
diff changeset
194
1913
41e402cd7b3a do not generate RC files for non-Windows builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1897
diff changeset
195 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
1467
5068de14eef1 Inject version information into Windows binaries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1463
diff changeset
196 execute_process(
5068de14eef1 Inject version information into Windows binaries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1463
diff changeset
197 COMMAND
5068de14eef1 Inject version information into Windows binaries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1463
diff changeset
198 ${PYTHON_EXECUTABLE} ${ORTHANC_ROOT}/Resources/WindowsResources.py
5068de14eef1 Inject version information into Windows binaries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1463
diff changeset
199 ${ORTHANC_VERSION} Orthanc Orthanc.exe "Lightweight, RESTful DICOM server for medical imaging"
5068de14eef1 Inject version information into Windows binaries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1463
diff changeset
200 ERROR_VARIABLE Failure
5068de14eef1 Inject version information into Windows binaries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1463
diff changeset
201 OUTPUT_FILE ${AUTOGENERATED_DIR}/Orthanc.rc
5068de14eef1 Inject version information into Windows binaries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1463
diff changeset
202 )
5068de14eef1 Inject version information into Windows binaries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1463
diff changeset
203
5068de14eef1 Inject version information into Windows binaries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1463
diff changeset
204 if (Failure)
5068de14eef1 Inject version information into Windows binaries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1463
diff changeset
205 message(FATAL_ERROR "Error while computing the version information: ${Failure}")
5068de14eef1 Inject version information into Windows binaries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1463
diff changeset
206 endif()
5068de14eef1 Inject version information into Windows binaries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1463
diff changeset
207
5068de14eef1 Inject version information into Windows binaries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1463
diff changeset
208 list(APPEND ORTHANC_RESOURCES ${AUTOGENERATED_DIR}/Orthanc.rc)
5068de14eef1 Inject version information into Windows binaries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1463
diff changeset
209 endif()
5068de14eef1 Inject version information into Windows binaries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1463
diff changeset
210
291
4d7469f72a0b embedding of dicom dictionaries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 289
diff changeset
211
4d7469f72a0b embedding of dicom dictionaries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 289
diff changeset
212
516
49a1228d6fe7 building the dll from the main CMakeLists
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 506
diff changeset
213 #####################################################################
2037
661c75c7ff8f reorganization in the cmake
sjodogne
parents: 2036
diff changeset
214 ## Configuration of the C/C++ macros
516
49a1228d6fe7 building the dll from the main CMakeLists
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 506
diff changeset
215 #####################################################################
49a1228d6fe7 building the dll from the main CMakeLists
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 506
diff changeset
216
2388
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2382
diff changeset
217 if (ENABLE_PLUGINS)
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2382
diff changeset
218 add_definitions(-DORTHANC_ENABLE_PLUGINS=1)
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2382
diff changeset
219 else()
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2382
diff changeset
220 add_definitions(-DORTHANC_ENABLE_PLUGINS=0)
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2382
diff changeset
221 endif()
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2382
diff changeset
222
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2382
diff changeset
223
2037
661c75c7ff8f reorganization in the cmake
sjodogne
parents: 2036
diff changeset
224 if (UNIT_TESTS_WITH_HTTP_CONNEXIONS)
661c75c7ff8f reorganization in the cmake
sjodogne
parents: 2036
diff changeset
225 add_definitions(-DUNIT_TESTS_WITH_HTTP_CONNEXIONS=1)
661c75c7ff8f reorganization in the cmake
sjodogne
parents: 2036
diff changeset
226 else()
661c75c7ff8f reorganization in the cmake
sjodogne
parents: 2036
diff changeset
227 add_definitions(-DUNIT_TESTS_WITH_HTTP_CONNEXIONS=0)
661c75c7ff8f reorganization in the cmake
sjodogne
parents: 2036
diff changeset
228 endif()
824
a811bdf8b8eb precompiled headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 822
diff changeset
229
2388
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2382
diff changeset
230
2038
sjodogne
parents: 2037
diff changeset
231 include_directories(${CMAKE_SOURCE_DIR}/Plugins/Include)
sjodogne
parents: 2037
diff changeset
232
600
851b6a19a81c setting soname
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 599
diff changeset
233 add_definitions(
2143
fd5875662670 creation of namespace SystemToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2142
diff changeset
234 -DORTHANC_BUILD_UNIT_TESTS=1
2381
b8969010b534 uncoupling DCMTK primitives from Orthanc::Configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2380
diff changeset
235
2037
661c75c7ff8f reorganization in the cmake
sjodogne
parents: 2036
diff changeset
236 # Macros for the plugins
2176
fead5549aaa7 introduction of HAS_ORTHANC_EXCEPTION to avoid PluginException if not necessary
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2175
diff changeset
237 -DHAS_ORTHANC_EXCEPTION=0
2037
661c75c7ff8f reorganization in the cmake
sjodogne
parents: 2036
diff changeset
238 -DMODALITY_WORKLISTS_VERSION="${ORTHANC_VERSION}"
661c75c7ff8f reorganization in the cmake
sjodogne
parents: 2036
diff changeset
239 -DSERVE_FOLDERS_VERSION="${ORTHANC_VERSION}"
600
851b6a19a81c setting soname
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 599
diff changeset
240 )
851b6a19a81c setting soname
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 599
diff changeset
241
2037
661c75c7ff8f reorganization in the cmake
sjodogne
parents: 2036
diff changeset
242
2038
sjodogne
parents: 2037
diff changeset
243 # Setup precompiled headers for Microsoft Visual Studio
sjodogne
parents: 2037
diff changeset
244
sjodogne
parents: 2037
diff changeset
245 # WARNING: There must be NO MORE "add_definitions()", "include()" or
sjodogne
parents: 2037
diff changeset
246 # "include_directories()" below, otherwise the generated precompiled
sjodogne
parents: 2037
diff changeset
247 # headers might get broken!
sjodogne
parents: 2037
diff changeset
248
sjodogne
parents: 2037
diff changeset
249 if (MSVC)
sjodogne
parents: 2037
diff changeset
250 add_definitions(-DORTHANC_USE_PRECOMPILED_HEADERS=1)
sjodogne
parents: 2037
diff changeset
251
sjodogne
parents: 2037
diff changeset
252 ADD_VISUAL_STUDIO_PRECOMPILED_HEADERS(
2389
88402bd5dbf5 sample of a micro-service
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2388
diff changeset
253 "PrecompiledHeaders.h" "Core/PrecompiledHeaders.cpp" ORTHANC_CORE_SOURCES_INTERNAL)
2038
sjodogne
parents: 2037
diff changeset
254
sjodogne
parents: 2037
diff changeset
255 ADD_VISUAL_STUDIO_PRECOMPILED_HEADERS(
sjodogne
parents: 2037
diff changeset
256 "PrecompiledHeadersServer.h" "OrthancServer/PrecompiledHeadersServer.cpp" ORTHANC_SERVER_SOURCES)
sjodogne
parents: 2037
diff changeset
257
sjodogne
parents: 2037
diff changeset
258 ADD_VISUAL_STUDIO_PRECOMPILED_HEADERS(
sjodogne
parents: 2037
diff changeset
259 "PrecompiledHeadersUnitTests.h" "UnitTestsSources/PrecompiledHeadersUnitTests.cpp" ORTHANC_UNIT_TESTS_SOURCES)
sjodogne
parents: 2037
diff changeset
260 endif()
sjodogne
parents: 2037
diff changeset
261
sjodogne
parents: 2037
diff changeset
262
2037
661c75c7ff8f reorganization in the cmake
sjodogne
parents: 2036
diff changeset
263
661c75c7ff8f reorganization in the cmake
sjodogne
parents: 2036
diff changeset
264 #####################################################################
661c75c7ff8f reorganization in the cmake
sjodogne
parents: 2036
diff changeset
265 ## Build the core of Orthanc
661c75c7ff8f reorganization in the cmake
sjodogne
parents: 2036
diff changeset
266 #####################################################################
661c75c7ff8f reorganization in the cmake
sjodogne
parents: 2036
diff changeset
267
520
cd7d4842851c fix build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 516
diff changeset
268 list(LENGTH OPENSSL_SOURCES OPENSSL_SOURCES_LENGTH)
cd7d4842851c fix build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 516
diff changeset
269 if (${OPENSSL_SOURCES_LENGTH} GREATER 0)
cd7d4842851c fix build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 516
diff changeset
270 add_library(OpenSSL STATIC ${OPENSSL_SOURCES})
cd7d4842851c fix build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 516
diff changeset
271 endif()
516
49a1228d6fe7 building the dll from the main CMakeLists
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 506
diff changeset
272
2388
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2382
diff changeset
273
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2382
diff changeset
274 # "CoreLibrary" contains all the third-party dependencies and the
2038
sjodogne
parents: 2037
diff changeset
275 # content of the "Core" folder, but not OpenSSL, nor DCMTK.
12
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
276 add_library(CoreLibrary
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
277 STATIC
1414
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1413
diff changeset
278 ${ORTHANC_CORE_SOURCES}
12
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
279 ${AUTOGENERATED_SOURCES}
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
280 )
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
281
135
a2dbb5024fdf install in cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 134
diff changeset
282
546
0e510ea3de31 merge mainline -> laaw
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 543 517
diff changeset
283 #####################################################################
0e510ea3de31 merge mainline -> laaw
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 543 517
diff changeset
284 ## Build the Orthanc server
0e510ea3de31 merge mainline -> laaw
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 543 517
diff changeset
285 #####################################################################
12
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
286
2038
sjodogne
parents: 2037
diff changeset
287 # "ServerLibrary" contains DCMTK
517
b2b56b4e33b0 simplifications to cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 494
diff changeset
288 add_library(ServerLibrary
b2b56b4e33b0 simplifications to cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 494
diff changeset
289 STATIC
b2b56b4e33b0 simplifications to cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 494
diff changeset
290 ${DCMTK_SOURCES}
824
a811bdf8b8eb precompiled headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 822
diff changeset
291 ${ORTHANC_SERVER_SOURCES}
517
b2b56b4e33b0 simplifications to cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 494
diff changeset
292 )
12
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
293
517
b2b56b4e33b0 simplifications to cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 494
diff changeset
294 # Ensure autogenerated code is built before building ServerLibrary
b2b56b4e33b0 simplifications to cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 494
diff changeset
295 add_dependencies(ServerLibrary CoreLibrary)
b2b56b4e33b0 simplifications to cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 494
diff changeset
296
b2b56b4e33b0 simplifications to cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 494
diff changeset
297 add_executable(Orthanc
b2b56b4e33b0 simplifications to cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 494
diff changeset
298 OrthancServer/main.cpp
1467
5068de14eef1 Inject version information into Windows binaries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1463
diff changeset
299 ${ORTHANC_RESOURCES}
517
b2b56b4e33b0 simplifications to cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 494
diff changeset
300 )
b2b56b4e33b0 simplifications to cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 494
diff changeset
301
1487
23083810d543 removal of unneeded static libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1485
diff changeset
302 target_link_libraries(Orthanc ServerLibrary CoreLibrary ${DCMTK_LIBRARIES})
517
b2b56b4e33b0 simplifications to cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 494
diff changeset
303
546
0e510ea3de31 merge mainline -> laaw
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 543 517
diff changeset
304 if (${OPENSSL_SOURCES_LENGTH} GREATER 0)
0e510ea3de31 merge mainline -> laaw
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 543 517
diff changeset
305 target_link_libraries(Orthanc OpenSSL)
0e510ea3de31 merge mainline -> laaw
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 543 517
diff changeset
306 endif()
0e510ea3de31 merge mainline -> laaw
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 543 517
diff changeset
307
517
b2b56b4e33b0 simplifications to cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 494
diff changeset
308 install(
b2b56b4e33b0 simplifications to cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 494
diff changeset
309 TARGETS Orthanc
649
7446a8ae2fad fix installation path
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 638
diff changeset
310 RUNTIME DESTINATION sbin
517
b2b56b4e33b0 simplifications to cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 494
diff changeset
311 )
261
9e24c33c3361 possibility to compile just the CoreLibrary
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 259
diff changeset
312
546
0e510ea3de31 merge mainline -> laaw
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 543 517
diff changeset
313
0e510ea3de31 merge mainline -> laaw
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 543 517
diff changeset
314
0e510ea3de31 merge mainline -> laaw
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 543 517
diff changeset
315 #####################################################################
635
cd3b60f6e7d4 refactoring cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
316 ## Build the unit tests
546
0e510ea3de31 merge mainline -> laaw
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 543 517
diff changeset
317 #####################################################################
0e510ea3de31 merge mainline -> laaw
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 543 517
diff changeset
318
634
d775a3cb5a06 refactoring of CMake scripts
jodogne
parents: 633
diff changeset
319 add_executable(UnitTests
d775a3cb5a06 refactoring of CMake scripts
jodogne
parents: 633
diff changeset
320 ${GTEST_SOURCES}
827
3d6f9b7d0add precompiled headers in unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 826
diff changeset
321 ${ORTHANC_UNIT_TESTS_SOURCES}
634
d775a3cb5a06 refactoring of CMake scripts
jodogne
parents: 633
diff changeset
322 )
2038
sjodogne
parents: 2037
diff changeset
323
1487
23083810d543 removal of unneeded static libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1485
diff changeset
324 target_link_libraries(UnitTests ServerLibrary CoreLibrary ${DCMTK_LIBRARIES})
520
cd7d4842851c fix build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 516
diff changeset
325
634
d775a3cb5a06 refactoring of CMake scripts
jodogne
parents: 633
diff changeset
326 if (${OPENSSL_SOURCES_LENGTH} GREATER 0)
d775a3cb5a06 refactoring of CMake scripts
jodogne
parents: 633
diff changeset
327 target_link_libraries(UnitTests OpenSSL)
120
5af0a4345d06 disabling of unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 102
diff changeset
328 endif()
5af0a4345d06 disabling of unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 102
diff changeset
329
12
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
330
546
0e510ea3de31 merge mainline -> laaw
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 543 517
diff changeset
331
516
49a1228d6fe7 building the dll from the main CMakeLists
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 506
diff changeset
332 #####################################################################
1392
477e35614602 build ServeFolders as part of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1368
diff changeset
333 ## Build the "ServeFolders" plugin
477e35614602 build ServeFolders as part of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1368
diff changeset
334 #####################################################################
477e35614602 build ServeFolders as part of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1368
diff changeset
335
1589
334d3a92ed83 improvements to the ServeFolders plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1578
diff changeset
336 if (ENABLE_PLUGINS AND BUILD_SERVE_FOLDERS)
1913
41e402cd7b3a do not generate RC files for non-Windows builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1897
diff changeset
337 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
41e402cd7b3a do not generate RC files for non-Windows builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1897
diff changeset
338 execute_process(
41e402cd7b3a do not generate RC files for non-Windows builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1897
diff changeset
339 COMMAND
41e402cd7b3a do not generate RC files for non-Windows builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1897
diff changeset
340 ${PYTHON_EXECUTABLE} ${ORTHANC_ROOT}/Resources/WindowsResources.py
41e402cd7b3a do not generate RC files for non-Windows builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1897
diff changeset
341 ${ORTHANC_VERSION} ServeFolders ServeFolders.dll "Orthanc plugin to serve additional folders"
41e402cd7b3a do not generate RC files for non-Windows builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1897
diff changeset
342 ERROR_VARIABLE Failure
41e402cd7b3a do not generate RC files for non-Windows builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1897
diff changeset
343 OUTPUT_FILE ${AUTOGENERATED_DIR}/ServeFolders.rc
41e402cd7b3a do not generate RC files for non-Windows builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1897
diff changeset
344 )
1589
334d3a92ed83 improvements to the ServeFolders plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1578
diff changeset
345
1913
41e402cd7b3a do not generate RC files for non-Windows builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1897
diff changeset
346 if (Failure)
41e402cd7b3a do not generate RC files for non-Windows builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1897
diff changeset
347 message(FATAL_ERROR "Error while computing the version information: ${Failure}")
41e402cd7b3a do not generate RC files for non-Windows builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1897
diff changeset
348 endif()
41e402cd7b3a do not generate RC files for non-Windows builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1897
diff changeset
349
41e402cd7b3a do not generate RC files for non-Windows builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1897
diff changeset
350 list(APPEND SERVE_FOLDERS_RESOURCES ${AUTOGENERATED_DIR}/ServeFolders.rc)
41e402cd7b3a do not generate RC files for non-Windows builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1897
diff changeset
351 endif()
1589
334d3a92ed83 improvements to the ServeFolders plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1578
diff changeset
352
334d3a92ed83 improvements to the ServeFolders plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1578
diff changeset
353 add_library(ServeFolders SHARED
334d3a92ed83 improvements to the ServeFolders plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1578
diff changeset
354 ${BOOST_SOURCES}
1578
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1576
diff changeset
355 ${JSONCPP_SOURCES}
2366
26f3a346226f more consistent handling of libiconv in cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2360
diff changeset
356 ${LIBICONV_SOURCES}
1589
334d3a92ed83 improvements to the ServeFolders plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1578
diff changeset
357 Plugins/Samples/ServeFolders/Plugin.cpp
2062
40ffd0e8676a generation of etag in ServeFolders
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2053
diff changeset
358 Plugins/Samples/Common/OrthancPluginCppWrapper.cpp
1913
41e402cd7b3a do not generate RC files for non-Windows builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1897
diff changeset
359 ${SERVE_FOLDERS_RESOURCES}
1578
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1576
diff changeset
360 )
1392
477e35614602 build ServeFolders as part of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1368
diff changeset
361
1578
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1576
diff changeset
362 set_target_properties(
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1576
diff changeset
363 ServeFolders PROPERTIES
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1576
diff changeset
364 VERSION ${ORTHANC_VERSION}
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1576
diff changeset
365 SOVERSION ${ORTHANC_VERSION}
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1576
diff changeset
366 )
1392
477e35614602 build ServeFolders as part of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1368
diff changeset
367
1578
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1576
diff changeset
368 install(
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1576
diff changeset
369 TARGETS ServeFolders
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1576
diff changeset
370 RUNTIME DESTINATION lib # Destination for Windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1576
diff changeset
371 LIBRARY DESTINATION share/orthanc/plugins # Destination for Linux
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1576
diff changeset
372 )
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1576
diff changeset
373 endif()
1412
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1411
diff changeset
374
1392
477e35614602 build ServeFolders as part of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1368
diff changeset
375
600
851b6a19a81c setting soname
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 599
diff changeset
376
516
49a1228d6fe7 building the dll from the main CMakeLists
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 506
diff changeset
377 #####################################################################
1808
9c2ffc4e938b configuration of the sample modality worklists plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1795
diff changeset
378 ## Build the "ModalityWorklists" plugin
9c2ffc4e938b configuration of the sample modality worklists plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1795
diff changeset
379 #####################################################################
9c2ffc4e938b configuration of the sample modality worklists plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1795
diff changeset
380
9c2ffc4e938b configuration of the sample modality worklists plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1795
diff changeset
381 if (ENABLE_PLUGINS AND BUILD_MODALITY_WORKLISTS)
1913
41e402cd7b3a do not generate RC files for non-Windows builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1897
diff changeset
382 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
41e402cd7b3a do not generate RC files for non-Windows builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1897
diff changeset
383 execute_process(
41e402cd7b3a do not generate RC files for non-Windows builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1897
diff changeset
384 COMMAND
41e402cd7b3a do not generate RC files for non-Windows builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1897
diff changeset
385 ${PYTHON_EXECUTABLE} ${ORTHANC_ROOT}/Resources/WindowsResources.py
41e402cd7b3a do not generate RC files for non-Windows builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1897
diff changeset
386 ${ORTHANC_VERSION} ModalityWorklists ModalityWorklists.dll "Sample Orthanc plugin to serve modality worklists"
41e402cd7b3a do not generate RC files for non-Windows builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1897
diff changeset
387 ERROR_VARIABLE Failure
41e402cd7b3a do not generate RC files for non-Windows builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1897
diff changeset
388 OUTPUT_FILE ${AUTOGENERATED_DIR}/ModalityWorklists.rc
41e402cd7b3a do not generate RC files for non-Windows builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1897
diff changeset
389 )
1808
9c2ffc4e938b configuration of the sample modality worklists plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1795
diff changeset
390
1913
41e402cd7b3a do not generate RC files for non-Windows builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1897
diff changeset
391 if (Failure)
41e402cd7b3a do not generate RC files for non-Windows builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1897
diff changeset
392 message(FATAL_ERROR "Error while computing the version information: ${Failure}")
41e402cd7b3a do not generate RC files for non-Windows builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1897
diff changeset
393 endif()
41e402cd7b3a do not generate RC files for non-Windows builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1897
diff changeset
394
41e402cd7b3a do not generate RC files for non-Windows builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1897
diff changeset
395 list(APPEND MODALITY_WORKLISTS_RESOURCES ${AUTOGENERATED_DIR}/ModalityWorklists.rc)
1808
9c2ffc4e938b configuration of the sample modality worklists plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1795
diff changeset
396 endif()
9c2ffc4e938b configuration of the sample modality worklists plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1795
diff changeset
397
9c2ffc4e938b configuration of the sample modality worklists plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1795
diff changeset
398 add_library(ModalityWorklists SHARED
9c2ffc4e938b configuration of the sample modality worklists plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1795
diff changeset
399 ${BOOST_SOURCES}
9c2ffc4e938b configuration of the sample modality worklists plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1795
diff changeset
400 ${JSONCPP_SOURCES}
2366
26f3a346226f more consistent handling of libiconv in cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2360
diff changeset
401 ${LIBICONV_SOURCES}
2205
395522e46b2b refactoring of the worklist sample using OrthancPluginCppWrapper
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2176
diff changeset
402 Plugins/Samples/Common/OrthancPluginCppWrapper.cpp
1808
9c2ffc4e938b configuration of the sample modality worklists plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1795
diff changeset
403 Plugins/Samples/ModalityWorklists/Plugin.cpp
1913
41e402cd7b3a do not generate RC files for non-Windows builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1897
diff changeset
404 ${MODALITY_WORKLISTS_RESOURCES}
1808
9c2ffc4e938b configuration of the sample modality worklists plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1795
diff changeset
405 )
9c2ffc4e938b configuration of the sample modality worklists plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1795
diff changeset
406
9c2ffc4e938b configuration of the sample modality worklists plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1795
diff changeset
407 set_target_properties(
9c2ffc4e938b configuration of the sample modality worklists plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1795
diff changeset
408 ModalityWorklists PROPERTIES
9c2ffc4e938b configuration of the sample modality worklists plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1795
diff changeset
409 VERSION ${ORTHANC_VERSION}
9c2ffc4e938b configuration of the sample modality worklists plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1795
diff changeset
410 SOVERSION ${ORTHANC_VERSION}
9c2ffc4e938b configuration of the sample modality worklists plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1795
diff changeset
411 )
9c2ffc4e938b configuration of the sample modality worklists plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1795
diff changeset
412
9c2ffc4e938b configuration of the sample modality worklists plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1795
diff changeset
413 install(
9c2ffc4e938b configuration of the sample modality worklists plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1795
diff changeset
414 TARGETS ModalityWorklists
9c2ffc4e938b configuration of the sample modality worklists plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1795
diff changeset
415 RUNTIME DESTINATION lib # Destination for Windows
9c2ffc4e938b configuration of the sample modality worklists plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1795
diff changeset
416 LIBRARY DESTINATION share/orthanc/plugins # Destination for Linux
9c2ffc4e938b configuration of the sample modality worklists plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1795
diff changeset
417 )
9c2ffc4e938b configuration of the sample modality worklists plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1795
diff changeset
418 endif()
9c2ffc4e938b configuration of the sample modality worklists plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1795
diff changeset
419
9c2ffc4e938b configuration of the sample modality worklists plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1795
diff changeset
420
9c2ffc4e938b configuration of the sample modality worklists plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1795
diff changeset
421
9c2ffc4e938b configuration of the sample modality worklists plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1795
diff changeset
422 #####################################################################
2034
07f2ba3677df Fix of Debian bug #823139 ("orthanc: Please provide RecoverCompressedFile.cpp")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2025
diff changeset
423 ## Build the companion tool to recover files compressed using Orthanc
07f2ba3677df Fix of Debian bug #823139 ("orthanc: Please provide RecoverCompressedFile.cpp")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2025
diff changeset
424 #####################################################################
07f2ba3677df Fix of Debian bug #823139 ("orthanc: Please provide RecoverCompressedFile.cpp")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2025
diff changeset
425
07f2ba3677df Fix of Debian bug #823139 ("orthanc: Please provide RecoverCompressedFile.cpp")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2025
diff changeset
426 if (BUILD_RECOVER_COMPRESSED_FILE)
07f2ba3677df Fix of Debian bug #823139 ("orthanc: Please provide RecoverCompressedFile.cpp")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2025
diff changeset
427 set(RECOVER_COMPRESSED_SOURCES
07f2ba3677df Fix of Debian bug #823139 ("orthanc: Please provide RecoverCompressedFile.cpp")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2025
diff changeset
428 Resources/Samples/Tools/RecoverCompressedFile.cpp
07f2ba3677df Fix of Debian bug #823139 ("orthanc: Please provide RecoverCompressedFile.cpp")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2025
diff changeset
429 )
07f2ba3677df Fix of Debian bug #823139 ("orthanc: Please provide RecoverCompressedFile.cpp")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2025
diff changeset
430
07f2ba3677df Fix of Debian bug #823139 ("orthanc: Please provide RecoverCompressedFile.cpp")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2025
diff changeset
431 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
07f2ba3677df Fix of Debian bug #823139 ("orthanc: Please provide RecoverCompressedFile.cpp")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2025
diff changeset
432 execute_process(
07f2ba3677df Fix of Debian bug #823139 ("orthanc: Please provide RecoverCompressedFile.cpp")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2025
diff changeset
433 COMMAND
07f2ba3677df Fix of Debian bug #823139 ("orthanc: Please provide RecoverCompressedFile.cpp")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2025
diff changeset
434 ${PYTHON_EXECUTABLE} ${ORTHANC_ROOT}/Resources/WindowsResources.py
07f2ba3677df Fix of Debian bug #823139 ("orthanc: Please provide RecoverCompressedFile.cpp")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2025
diff changeset
435 ${ORTHANC_VERSION} OrthancRecoverCompressedFile OrthancRecoverCompressedFile.exe
07f2ba3677df Fix of Debian bug #823139 ("orthanc: Please provide RecoverCompressedFile.cpp")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2025
diff changeset
436 "Lightweight, RESTful DICOM server for medical imaging"
07f2ba3677df Fix of Debian bug #823139 ("orthanc: Please provide RecoverCompressedFile.cpp")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2025
diff changeset
437 ERROR_VARIABLE Failure
07f2ba3677df Fix of Debian bug #823139 ("orthanc: Please provide RecoverCompressedFile.cpp")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2025
diff changeset
438 OUTPUT_FILE ${AUTOGENERATED_DIR}/OrthancRecoverCompressedFile.rc
07f2ba3677df Fix of Debian bug #823139 ("orthanc: Please provide RecoverCompressedFile.cpp")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2025
diff changeset
439 )
07f2ba3677df Fix of Debian bug #823139 ("orthanc: Please provide RecoverCompressedFile.cpp")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2025
diff changeset
440
07f2ba3677df Fix of Debian bug #823139 ("orthanc: Please provide RecoverCompressedFile.cpp")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2025
diff changeset
441 if (Failure)
07f2ba3677df Fix of Debian bug #823139 ("orthanc: Please provide RecoverCompressedFile.cpp")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2025
diff changeset
442 message(FATAL_ERROR "Error while computing the version information: ${Failure}")
07f2ba3677df Fix of Debian bug #823139 ("orthanc: Please provide RecoverCompressedFile.cpp")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2025
diff changeset
443 endif()
07f2ba3677df Fix of Debian bug #823139 ("orthanc: Please provide RecoverCompressedFile.cpp")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2025
diff changeset
444
07f2ba3677df Fix of Debian bug #823139 ("orthanc: Please provide RecoverCompressedFile.cpp")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2025
diff changeset
445 list(APPEND RECOVER_COMPRESSED_SOURCES
07f2ba3677df Fix of Debian bug #823139 ("orthanc: Please provide RecoverCompressedFile.cpp")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2025
diff changeset
446 ${AUTOGENERATED_DIR}/OrthancRecoverCompressedFile.rc
07f2ba3677df Fix of Debian bug #823139 ("orthanc: Please provide RecoverCompressedFile.cpp")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2025
diff changeset
447 )
07f2ba3677df Fix of Debian bug #823139 ("orthanc: Please provide RecoverCompressedFile.cpp")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2025
diff changeset
448 endif()
07f2ba3677df Fix of Debian bug #823139 ("orthanc: Please provide RecoverCompressedFile.cpp")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2025
diff changeset
449
2035
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2034
diff changeset
450 add_executable(OrthancRecoverCompressedFile ${RECOVER_COMPRESSED_SOURCES})
2034
07f2ba3677df Fix of Debian bug #823139 ("orthanc: Please provide RecoverCompressedFile.cpp")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2025
diff changeset
451
2038
sjodogne
parents: 2037
diff changeset
452 target_link_libraries(OrthancRecoverCompressedFile CoreLibrary)
sjodogne
parents: 2037
diff changeset
453
2034
07f2ba3677df Fix of Debian bug #823139 ("orthanc: Please provide RecoverCompressedFile.cpp")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2025
diff changeset
454 install(
07f2ba3677df Fix of Debian bug #823139 ("orthanc: Please provide RecoverCompressedFile.cpp")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2025
diff changeset
455 TARGETS OrthancRecoverCompressedFile
07f2ba3677df Fix of Debian bug #823139 ("orthanc: Please provide RecoverCompressedFile.cpp")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2025
diff changeset
456 RUNTIME DESTINATION bin
07f2ba3677df Fix of Debian bug #823139 ("orthanc: Please provide RecoverCompressedFile.cpp")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2025
diff changeset
457 )
07f2ba3677df Fix of Debian bug #823139 ("orthanc: Please provide RecoverCompressedFile.cpp")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2025
diff changeset
458 endif()
07f2ba3677df Fix of Debian bug #823139 ("orthanc: Please provide RecoverCompressedFile.cpp")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2025
diff changeset
459
07f2ba3677df Fix of Debian bug #823139 ("orthanc: Please provide RecoverCompressedFile.cpp")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2025
diff changeset
460
07f2ba3677df Fix of Debian bug #823139 ("orthanc: Please provide RecoverCompressedFile.cpp")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2025
diff changeset
461
07f2ba3677df Fix of Debian bug #823139 ("orthanc: Please provide RecoverCompressedFile.cpp")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2025
diff changeset
462 #####################################################################
516
49a1228d6fe7 building the dll from the main CMakeLists
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 506
diff changeset
463 ## Generate the documentation if Doxygen is present
49a1228d6fe7 building the dll from the main CMakeLists
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 506
diff changeset
464 #####################################################################
49a1228d6fe7 building the dll from the main CMakeLists
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 506
diff changeset
465
12
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
466 find_package(Doxygen)
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
467 if (DOXYGEN_FOUND)
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
468 configure_file(
57
4bc019d2f969 renaming
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 52
diff changeset
469 ${CMAKE_SOURCE_DIR}/Resources/Orthanc.doxygen
4bc019d2f969 renaming
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 52
diff changeset
470 ${CMAKE_CURRENT_BINARY_DIR}/Orthanc.doxygen
12
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
471 @ONLY)
573
8fb9867d8089 documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 571
diff changeset
472
900
1b92ce45cc8d plugin doc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 897
diff changeset
473 configure_file(
1b92ce45cc8d plugin doc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 897
diff changeset
474 ${CMAKE_SOURCE_DIR}/Resources/OrthancPlugin.doxygen
1b92ce45cc8d plugin doc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 897
diff changeset
475 ${CMAKE_CURRENT_BINARY_DIR}/OrthancPlugin.doxygen
1b92ce45cc8d plugin doc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 897
diff changeset
476 @ONLY)
1b92ce45cc8d plugin doc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 897
diff changeset
477
592
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 591
diff changeset
478 add_custom_target(doc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 591
diff changeset
479 ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Orthanc.doxygen
1156
8c9574576f42 install plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1154
diff changeset
480 COMMENT "Generating internal documentation with Doxygen" VERBATIM
8c9574576f42 install plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1154
diff changeset
481 )
8c9574576f42 install plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1154
diff changeset
482
8c9574576f42 install plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1154
diff changeset
483 add_custom_command(TARGET Orthanc
8c9574576f42 install plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1154
diff changeset
484 POST_BUILD
8c9574576f42 install plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1154
diff changeset
485 COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/OrthancPlugin.doxygen
12
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
486 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
1156
8c9574576f42 install plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1154
diff changeset
487 COMMENT "Generating plugin documentation with Doxygen" VERBATIM
8c9574576f42 install plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1154
diff changeset
488 )
8c9574576f42 install plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1154
diff changeset
489
8c9574576f42 install plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1154
diff changeset
490 install(
8c9574576f42 install plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1154
diff changeset
491 DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/OrthancPluginDocumentation/doc/
8c9574576f42 install plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1154
diff changeset
492 DESTINATION share/doc/orthanc/OrthancPlugin
12
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
493 )
149
b15ac5bd19f3 message
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 147
diff changeset
494 else()
b15ac5bd19f3 message
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 147
diff changeset
495 message("Doxygen not found. The documentation will not be built.")
134
bdc60d16cc98 improved cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 133
diff changeset
496 endif()
584
a042693cc6a9 uninstall target for make
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 578
diff changeset
497
a042693cc6a9 uninstall target for make
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 578
diff changeset
498
1400
1c8df4424437 install plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1396
diff changeset
499
1c8df4424437 install plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1396
diff changeset
500 #####################################################################
1c8df4424437 install plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1396
diff changeset
501 ## Install the plugin SDK
1c8df4424437 install plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1396
diff changeset
502 #####################################################################
1c8df4424437 install plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1396
diff changeset
503
1578
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1576
diff changeset
504 if (ENABLE_PLUGINS)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1576
diff changeset
505 install(
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1576
diff changeset
506 FILES
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1576
diff changeset
507 Plugins/Include/orthanc/OrthancCPlugin.h
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1576
diff changeset
508 Plugins/Include/orthanc/OrthancCDatabasePlugin.h
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1576
diff changeset
509 Plugins/Include/orthanc/OrthancCppDatabasePlugin.h
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1576
diff changeset
510 DESTINATION include/orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1576
diff changeset
511 )
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1576
diff changeset
512 endif()
1400
1c8df4424437 install plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1396
diff changeset
513
1c8df4424437 install plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1396
diff changeset
514
1c8df4424437 install plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1396
diff changeset
515
584
a042693cc6a9 uninstall target for make
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 578
diff changeset
516 #####################################################################
a042693cc6a9 uninstall target for make
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 578
diff changeset
517 ## Prepare the "uninstall" target
a042693cc6a9 uninstall target for make
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 578
diff changeset
518 ## http://www.cmake.org/Wiki/CMake_FAQ#Can_I_do_.22make_uninstall.22_with_CMake.3F
a042693cc6a9 uninstall target for make
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 578
diff changeset
519 #####################################################################
a042693cc6a9 uninstall target for make
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 578
diff changeset
520
a042693cc6a9 uninstall target for make
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 578
diff changeset
521 configure_file(
a042693cc6a9 uninstall target for make
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 578
diff changeset
522 "${CMAKE_CURRENT_SOURCE_DIR}/Resources/CMake/Uninstall.cmake.in"
a042693cc6a9 uninstall target for make
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 578
diff changeset
523 "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
a042693cc6a9 uninstall target for make
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 578
diff changeset
524 IMMEDIATE @ONLY)
a042693cc6a9 uninstall target for make
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 578
diff changeset
525
a042693cc6a9 uninstall target for make
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 578
diff changeset
526 add_custom_target(uninstall
a042693cc6a9 uninstall target for make
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 578
diff changeset
527 COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)