annotate CMakeLists.txt @ 12:c38716a8a146

static link against MSVC CRT
author Administrator@jodogne-w01
date Fri, 20 Jul 2012 12:14:01 +0200
parents 3a584803783e
children e85455ff6039
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
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
3 project(Palantir)
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)
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
7
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
8 SET(STATIC_BUILD ON CACHE BOOL "Static build of the third-party libraries (necessary for Windows)")
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
9 SET(RELEASE_BUILD OFF CACHE BOOL "Release build")
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
10
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
11 if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
12 CHECK_INCLUDE_FILES(rpc.h HAVE_UUID_H)
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
13 else()
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
14 CHECK_INCLUDE_FILES(uuid/uuid.h HAVE_UUID_H)
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
15 endif()
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
16
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
17 if ("${HAVE_UUID_H}" STREQUAL "")
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
18 message(FATAL_ERROR "Please install the uuid-dev package")
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
19 endif()
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
20
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
21
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
22 SET(THIRD_PARTY_SOURCES)
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
23 include(${CMAKE_SOURCE_DIR}/Resources/CMake/BoostConfiguration.cmake)
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
24 include(${CMAKE_SOURCE_DIR}/Resources/CMake/DcmtkConfiguration.cmake)
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
25 include(${CMAKE_SOURCE_DIR}/Resources/CMake/GoogleTestConfiguration.cmake)
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
26 include(${CMAKE_SOURCE_DIR}/Resources/CMake/MongooseConfiguration.cmake)
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
27 include(${CMAKE_SOURCE_DIR}/Resources/CMake/ZlibConfiguration.cmake)
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
28 include(${CMAKE_SOURCE_DIR}/Resources/CMake/SQLiteConfiguration.cmake)
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
29 include(${CMAKE_SOURCE_DIR}/Resources/CMake/JsonCppConfiguration.cmake)
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
30 include(${CMAKE_SOURCE_DIR}/Resources/CMake/LibCurlConfiguration.cmake)
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
31 include(${CMAKE_SOURCE_DIR}/Resources/CMake/LibPngConfiguration.cmake)
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
32
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
33
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
34 if (${CMAKE_COMPILER_IS_GNUCXX})
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
35 set(CMAKE_C_FLAGS "-Wall -pedantic -Wno-implicit-function-declaration") # --std=c99 makes libcurl not to compile
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
36 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
37 elseif (${MSVC})
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
38 # http://stackoverflow.com/a/6510446
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
39 foreach(flag_var
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
40 CMAKE_C_FLAGS_DEBUG
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
41 CMAKE_CXX_FLAGS_DEBUG
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
42 CMAKE_C_FLAGS_RELEASE
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
43 CMAKE_CXX_FLAGS_RELEASE
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
44 CMAKE_C_FLAGS_MINSIZEREL
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
45 CMAKE_CXX_FLAGS_MINSIZEREL
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
46 CMAKE_C_FLAGS_RELWITHDEBINFO
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
47 CMAKE_CXX_FLAGS_RELWITHDEBINFO)
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
48 string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
49 string(REGEX REPLACE "/MDd" "/MTd" ${flag_var} "${${flag_var}}")
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
50 endforeach(flag_var)
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
51 add_definitions(
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
52 -D_CRT_SECURE_NO_WARNINGS=1
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
53 -D_CRT_SECURE_NO_DEPRECATE=1
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
54 )
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
55 include_directories(${CMAKE_SOURCE_DIR}/Resources/VisualStudio)
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
56 link_libraries(netapi32)
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
57 endif()
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
58
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
59
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
60 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
61 add_definitions(
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
62 -D_LARGEFILE64_SOURCE=1
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
63 -D_FILE_OFFSET_BITS=64
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
64 )
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
65 set(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed")
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
66 set(CMAKE_MODULE_LINKER_FLAGS "-Wl,--no-undefined")
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
67 set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined")
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
68
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
69 # http://www.mail-archive.com/cmake@cmake.org/msg08837.html
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
70 set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "")
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
71 link_libraries(uuid pthread rt)
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
72
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
73 elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
74 add_definitions(
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
75 -DWINVER=0x0501
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
76 -D_CRT_SECURE_NO_WARNINGS=1
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
77 )
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
78 link_libraries(rpcrt4 ws2_32)
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 (${STATIC_BUILD})
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
83 add_definitions(-DPALANTIR_STATIC=1)
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
84 else()
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
85 add_definitions(-DPALANTIR_STATIC=0)
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
86 endif()
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
87
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
88 if (${RELEASE_BUILD})
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
89 add_definitions(
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
90 -DPALANTIR_RELEASE=1
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
91 )
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
92
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
93 EmbedResources(
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
94 PREPARE_DATABASE PalantirServer/PrepareDatabase.sql
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
95 PALANTIR_EXPLORER PalantirExplorer
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
96 )
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
97
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
98 else()
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
99 add_definitions(
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
100 -DPALANTIR_RELEASE=0
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
101 -DPALANTIR_PATH=\"${CMAKE_SOURCE_DIR}\"
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
102 )
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
103
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
104 EmbedResources(
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
105 PREPARE_DATABASE PalantirServer/PrepareDatabase.sql
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
106 )
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
107 endif()
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
108
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
109
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
110 add_library(CoreLibrary
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
111 STATIC
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
112 ${AUTOGENERATED_SOURCES}
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
113 ${THIRD_PARTY_SOURCES}
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
114
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
115 Core/ChunkedBuffer.cpp
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
116 Core/Compression/BufferCompressor.cpp
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
117 Core/Compression/ZlibCompressor.cpp
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
118 Core/PalantirException.cpp
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
119 Core/DicomFormat/DicomArray.cpp
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
120 Core/DicomFormat/DicomMap.cpp
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
121 Core/DicomFormat/DicomTag.cpp
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
122 Core/FileStorage.cpp
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
123 Core/HttpServer/EmbeddedResourceHttpHandler.cpp
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
124 Core/HttpServer/FilesystemHttpHandler.cpp
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
125 Core/HttpServer/HttpHandler.cpp
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
126 Core/HttpServer/HttpOutput.cpp
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
127 Core/HttpServer/MongooseServer.cpp
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
128 Core/MultiThreading/BagOfRunnablesBySteps.cpp
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
129 Core/PngWriter.cpp
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
130 Core/SQLite/Connection.cpp
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
131 Core/SQLite/FunctionContext.cpp
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
132 Core/SQLite/Statement.cpp
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
133 Core/SQLite/StatementId.cpp
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
134 Core/SQLite/StatementReference.cpp
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
135 Core/SQLite/Transaction.cpp
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
136 Core/Toolbox.cpp
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
137 Core/Uuid.cpp
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
138
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
139 PalantirCppClient/HttpClient.cpp
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
140 PalantirCppClient/HttpException.cpp
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
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
143 add_library(ServerLibrary
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
144 PalantirServer/DicomIntegerPixelAccessor.cpp
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
145 PalantirServer/DicomProtocol/DicomFindAnswers.cpp
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
146 PalantirServer/DicomProtocol/DicomServer.cpp
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
147 PalantirServer/DicomProtocol/DicomUserConnection.cpp
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
148 PalantirServer/FromDcmtkBridge.cpp
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
149 PalantirServer/Internals/CommandDispatcher.cpp
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
150 PalantirServer/Internals/FindScp.cpp
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
151 PalantirServer/Internals/MoveScp.cpp
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
152 PalantirServer/Internals/StoreScp.cpp
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
153 PalantirServer/PalantirInitialization.cpp
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
154 PalantirServer/PalantirRestApi.cpp
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
155 PalantirServer/ServerIndex.cpp
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
156 PalantirServer/ToDcmtkBridge.cpp
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
157 PalantirServer/ToDcmtkBridge.cpp
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
158 PalantirServer/DicomIntegerPixelAccessor.cpp
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
159 )
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
160
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
161 # Ensure autogenerated code is built before building ServerLibrary
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
162 add_dependencies(ServerLibrary CoreLibrary)
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
163
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
164 add_executable(Palantir
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
165 PalantirServer/main.cpp
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
166 )
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
167
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
168 add_executable(UnitTests
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
169 ${GTEST_SOURCES}
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
170 UnitTests/main.cpp
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
171 UnitTests/SQLite.cpp
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
172 UnitTests/SQLiteChromium.cpp
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
173 UnitTests/Versions.cpp
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
174 )
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
175
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
176 TARGET_LINK_LIBRARIES(Palantir ServerLibrary CoreLibrary)
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
177 TARGET_LINK_LIBRARIES(UnitTests ServerLibrary CoreLibrary)
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
178
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
179
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
180 find_package(Doxygen)
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
181 if (DOXYGEN_FOUND)
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
182 configure_file(
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
183 ${CMAKE_SOURCE_DIR}/Resources/Palantir.doxygen
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
184 ${CMAKE_CURRENT_BINARY_DIR}/Palantir.doxygen
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
185 @ONLY)
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
186 add_custom_target(doc
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
187 ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Palantir.doxygen
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
188 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
189 COMMENT "Generating API documentation with Doxygen" VERBATIM
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
190 )
c38716a8a146 static link against MSVC CRT
Administrator@jodogne-w01
parents: 8
diff changeset
191 endif(DOXYGEN_FOUND)