diff --git a/Source/MediaStorageAndFileFormat/CMakeLists.txt b/Source/MediaStorageAndFileFormat/CMakeLists.txt index 7d1ca0550..51a3ff629 100644 --- a/Source/MediaStorageAndFileFormat/CMakeLists.txt +++ b/Source/MediaStorageAndFileFormat/CMakeLists.txt @@ -228,8 +228,9 @@ endif() if(GDCM_USE_SYSTEM_JSON) target_link_libraries(gdcmMSFF LINK_PRIVATE ${JSON_LIBRARIES}) endif() -if(APPLE) - target_link_libraries(gdcmMSFF iconv) +if(UNIX) + find_package(Iconv) + target_link_libraries(gdcmMSFF LINK_PRIVATE ${Iconv_LIBRARIES}) endif() # handling of static lib within shared is a mess: #target_link_libraries(gdcmMSFF gdcmrle)