Skip to content

Commit

Permalink
CMakeLists.txt: Set LIBS when NetCDF is a static library
Browse files Browse the repository at this point in the history
  • Loading branch information
harshula committed Nov 28, 2024
1 parent 9580f63 commit cd681aa
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 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)
Expand Down

0 comments on commit cd681aa

Please sign in to comment.