mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-11-27 07:30:33 +08:00
Merge branch 'main' into gh2859.wif
This commit is contained in:
commit
a5360aebcb
@ -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
|
||||
|
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user