Skip to content

Commit

Permalink
Fix linking against recent DCMTK version(s).
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelonken authored and fedorov committed Jun 22, 2024
1 parent d1c686d commit dd6e8c3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
5 changes: 3 additions & 2 deletions apps/seg/itkimage2segimage.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,10 @@ int main(int argc, char *argv[])
}
segmentations = segmentationsReordered;
}

// Copy to DcmItem* vector to use it in itkimage2dcmSegmentation() call
std::vector<DcmItem*> dcmItems(dcmDatasets.begin(), dcmDatasets.end());
try {
DcmDataset* result = dcmqi::Itk2DicomConverter::itkimage2dcmSegmentation(dcmDatasets,
DcmDataset* result = dcmqi::Itk2DicomConverter::itkimage2dcmSegmentation(dcmItems,
segmentations,
metadata,
skipEmptySlices,
Expand Down
9 changes: 1 addition & 8 deletions libsrc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,9 @@ set(_dcmtk_libs)
set(_dcmtk_includes)
if(TARGET DCMTK::DCMTK)
set(_dcmtk_libs DCMTK::DCMTK)
# TODO
MESSAGE(STATUS "------------------------------------- DCMTK::DCMTK: _dcmtk_libs1: ${_dcmtk_libs} --------------------------------")
else()
set(_dcmtk_libs ${DCMTK_LIBRARIES})
set(_dcmtk_libs DCMTK::DCMTK)
set(_dcmtk_includes ${DCMTK_INCLUDE_DIRS})
# TODO
MESSAGE(STATUS "------------------------------------- DCMTK::DCMTK: ${DCMTK_LIBRARIES} --------------------------------")
MESSAGE(STATUS "------------------------------------- DCMTK::DCMTK: _dcmtk_libs2: ${_dcmtk_libs} --------------------------------")
endif()

set(${lib_name}_INCLUDE_DIRS
Expand All @@ -104,8 +99,6 @@ target_link_libraries(${lib_name} PUBLIC
${ITK_LIBRARIES}
$<$<NOT:$<BOOL:${DCMQI_BUILTIN_JSONCPP}>>:${JsonCpp_LIBRARY}>
)
# TODO
MESSAGE(STATUS "------------------------------------- DCMTK::DCMTK: _dcmtk_libs3: ${_dcmtk_libs} --------------------------------")

if(export_targets)
install(TARGETS ${lib_name}
Expand Down

0 comments on commit dd6e8c3

Please sign in to comment.