From fbe7b4b50c0038d4efaac27a556b524a1c272e9f Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Wed, 23 Aug 2023 08:47:27 -0600 Subject: [PATCH] FindNetCDF.cmake: always remove duplicates from NetCDF_LIBRARIES, not just for shared libraries --- Modules/FindNetCDF.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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)