File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -88,4 +88,26 @@ set (NETCDF_LIBRARIES ${NetCDF_libs} CACHE INTERNAL "All NetCDF libraries requir
8888include (FindPackageHandleStandardArgs)
8989find_package_handle_standard_args (NetCDF DEFAULT_MSG NETCDF_LIBRARIES NETCDF_INCLUDES NetCDF_has_interfaces)
9090
91+ if (NETCDF_FOUND AND NOT TARGET netCDF::netcdf)
92+ add_library (netCDF::netcdf UNKNOWN IMPORTED )
93+ set_target_properties (
94+ netCDF::netcdf
95+ PROPERTIES
96+ IMPORTED_LOCATION "${NETCDF_LIBRARIES_C} "
97+ IMPORTED_LINK_INTERFACE_LANGUAGES C
98+ INTERFACE_INCLUDE_DIRECTORIES "${NETCDF_INCLUDES} "
99+ )
100+ endif ()
101+ if (NETCDF_FOUND AND NOT TARGET netCDF::netcdff)
102+ add_library (netCDF::netcdff UNKNOWN IMPORTED )
103+ set_target_properties (
104+ netCDF::netcdff
105+ PROPERTIES
106+ IMPORTED_LOCATION "${NETCDF_LIBRARIES_F90} "
107+ IMPORTED_LINK_INTERFACE_LANGUAGES Fortran
108+ INTERFACE_INCLUDE_DIRECTORIES "${NETCDF_MODULES} "
109+ )
110+ target_link_libraries (netCDF::netcdff INTERFACE netCDF::netcdf)
111+ endif ()
112+
91113mark_as_advanced (NETCDF_LIBRARIES NETCDF_INCLUDES)
You can’t perform that action at this time.
0 commit comments