File tree 1 file changed +6
-2
lines changed
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 68
68
f03
69
69
)
70
70
71
- set ( netCDF-Fortran_DEFINITIONS )
72
- set ( netCDF-Fortran_LIBRARY_DIR ${netCDF-Fortran_PREFIX}/lib )
73
71
foreach ( NF_QUERY ${netCDF-Fortran_QUERY_YES_OPTIONS} )
74
72
execute_process ( COMMAND ${NETCDF-FORTRAN_PROGRAM} --has-${NF_QUERY} OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE netCDF-Fortran_${NF_QUERY} _LOWERCASE )
75
73
string ( TOUPPER ${NF_QUERY} NF_QUERY_UPPERCASE )
@@ -78,6 +76,12 @@ else()
78
76
set ( netCDF-Fortran_HAS_${NF_QUERY_UPPERCASE} ${NF_ANSWER_UPPERCASE} )
79
77
endforeach ()
80
78
79
+
80
+ # A bug in previous netcdf-fortran cmake builds, extract from flibs
81
+ string ( REGEX MATCH "^-L([^ ]*)" netCDF-Fortran_LIBRARY_LINK_LOCATION ${netCDF-Fortran_FLIBS} )
82
+ set ( netCDF-Fortran_LIBRARY_DIR ${CMAKE_MATCH_1} )
83
+
84
+ set ( netCDF-Fortran_DEFINITIONS )
81
85
set ( netCDF-Fortran_LIBRARIES
82
86
$<$<LINK_LANGUAGE:Fortran>:${netCDF-Fortran_FLIBS}>
83
87
)
You can’t perform that action at this time.
0 commit comments