From 4280c70fc50d951fa94ee327cad4c5693615afe0 Mon Sep 17 00:00:00 2001 From: Stefan Dinkelacker Date: Thu, 4 Aug 2022 22:34:45 +0200 Subject: [PATCH] Use DCMTK targets --- Libs/DICOM/Core/CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Libs/DICOM/Core/CMakeLists.txt b/Libs/DICOM/Core/CMakeLists.txt index d2b7d8c60f..5d038b9ba9 100644 --- a/Libs/DICOM/Core/CMakeLists.txt +++ b/Libs/DICOM/Core/CMakeLists.txt @@ -88,6 +88,13 @@ set(KIT_resources # The following macro will read the target libraries from the file 'target_libraries.cmake' ctkFunctionGetTargetLibraries(KIT_target_libraries) +if(TARGET DCMTK::dcmnet AND TARGET DCMTK::dcmjpeg) + if(DCMTK_LIBRARIES) + list(REMOVE_ITEM KIT_target_libraries ${DCMTK_LIBRARIES}) + endif() + list(APPEND KIT_target_libraries DCMTK::dcmnet DCMTK::dcmjpeg) +endif() + if(CTK_QT_VERSION VERSION_GREATER "4") list(APPEND KIT_target_libraries Qt5::Sql) endif()