diff --git a/Modules/FindNetCDF.cmake b/Modules/FindNetCDF.cmake index f6a9098..a15516f 100644 --- a/Modules/FindNetCDF.cmake +++ b/Modules/FindNetCDF.cmake @@ -273,7 +273,8 @@ foreach( _comp IN LISTS _search_components ) endif() endif() endforeach() -if(NetCDF_LIBRARIES AND NetCDF_${_comp}_LIBRARY_SHARED) +#if(NetCDF_LIBRARIES AND NetCDF_${_comp}_LIBRARY_SHARED) +if(NetCDF_LIBRARIES) list(REMOVE_DUPLICATES NetCDF_LIBRARIES) endif() set(NetCDF_LIBRARIES "${NetCDF_LIBRARIES}" CACHE STRING "NetCDF library targets" FORCE)