Merge branch 'main' into gh2859.wif

This commit is contained in:
Ward Fisher 2024-02-06 11:33:23 -07:00
commit a5360aebcb
2 changed files with 9 additions and 20 deletions

View File

@ -1849,23 +1849,14 @@ install(EXPORT netCDFTargets
NAMESPACE netCDF::
)
export(EXPORT netCDFTargets FILE netCDFTargets.cmake NAMESPACE netCDF::)
include(CMakePackageConfigHelpers)
CONFIGURE_PACKAGE_CONFIG_file(
configure_package_config_file(
"${CMAKE_CURRENT_SOURCE_DIR}/netCDFConfig.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/netCDFConfig.cmake"
INSTALL_DESTINATION "${ConfigPackageLocation}"
NO_CHECK_REQUIRED_COMPONENTS_MACRO
PATH_VARS
CMAKE_INSTALL_PREFIX
CMAKE_INSTALL_INCLUDEDIR
CMAKE_INSTALL_LIBDIR
)
install(
FILES "${CMAKE_CURRENT_BINARY_DIR}/netCDFConfig.cmake"
DESTINATION "${ConfigPackageLocation}"
COMPONENT headers
)
)
add_library(netCDF::netcdf ALIAS netcdf)
target_include_directories(netcdf
@ -1876,17 +1867,18 @@ target_include_directories(netcdf
# Create export configuration
write_basic_package_version_file(
"${CMAKE_CURRENT_BINARY_DIR}/netCDF/netCDFConfigVersion.cmake"
netCDFConfigVersion.cmake
VERSION ${netCDF_VERSION}
COMPATIBILITY SameMajorVersion
)
)
install(
FILES
"${CMAKE_CURRENT_BINARY_DIR}/netCDF/netCDFConfigVersion.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/netCDFConfig.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/netCDFConfigVersion.cmake"
DESTINATION ${ConfigPackageLocation}
COMPONENT headers
)
)
####
# End export files

View File

@ -5,9 +5,6 @@
@PACKAGE_INIT@
set(NetCDFVersion "@PACKAGE_VERSION@")
set_and_check(netCDF_INSTALL_PREFIX "@PACKAGE_CMAKE_INSTALL_PREFIX@")
set_and_check(netCDF_INCLUDE_DIR "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@")
set_and_check(netCDF_LIB_DIR "@PACKAGE_CMAKE_INSTALL_LIBDIR@")
set(netCDF_LIBRARIES netCDF::netcdf)