changeset 5267:043bf0958614

cleanup
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 12 Apr 2023 18:04:05 +0200
parents 0e8dfba67ac9
children cdeb7f027c1b c3f425e78539
files OrthancServer/CMakeLists.txt
diffstat 1 files changed, 2 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- 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