From 200d2ba08fad5f14d4e17ed001b651f63e098e5c Mon Sep 17 00:00:00 2001
From: Lionel GUEZ <guez@lmd.ens.fr>
Date: Wed, 3 Mar 2021 23:31:08 +0100
Subject: [PATCH] Ask cmake to display more information

---
 FindNetCDF.cmake         | 1 +
 FindNetCDF_Fortran.cmake | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/FindNetCDF.cmake b/FindNetCDF.cmake
index a294c503..9361710f 100644
--- a/FindNetCDF.cmake
+++ b/FindNetCDF.cmake
@@ -65,6 +65,7 @@ if (PkgConfig_FOUND)
   pkg_check_modules(_NetCDF QUIET netcdf IMPORTED_TARGET)
   if (_NetCDF_FOUND)
     unset(netCDF_DIR CACHE)
+    message(STATUS "-- NetCDF libraries: ${_NetCDF_LINK_LIBRARIES}")
     # Forward the variables in a consistent way.
     set(NetCDF_FOUND "${_NetCDF_FOUND}")
     set(NetCDF_INCLUDE_DIRS "${_NetCDF_INCLUDE_DIRS}")
diff --git a/FindNetCDF_Fortran.cmake b/FindNetCDF_Fortran.cmake
index a7c728ff..92264e11 100644
--- a/FindNetCDF_Fortran.cmake
+++ b/FindNetCDF_Fortran.cmake
@@ -4,7 +4,7 @@ pkg_check_modules(NetCDF_Fortran REQUIRED IMPORTED_TARGET netcdf-fortran)
 message(STATUS
   "-- NetCDF-Fortran include flags: ${NetCDF_Fortran_INCLUDE_DIRS}")
 
-message(STATUS "-- NetCDF-Fortran libraries: ${NetCDF_Fortran_LIBRARIES}")
+message(STATUS "-- NetCDF-Fortran libraries: ${NetCDF_Fortran_LINK_LIBRARIES}")
 
 if(PKG_CONFIG_VERSION_STRING VERSION_LESS "0.29.2")
   # pkg-config strips system flags out of cflags. They do not appear
-- 
GitLab