comparison CMakeLists.txt @ 2391:233d6eeef799

fix pch
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 30 Aug 2017 12:29:48 +0200
parents cf0eb76c5e81
children a88c3ea0c96d
comparison
equal deleted inserted replaced
2390:cf0eb76c5e81 2391:233d6eeef799
57 ##################################################################### 57 #####################################################################
58 ## List of source files 58 ## List of source files
59 ##################################################################### 59 #####################################################################
60 60
61 set(ORTHANC_SERVER_SOURCES 61 set(ORTHANC_SERVER_SOURCES
62 ${ORTHANC_DICOM_SOURCES}
63
64 OrthancServer/DatabaseWrapper.cpp 62 OrthancServer/DatabaseWrapper.cpp
65 OrthancServer/DatabaseWrapperBase.cpp 63 OrthancServer/DatabaseWrapperBase.cpp
66 OrthancServer/DicomInstanceToStore.cpp 64 OrthancServer/DicomInstanceToStore.cpp
67 OrthancServer/ExportedResource.cpp 65 OrthancServer/ExportedResource.cpp
68 OrthancServer/LuaScripting.cpp 66 OrthancServer/LuaScripting.cpp
145 AND USE_DCMTK_360) 143 AND USE_DCMTK_360)
146 # Add the "-pedantic" flag only on the Orthanc sources, and only if 144 # Add the "-pedantic" flag only on the Orthanc sources, and only if
147 # cross-compiling DCMTK 3.6.0 145 # cross-compiling DCMTK 3.6.0
148 set(ORTHANC_ALL_SOURCES 146 set(ORTHANC_ALL_SOURCES
149 ${ORTHANC_CORE_SOURCES_INTERNAL} 147 ${ORTHANC_CORE_SOURCES_INTERNAL}
148 ${ORTHANC_DICOM_SOURCES_INTERNAL}
150 ${ORTHANC_SERVER_SOURCES} 149 ${ORTHANC_SERVER_SOURCES}
151 ${ORTHANC_UNIT_TESTS_SOURCES} 150 ${ORTHANC_UNIT_TESTS_SOURCES}
152 Plugins/Samples/ServeFolders/Plugin.cpp 151 Plugins/Samples/ServeFolders/Plugin.cpp
153 Plugins/Samples/ModalityWorklists/Plugin.cpp 152 Plugins/Samples/ModalityWorklists/Plugin.cpp
154 OrthancServer/main.cpp 153 OrthancServer/main.cpp
247 # headers might get broken! 246 # headers might get broken!
248 247
249 if (MSVC) 248 if (MSVC)
250 add_definitions(-DORTHANC_USE_PRECOMPILED_HEADERS=1) 249 add_definitions(-DORTHANC_USE_PRECOMPILED_HEADERS=1)
251 250
251 set(TMP
252 ${ORTHANC_CORE_SOURCES_INTERNAL}
253 ${ORTHANC_DICOM_SOURCES_INTERNAL}
254 )
255
252 ADD_VISUAL_STUDIO_PRECOMPILED_HEADERS( 256 ADD_VISUAL_STUDIO_PRECOMPILED_HEADERS(
253 "PrecompiledHeaders.h" "Core/PrecompiledHeaders.cpp" ORTHANC_CORE_SOURCES_INTERNAL) 257 "PrecompiledHeaders.h" "Core/PrecompiledHeaders.cpp"
258 TMP ORTHANC_CORE_PCH)
254 259
255 ADD_VISUAL_STUDIO_PRECOMPILED_HEADERS( 260 ADD_VISUAL_STUDIO_PRECOMPILED_HEADERS(
256 "PrecompiledHeadersServer.h" "OrthancServer/PrecompiledHeadersServer.cpp" ORTHANC_SERVER_SOURCES) 261 "PrecompiledHeadersServer.h" "OrthancServer/PrecompiledHeadersServer.cpp"
262 ORTHANC_SERVER_SOURCES ORTHANC_SERVER_PCH)
257 263
258 ADD_VISUAL_STUDIO_PRECOMPILED_HEADERS( 264 ADD_VISUAL_STUDIO_PRECOMPILED_HEADERS(
259 "PrecompiledHeadersUnitTests.h" "UnitTestsSources/PrecompiledHeadersUnitTests.cpp" ORTHANC_UNIT_TESTS_SOURCES) 265 "PrecompiledHeadersUnitTests.h" "UnitTestsSources/PrecompiledHeadersUnitTests.cpp"
266 ORTHANC_UNIT_TESTS_SOURCES ORTHANC_UNIT_TESTS_PCH)
260 endif() 267 endif()
261 268
262 269
263 270
264 ##################################################################### 271 #####################################################################
273 280
274 # "CoreLibrary" contains all the third-party dependencies and the 281 # "CoreLibrary" contains all the third-party dependencies and the
275 # content of the "Core" folder, but not OpenSSL, nor DCMTK. 282 # content of the "Core" folder, but not OpenSSL, nor DCMTK.
276 add_library(CoreLibrary 283 add_library(CoreLibrary
277 STATIC 284 STATIC
278 ${ORTHANC_CORE_SOURCES_INTERNAL} 285 ${ORTHANC_CORE_PCH}
279 ${ORTHANC_CORE_SOURCES_DEPENDENCIES} 286 ${ORTHANC_CORE_SOURCES}
280 ${AUTOGENERATED_SOURCES} 287 ${AUTOGENERATED_SOURCES}
281 ) 288 )
282 289
283 290
284 ##################################################################### 291 #####################################################################
286 ##################################################################### 293 #####################################################################
287 294
288 # "ServerLibrary" contains DCMTK 295 # "ServerLibrary" contains DCMTK
289 add_library(ServerLibrary 296 add_library(ServerLibrary
290 STATIC 297 STATIC
291 ${DCMTK_SOURCES} 298 ${ORTHANC_SERVER_PCH}
292 ${ORTHANC_SERVER_SOURCES} 299 ${ORTHANC_SERVER_SOURCES}
300 ${ORTHANC_DICOM_SOURCES}
293 ) 301 )
294 302
295 # Ensure autogenerated code is built before building ServerLibrary 303 # Ensure autogenerated code is built before building ServerLibrary
296 add_dependencies(ServerLibrary CoreLibrary) 304 add_dependencies(ServerLibrary CoreLibrary)
297 305
317 ## Build the unit tests 325 ## Build the unit tests
318 ##################################################################### 326 #####################################################################
319 327
320 add_executable(UnitTests 328 add_executable(UnitTests
321 ${GTEST_SOURCES} 329 ${GTEST_SOURCES}
330 ${ORTHANC_UNIT_TESTS_PCH}
322 ${ORTHANC_UNIT_TESTS_SOURCES} 331 ${ORTHANC_UNIT_TESTS_SOURCES}
323 ) 332 )
324 333
325 target_link_libraries(UnitTests ServerLibrary CoreLibrary ${DCMTK_LIBRARIES}) 334 target_link_libraries(UnitTests ServerLibrary CoreLibrary ${DCMTK_LIBRARIES})
326 335