File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ set (CPRNC_Fortran_MODS ${CMAKE_CURRENT_BINARY_DIR}/compare_vars_mod.mod
2626
2727set (CMAKE_POSITION_INDEPENDENT_CODE ON )
2828set (CMAKE_MACOSX_RPATH 1)
29+ SET (CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE )
2930
3031# Compiler-specific compile options
3132if ("${CMAKE_Fortran_COMPILER_ID} " STREQUAL "GNU" )
@@ -81,6 +82,7 @@ find_library(netcdf_fortran_lib netcdff HINTS ${NetCDF_Fortran_ROOT})
8182#message (STATUS "netcdf_fortran_lib == ${netcdf_fortran_lib}")
8283get_filename_component (netcdf_fortran_lib_location ${netcdf_fortran_lib} DIRECTORY )
8384#message (STATUS "netcdf_fortran_lib_location == ${netcdf_fortran_lib_location}")
85+ SET (CMAKE_INSTALL_RPATH "${netcdf_fortran_lib_location} ;${netcdf_c_lib_location} " )
8486
8587find_library (netcdf_c_lib netcdf HINTS ${NetCDF_C_LIBRARY} )
8688#message (STATUS "netcdf_c_lib == ${netcdf_c_lib}")
You can’t perform that action at this time.
0 commit comments