diff --git a/CMakeLists.txt b/CMakeLists.txt index 4c8357b64..aed1a0af8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -475,7 +475,15 @@ 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: If FMS depends on a library that is built as a static library, it +# should be listed here as an ldflag. +set(LIBS "") + +if(NOT ${NetCDF_Fortran_LIBRARY_SHARED}) + # autotools: Libs.private: -lnetcdff -lnetcdf + string(APPEND LIBS ${NetCDF_Fortran_LIBRARIES}) +endif() configure_file(${CMAKE_CURRENT_SOURCE_DIR}/FMS.pc.in ${CMAKE_CURRENT_BINARY_DIR}/FMS.pc @ONLY)