annotate CMakeLists.txt @ 120:5af0a4345d06

disabling of unit tests
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 04 Oct 2012 18:00:21 +0200
parents 7593b57dc1bf
children 1267071a697e
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)
12
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
4 include(${CMAKE_SOURCE_DIR}/Resources/CMake/AutoGeneratedCode.cmake)
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
5 include(${CMAKE_SOURCE_DIR}/Resources/CMake/DownloadPackage.cmake)
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
6 include(CheckIncludeFiles)
101
428784e59dcd trying to use log4cplus
jodogne
parents: 100
diff changeset
7 include(CheckIncludeFileCXX)
12
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
8
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
9 SET(STATIC_BUILD ON CACHE BOOL "Static build of the third-party libraries (necessary for Windows)")
19
e85455ff6039 standalon
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 12
diff changeset
10 SET(STANDALONE_BUILD OFF CACHE BOOL "Standalone build (necessary for cross-compilation or binary releases)")
23
62bd05fe4b7c support for ssl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 22
diff changeset
11 SET(ENABLE_SSL ON CACHE BOOL "Include support for SSL")
120
5af0a4345d06 disabling of unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 102
diff changeset
12 SET(BUILD_UNIT_TESTS ON CACHE BOOL "Build the unit tests")
97
5eaf1b69acd5 hardening
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 81
diff changeset
13 SET(DEBIAN_HARDENING OFF CACHE BOOL "Use Debian hardening flags")
12
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
14
19
e85455ff6039 standalon
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 12
diff changeset
15 if (${CMAKE_CROSSCOMPILING})
e85455ff6039 standalon
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 12
diff changeset
16 SET(STANDALONE_BUILD ON)
e85455ff6039 standalon
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 12
diff changeset
17 endif()
e85455ff6039 standalon
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 12
diff changeset
18
e85455ff6039 standalon
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 12
diff changeset
19 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
12
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
20 CHECK_INCLUDE_FILES(rpc.h HAVE_UUID_H)
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
21 else()
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
22 CHECK_INCLUDE_FILES(uuid/uuid.h HAVE_UUID_H)
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
23 endif()
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
24
101
428784e59dcd trying to use log4cplus
jodogne
parents: 100
diff changeset
25 if (NOT HAVE_UUID_H)
12
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
26 message(FATAL_ERROR "Please install the uuid-dev package")
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
27 endif()
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
28
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
29
22
1bc6327d1de3 MD5 sum
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
30 SET(THIRD_PARTY_SOURCES
1bc6327d1de3 MD5 sum
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
31 ${CMAKE_SOURCE_DIR}/Resources/md5/md5.c
24
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 23
diff changeset
32 ${CMAKE_SOURCE_DIR}/Resources/base64/base64.cpp
22
1bc6327d1de3 MD5 sum
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
33 )
26
6ba765ecf3db compiling openssl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
34
102
7593b57dc1bf switch to google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 101
diff changeset
35 include(${CMAKE_SOURCE_DIR}/Resources/CMake/GoogleLogConfiguration.cmake)
7593b57dc1bf switch to google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 101
diff changeset
36
29
042ac60f5bf9 simplified build of curl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 26
diff changeset
37 if (${ENABLE_SSL})
57
4bc019d2f969 renaming
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 52
diff changeset
38 add_definitions(-DORTHANC_SSL_ENABLED=1)
29
042ac60f5bf9 simplified build of curl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 26
diff changeset
39 include(${CMAKE_SOURCE_DIR}/Resources/CMake/OpenSslConfiguration.cmake)
042ac60f5bf9 simplified build of curl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 26
diff changeset
40 else()
57
4bc019d2f969 renaming
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 52
diff changeset
41 add_definitions(-DORTHANC_SSL_ENABLED=0)
29
042ac60f5bf9 simplified build of curl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 26
diff changeset
42 endif()
042ac60f5bf9 simplified build of curl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 26
diff changeset
43
12
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
44 include(${CMAKE_SOURCE_DIR}/Resources/CMake/BoostConfiguration.cmake)
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
45 include(${CMAKE_SOURCE_DIR}/Resources/CMake/DcmtkConfiguration.cmake)
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
46 include(${CMAKE_SOURCE_DIR}/Resources/CMake/MongooseConfiguration.cmake)
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
47 include(${CMAKE_SOURCE_DIR}/Resources/CMake/ZlibConfiguration.cmake)
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
48 include(${CMAKE_SOURCE_DIR}/Resources/CMake/SQLiteConfiguration.cmake)
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
49 include(${CMAKE_SOURCE_DIR}/Resources/CMake/JsonCppConfiguration.cmake)
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
50 include(${CMAKE_SOURCE_DIR}/Resources/CMake/LibCurlConfiguration.cmake)
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
51 include(${CMAKE_SOURCE_DIR}/Resources/CMake/LibPngConfiguration.cmake)
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
52
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
53
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
54 if (${CMAKE_COMPILER_IS_GNUCXX})
26
6ba765ecf3db compiling openssl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
55 set(CMAKE_C_FLAGS "-Wall -Wno-long-long -Wno-implicit-function-declaration")
6ba765ecf3db compiling openssl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
56 # --std=c99 makes libcurl not to compile
6ba765ecf3db compiling openssl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
57 # -pedantic gives a lot of warnings on OpenSSL
12
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
58 set(CMAKE_CXX_FLAGS "-Wall -pedantic -Wno-long-long -Wno-variadic-macros")
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
59 elseif (${MSVC})
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
60 # http://stackoverflow.com/a/6510446
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
61 foreach(flag_var
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
62 CMAKE_C_FLAGS_DEBUG
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
63 CMAKE_CXX_FLAGS_DEBUG
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
64 CMAKE_C_FLAGS_RELEASE
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
65 CMAKE_CXX_FLAGS_RELEASE
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
66 CMAKE_C_FLAGS_MINSIZEREL
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
67 CMAKE_CXX_FLAGS_MINSIZEREL
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
68 CMAKE_C_FLAGS_RELWITHDEBINFO
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
69 CMAKE_CXX_FLAGS_RELWITHDEBINFO)
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
70 string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
71 string(REGEX REPLACE "/MDd" "/MTd" ${flag_var} "${${flag_var}}")
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
72 endforeach(flag_var)
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
73 add_definitions(
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
74 -D_CRT_SECURE_NO_WARNINGS=1
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
75 -D_CRT_SECURE_NO_DEPRECATE=1
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
76 )
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
77 include_directories(${CMAKE_SOURCE_DIR}/Resources/VisualStudio)
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
78 link_libraries(netapi32)
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
79 endif()
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
80
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
81
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
82 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
97
5eaf1b69acd5 hardening
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 81
diff changeset
83 if (DEBIAN_HARDENING)
5eaf1b69acd5 hardening
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 81
diff changeset
84 execute_process(
5eaf1b69acd5 hardening
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 81
diff changeset
85 COMMAND dpkg-buildflags --get CPPFLAGS
5eaf1b69acd5 hardening
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 81
diff changeset
86 OUTPUT_VARIABLE DEBIAN_CPP_FLAGS
5eaf1b69acd5 hardening
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 81
diff changeset
87 OUTPUT_STRIP_TRAILING_WHITESPACE)
5eaf1b69acd5 hardening
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 81
diff changeset
88 execute_process(
5eaf1b69acd5 hardening
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 81
diff changeset
89 COMMAND dpkg-buildflags --get CFLAGS
5eaf1b69acd5 hardening
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 81
diff changeset
90 OUTPUT_VARIABLE DEBIAN_C_FLAGS
5eaf1b69acd5 hardening
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 81
diff changeset
91 OUTPUT_STRIP_TRAILING_WHITESPACE)
5eaf1b69acd5 hardening
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 81
diff changeset
92 execute_process(
5eaf1b69acd5 hardening
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 81
diff changeset
93 COMMAND dpkg-buildflags --get CXXFLAGS
5eaf1b69acd5 hardening
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 81
diff changeset
94 OUTPUT_VARIABLE DEBIAN_CXX_FLAGS
5eaf1b69acd5 hardening
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 81
diff changeset
95 OUTPUT_STRIP_TRAILING_WHITESPACE)
5eaf1b69acd5 hardening
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 81
diff changeset
96 execute_process(
5eaf1b69acd5 hardening
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 81
diff changeset
97 COMMAND dpkg-buildflags --get LDFLAGS
5eaf1b69acd5 hardening
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 81
diff changeset
98 OUTPUT_VARIABLE DEBIAN_LD_FLAGS
5eaf1b69acd5 hardening
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 81
diff changeset
99 OUTPUT_STRIP_TRAILING_WHITESPACE)
5eaf1b69acd5 hardening
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 81
diff changeset
100
5eaf1b69acd5 hardening
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 81
diff changeset
101 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${DEBIAN_C_FLAGS} ${DEBIAN_CPP_FLAGS}")
5eaf1b69acd5 hardening
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 81
diff changeset
102 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${DEBIAN_CXX_FLAGS} ${DEBIAN_CPP_FLAGS}")
5eaf1b69acd5 hardening
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 81
diff changeset
103 endif()
5eaf1b69acd5 hardening
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 81
diff changeset
104
12
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
105 add_definitions(
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
106 -D_LARGEFILE64_SOURCE=1
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
107 -D_FILE_OFFSET_BITS=64
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
108 )
97
5eaf1b69acd5 hardening
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 81
diff changeset
109 set(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed ${DEBIAN_LD_FLAGS}")
5eaf1b69acd5 hardening
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 81
diff changeset
110 set(CMAKE_MODULE_LINKER_FLAGS "-Wl,--no-undefined ${DEBIAN_LD_FLAGS}")
5eaf1b69acd5 hardening
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 81
diff changeset
111 set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined ${DEBIAN_LD_FLAGS}")
12
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
112
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
113 # http://www.mail-archive.com/cmake@cmake.org/msg08837.html
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
114 set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "")
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
115 link_libraries(uuid pthread rt)
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
116
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
117 elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
118 add_definitions(
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
119 -DWINVER=0x0501
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
120 -D_CRT_SECURE_NO_WARNINGS=1
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
121 )
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
122 link_libraries(rpcrt4 ws2_32)
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
123 endif()
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
124
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
125
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
126 if (${STATIC_BUILD})
57
4bc019d2f969 renaming
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 52
diff changeset
127 add_definitions(-DORTHANC_STATIC=1)
12
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
128 else()
57
4bc019d2f969 renaming
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 52
diff changeset
129 add_definitions(-DORTHANC_STATIC=0)
12
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
130 endif()
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
131
19
e85455ff6039 standalon
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 12
diff changeset
132 if (${STANDALONE_BUILD})
12
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
133 add_definitions(
57
4bc019d2f969 renaming
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 52
diff changeset
134 -DORTHANC_STANDALONE=1
12
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
135 )
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
136
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
137 EmbedResources(
57
4bc019d2f969 renaming
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 52
diff changeset
138 PREPARE_DATABASE OrthancServer/PrepareDatabase.sql
4bc019d2f969 renaming
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 52
diff changeset
139 ORTHANC_EXPLORER OrthancExplorer
12
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
140 )
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
141
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
142 else()
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
143 add_definitions(
57
4bc019d2f969 renaming
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 52
diff changeset
144 -DORTHANC_STANDALONE=0
4bc019d2f969 renaming
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 52
diff changeset
145 -DORTHANC_PATH=\"${CMAKE_SOURCE_DIR}\"
12
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
146 )
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
147
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
148 EmbedResources(
57
4bc019d2f969 renaming
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 52
diff changeset
149 PREPARE_DATABASE OrthancServer/PrepareDatabase.sql
12
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
150 )
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
151 endif()
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
152
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
153
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
154 add_library(CoreLibrary
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
155 STATIC
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
156 ${AUTOGENERATED_SOURCES}
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
157 ${THIRD_PARTY_SOURCES}
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
158
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
159 Core/ChunkedBuffer.cpp
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
160 Core/Compression/BufferCompressor.cpp
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
161 Core/Compression/ZlibCompressor.cpp
81
0ec5e2e327b1 zip writer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 79
diff changeset
162 Core/Compression/ZipWriter.cpp
57
4bc019d2f969 renaming
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 52
diff changeset
163 Core/OrthancException.cpp
12
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
164 Core/DicomFormat/DicomArray.cpp
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
165 Core/DicomFormat/DicomMap.cpp
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
166 Core/DicomFormat/DicomTag.cpp
79
297bad4e1019 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 57
diff changeset
167 Core/DicomFormat/DicomIntegerPixelAccessor.cpp
12
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
168 Core/FileStorage.cpp
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
169 Core/HttpServer/EmbeddedResourceHttpHandler.cpp
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
170 Core/HttpServer/FilesystemHttpHandler.cpp
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
171 Core/HttpServer/HttpHandler.cpp
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
172 Core/HttpServer/HttpOutput.cpp
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
173 Core/HttpServer/MongooseServer.cpp
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
174 Core/MultiThreading/BagOfRunnablesBySteps.cpp
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
175 Core/PngWriter.cpp
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
176 Core/SQLite/Connection.cpp
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
177 Core/SQLite/FunctionContext.cpp
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
178 Core/SQLite/Statement.cpp
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
179 Core/SQLite/StatementId.cpp
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
180 Core/SQLite/StatementReference.cpp
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
181 Core/SQLite/Transaction.cpp
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
182 Core/Toolbox.cpp
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
183 Core/Uuid.cpp
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
184
57
4bc019d2f969 renaming
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 52
diff changeset
185 OrthancCppClient/HttpClient.cpp
4bc019d2f969 renaming
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 52
diff changeset
186 OrthancCppClient/HttpException.cpp
12
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
187 )
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
188
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
189 add_library(ServerLibrary
57
4bc019d2f969 renaming
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 52
diff changeset
190 OrthancServer/DicomProtocol/DicomFindAnswers.cpp
4bc019d2f969 renaming
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 52
diff changeset
191 OrthancServer/DicomProtocol/DicomServer.cpp
4bc019d2f969 renaming
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 52
diff changeset
192 OrthancServer/DicomProtocol/DicomUserConnection.cpp
4bc019d2f969 renaming
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 52
diff changeset
193 OrthancServer/FromDcmtkBridge.cpp
4bc019d2f969 renaming
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 52
diff changeset
194 OrthancServer/Internals/CommandDispatcher.cpp
4bc019d2f969 renaming
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 52
diff changeset
195 OrthancServer/Internals/FindScp.cpp
4bc019d2f969 renaming
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 52
diff changeset
196 OrthancServer/Internals/MoveScp.cpp
4bc019d2f969 renaming
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 52
diff changeset
197 OrthancServer/Internals/StoreScp.cpp
4bc019d2f969 renaming
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 52
diff changeset
198 OrthancServer/OrthancInitialization.cpp
4bc019d2f969 renaming
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 52
diff changeset
199 OrthancServer/OrthancRestApi.cpp
4bc019d2f969 renaming
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 52
diff changeset
200 OrthancServer/ServerIndex.cpp
4bc019d2f969 renaming
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 52
diff changeset
201 OrthancServer/ToDcmtkBridge.cpp
12
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
202 )
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
203
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
204 # Ensure autogenerated code is built before building ServerLibrary
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
205 add_dependencies(ServerLibrary CoreLibrary)
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
206
57
4bc019d2f969 renaming
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 52
diff changeset
207 add_executable(Orthanc
4bc019d2f969 renaming
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 52
diff changeset
208 OrthancServer/main.cpp
12
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
209 )
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
210
120
5af0a4345d06 disabling of unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 102
diff changeset
211 TARGET_LINK_LIBRARIES(Orthanc ServerLibrary CoreLibrary)
5af0a4345d06 disabling of unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 102
diff changeset
212
12
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
213
120
5af0a4345d06 disabling of unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 102
diff changeset
214 if (BUILD_UNIT_TESTS)
5af0a4345d06 disabling of unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 102
diff changeset
215 include(${CMAKE_SOURCE_DIR}/Resources/CMake/GoogleTestConfiguration.cmake)
5af0a4345d06 disabling of unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 102
diff changeset
216 add_executable(UnitTests
5af0a4345d06 disabling of unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 102
diff changeset
217 ${GTEST_SOURCES}
5af0a4345d06 disabling of unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 102
diff changeset
218 UnitTests/main.cpp
5af0a4345d06 disabling of unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 102
diff changeset
219 UnitTests/SQLite.cpp
5af0a4345d06 disabling of unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 102
diff changeset
220 UnitTests/SQLiteChromium.cpp
5af0a4345d06 disabling of unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 102
diff changeset
221 UnitTests/Versions.cpp
5af0a4345d06 disabling of unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 102
diff changeset
222 UnitTests/Zip.cpp
5af0a4345d06 disabling of unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 102
diff changeset
223 )
5af0a4345d06 disabling of unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 102
diff changeset
224 TARGET_LINK_LIBRARIES(UnitTests ServerLibrary CoreLibrary)
5af0a4345d06 disabling of unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 102
diff changeset
225 endif()
5af0a4345d06 disabling of unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 102
diff changeset
226
12
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
227
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
228 find_package(Doxygen)
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
229 if (DOXYGEN_FOUND)
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
230 configure_file(
57
4bc019d2f969 renaming
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 52
diff changeset
231 ${CMAKE_SOURCE_DIR}/Resources/Orthanc.doxygen
4bc019d2f969 renaming
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 52
diff changeset
232 ${CMAKE_CURRENT_BINARY_DIR}/Orthanc.doxygen
12
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
233 @ONLY)
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
234 add_custom_target(doc
57
4bc019d2f969 renaming
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 52
diff changeset
235 ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Orthanc.doxygen
12
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
236 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
237 COMMENT "Generating API documentation with Doxygen" VERBATIM
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
238 )
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
239 endif(DOXYGEN_FOUND)