Pārlūkot izejas kodu

COMP: FindDCMTK - Exclude -D from DCMTK_DEFINITIONS for easier re-use

Since target properties like COMPILE_DEFINITIONS
or INTERFACE_COMPILE_DEFINITIONS do not expect definition to include "-D",
this commit exclude it from definition list associated
with DCMTK_DEFINITIONS.
Jean-Christophe Fillion-Robin 11 gadi atpakaļ
vecāks
revīzija
21f3654093
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. 2 2
      Utilities/CMake/FindDCMTK.cmake

+ 2 - 2
Utilities/CMake/FindDCMTK.cmake

@@ -343,10 +343,10 @@ if(DCMTK_FOUND AND UNIX AND NOT APPLE)
     DCMTK_HAVE_CONFIG_H_OPTIONAL
     )
   if(NOT DCMTK_HAVE_CONFIG_H_OPTIONAL)
-    set(DCMTK_DEFINITIONS "-DHAVE_CONFIG_H")
+    set(DCMTK_DEFINITIONS "HAVE_CONFIG_H")
   endif()
   if(NOT DCMTK_HAVE_CONFIG_H_OPTIONAL AND NOT DCMTK_FIND_PACKAGE_SKIP_ADD_DEFINITIONS)
-    add_definitions(${DCMTK_DEFINITIONS})
+    add_definitions(-D${DCMTK_DEFINITIONS})
   endif()
 endif()