Mercurial > hg > orthanc
comparison OrthancServer/CMakeLists.txt @ 5267:043bf0958614
cleanup
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 12 Apr 2023 18:04:05 +0200 |
parents | 0e8dfba67ac9 |
children | cdeb7f027c1b |
comparison
equal
deleted
inserted
replaced
5265:0e8dfba67ac9 | 5267:043bf0958614 |
---|---|
336 # WARNING: There must be NO MORE "add_definitions()", "include()" or | 336 # WARNING: There must be NO MORE "add_definitions()", "include()" or |
337 # "include_directories()" below, otherwise the generated precompiled | 337 # "include_directories()" below, otherwise the generated precompiled |
338 # headers might get broken! | 338 # headers might get broken! |
339 | 339 |
340 if (MSVC) | 340 if (MSVC) |
341 add_definitions(-DORTHANC_USE_PRECOMPILED_HEADERS=1) | |
342 | |
341 set(TMP | 343 set(TMP |
342 ${ORTHANC_CORE_SOURCES_INTERNAL} | 344 ${ORTHANC_CORE_SOURCES_INTERNAL} |
343 ${ORTHANC_DICOM_SOURCES_INTERNAL} | 345 ${ORTHANC_DICOM_SOURCES_INTERNAL} |
344 ) | 346 ) |
345 | 347 |
374 ${ORTHANC_CORE_PCH} | 376 ${ORTHANC_CORE_PCH} |
375 ${ORTHANC_CORE_SOURCES} | 377 ${ORTHANC_CORE_SOURCES} |
376 ${ORTHANC_DICOM_SOURCES} | 378 ${ORTHANC_DICOM_SOURCES} |
377 ${AUTOGENERATED_SOURCES} | 379 ${AUTOGENERATED_SOURCES} |
378 ) | 380 ) |
379 | |
380 if (MSVC) | |
381 set_target_properties( | |
382 CoreLibrary | |
383 PROPERTIES COMPILE_DEFINITIONS "ORTHANC_USE_PRECOMPILED_HEADERS=1" | |
384 ) | |
385 endif() | |
386 | 381 |
387 add_dependencies(CoreLibrary AutogeneratedTarget) | 382 add_dependencies(CoreLibrary AutogeneratedTarget) |
388 | 383 |
389 if (LIBICU_LIBRARIES) | 384 if (LIBICU_LIBRARIES) |
390 target_link_libraries(CoreLibrary ${LIBICU_LIBRARIES}) | 385 target_link_libraries(CoreLibrary ${LIBICU_LIBRARIES}) |
423 STATIC | 418 STATIC |
424 ${ORTHANC_SERVER_PCH} | 419 ${ORTHANC_SERVER_PCH} |
425 ${ORTHANC_SERVER_SOURCES} | 420 ${ORTHANC_SERVER_SOURCES} |
426 ) | 421 ) |
427 | 422 |
428 if (MSVC) | |
429 set_target_properties( | |
430 ServerLibrary | |
431 PROPERTIES COMPILE_DEFINITIONS "ORTHANC_USE_PRECOMPILED_HEADERS=1" | |
432 ) | |
433 endif() | |
434 | |
435 # Ensure autogenerated code is built before building ServerLibrary | 423 # Ensure autogenerated code is built before building ServerLibrary |
436 add_dependencies(ServerLibrary CoreLibrary OrthancDatabaseProtobuf) | 424 add_dependencies(ServerLibrary CoreLibrary OrthancDatabaseProtobuf) |
437 | 425 |
438 add_executable(Orthanc | 426 add_executable(Orthanc |
439 ${CMAKE_SOURCE_DIR}/Sources/main.cpp | 427 ${CMAKE_SOURCE_DIR}/Sources/main.cpp |
467 ${ORTHANC_UNIT_TESTS_PCH} | 455 ${ORTHANC_UNIT_TESTS_PCH} |
468 ${ORTHANC_FRAMEWORK_UNIT_TESTS} | 456 ${ORTHANC_FRAMEWORK_UNIT_TESTS} |
469 ${ORTHANC_SERVER_UNIT_TESTS} | 457 ${ORTHANC_SERVER_UNIT_TESTS} |
470 ${BOOST_EXTENDED_SOURCES} | 458 ${BOOST_EXTENDED_SOURCES} |
471 ) | 459 ) |
472 | |
473 if (MSVC) | |
474 set_target_properties( | |
475 UnitTests | |
476 PROPERTIES COMPILE_DEFINITIONS "ORTHANC_USE_PRECOMPILED_HEADERS=1" | |
477 ) | |
478 endif() | |
479 | 460 |
480 target_link_libraries(UnitTests | 461 target_link_libraries(UnitTests |
481 ServerLibrary | 462 ServerLibrary |
482 CoreLibrary | 463 CoreLibrary |
483 ${DCMTK_LIBRARIES} | 464 ${DCMTK_LIBRARIES} |