소스 검색

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 년 전
부모
커밋
21f3654093
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  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()