From 3a7bc8f9574077d8029b236de74d1ada7e64cf92 Mon Sep 17 00:00:00 2001 From: Harshula Jayasuriya Date: Wed, 18 Sep 2024 23:40:25 +1000 Subject: [PATCH] CMakeLists.txt: Set LIBS --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ce456815b..28064ec51 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -473,7 +473,11 @@ set(FCFLAGS "${CMAKE_Fortran_FLAGS} ${CMAKE_Fortran_FLAGS_${CMAKE_BUILD_TYPE}}") set(LDFLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${CMAKE_SHARED_LINKER_FLAGS_${CMAKE_BUILD_TYPE}}") set(VERSION ${PROJECT_VERSION}) -#set(LIBS ?) +# TODO: Find static libraries that FMS depends on. +if(NOT ${NetCDF_Fortran_LIBRARY_SHARED}) + # autotools: Libs.private: -lnetcdff -lnetcdf + set(LIBS ${NetCDF_Fortran_LIBRARIES}) +endif() configure_file(${CMAKE_CURRENT_SOURCE_DIR}/FMS.pc.in ${CMAKE_CURRENT_BINARY_DIR}/FMS.pc @ONLY)