@@ -27,60 +27,6 @@ target_include_directories(
2727 "${CMAKE_CURRENT_SOURCE_DIR } /../src"
2828)
2929
30- # itkDCMTKFileReader.h transitively #include's dcmtk/dcmdata/*.h. ITKDCMTK
31- # is a PRIVATE_DEPENDS of ITKIODCMTK (so consumers don't see DCMTK headers),
32- # but the test driver includes itkDCMTKFileReader.h directly and therefore
33- # needs the DCMTK include path on its compile line.
34- # Reconstruct the include path the same way
35- # Modules/ThirdParty/DCMTK/CMakeLists.txt populates ITKDCMTK_INCLUDE_DIRS,
36- # since that variable is not in scope here.
37- if (NOT ITK_USE_SYSTEM_DCMTK)
38- set (
39- _dcmtk_ep_inc
40- "${CMAKE_BINARY_DIR } /Modules/ThirdParty/DCMTK/ITKDCMTK_ExtProject"
41- )
42- set (
43- _dcmtk_libs
44- dcmdata
45- dcmpstat
46- dcmsr
47- dcmqrdb
48- dcmimgle
49- dcmimage
50- dcmjpeg
51- dcmjpls
52- dcmnet
53- dcmiod
54- dcmfg
55- dcmseg
56- dcmpmap
57- ofstd
58- oflog
59- )
60- # IS_DIRECTORY guards were dropped: the ExtProject source/build trees are
61- # only materialized at build time, not at CMake configure time, so any
62- # IS_DIRECTORY check here returns false on a clean checkout (issue #6189
63- # greptile P1). The paths below are deterministic, and CMake is fine with
64- # -I flags that name not-yet-existing directories — they just need to
65- # exist by the time the test driver is compiled, which is guaranteed by
66- # ITKDCMTK_ExtProject being a transitive build dependency of the test
67- # driver via the ITKIODCMTK module's PRIVATE_DEPENDS.
68- foreach (_lib IN LISTS _dcmtk_libs)
69- target_include_directories (
70- ITKIODCMTKTestDriver
71- PRIVATE
72- "${_dcmtk_ep_inc} /${_lib} /include"
73- )
74- endforeach ()
75- target_include_directories (
76- ITKIODCMTKTestDriver
77- PRIVATE
78- "${CMAKE_BINARY_DIR } /Modules/ThirdParty/DCMTK/ITKDCMTK_ExtProject-build/config/include"
79- )
80- unset (_dcmtk_libs)
81- unset (_dcmtk_ep_inc)
82- endif ()
83-
8430itk_add_test (
8531 NAME itkDCMTKGetDicomTagsTest
8632 COMMAND
0 commit comments