# HG changeset patch # User Sebastien Jodogne # Date 1681315445 -7200 # Node ID 043bf0958614d816b65cde310aa508bc8510620b # Parent 0e8dfba67ac9b170aa5b64d47c69796795eb8e43 cleanup diff -r 0e8dfba67ac9 -r 043bf0958614 OrthancServer/CMakeLists.txt --- a/OrthancServer/CMakeLists.txt Wed Apr 12 17:55:11 2023 +0200 +++ b/OrthancServer/CMakeLists.txt Wed Apr 12 18:04:05 2023 +0200 @@ -338,6 +338,8 @@ # headers might get broken! if (MSVC) + add_definitions(-DORTHANC_USE_PRECOMPILED_HEADERS=1) + set(TMP ${ORTHANC_CORE_SOURCES_INTERNAL} ${ORTHANC_DICOM_SOURCES_INTERNAL} @@ -377,13 +379,6 @@ ${AUTOGENERATED_SOURCES} ) -if (MSVC) - set_target_properties( - CoreLibrary - PROPERTIES COMPILE_DEFINITIONS "ORTHANC_USE_PRECOMPILED_HEADERS=1" - ) -endif() - add_dependencies(CoreLibrary AutogeneratedTarget) if (LIBICU_LIBRARIES) @@ -425,13 +420,6 @@ ${ORTHANC_SERVER_SOURCES} ) -if (MSVC) - set_target_properties( - ServerLibrary - PROPERTIES COMPILE_DEFINITIONS "ORTHANC_USE_PRECOMPILED_HEADERS=1" - ) -endif() - # Ensure autogenerated code is built before building ServerLibrary add_dependencies(ServerLibrary CoreLibrary OrthancDatabaseProtobuf) @@ -470,13 +458,6 @@ ${BOOST_EXTENDED_SOURCES} ) -if (MSVC) - set_target_properties( - UnitTests - PROPERTIES COMPILE_DEFINITIONS "ORTHANC_USE_PRECOMPILED_HEADERS=1" - ) -endif() - target_link_libraries(UnitTests ServerLibrary CoreLibrary