Skip to content

Commit 26663ec

Browse files
authored
Merge pull request #4910 from jcfr/support-dcmtk-config-with-target-namespace
COMP: Update DCMTK targets based on new DCMTK namespace
2 parents 4b7886a + cd237cb commit 26663ec

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Modules/ThirdParty/DCMTK/CMakeLists.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,14 @@ if(ITK_USE_SYSTEM_DCMTK)
9393
set(ITKDCMTK_SYSTEM_INCLUDE_DIRS ${DCMTK_INCLUDE_DIRS})
9494

9595
# Module standard library var
96-
set(ITKDCMTK_LIBRARIES ${DCMTK_LIBRARIES})
96+
set(ITKDCMTK_LIBRARIES)
97+
foreach(lib IN LISTS DCMTK_LIBRARIES)
98+
if(TARGET DCMTK::${lib})
99+
list(APPEND ITKDCMTK_LIBRARIES DCMTK::${lib})
100+
else()
101+
list(APPEND ITKDCMTK_LIBRARIES ${lib})
102+
endif()
103+
endforeach()
97104

98105
# When this module is loaded by an app, load DCMTK too.
99106
set(ITKDCMTK_EXPORT_CODE_INSTALL "

0 commit comments

Comments
 (0)