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