mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-11-21 03:13:42 +08:00
Add namespace for CMake targets
The usual convention with modern CMake is to namespace the targets. This gives the netCDF namespace to the package.
This commit is contained in:
parent
adf2f4d098
commit
808803ceeb
@ -2043,6 +2043,7 @@ set(ConfigPackageLocation ${CMAKE_INSTALL_LIBDIR}/cmake/netCDF)
|
||||
install(EXPORT netCDFTargets
|
||||
DESTINATION ${ConfigPackageLocation}
|
||||
COMPONENT headers
|
||||
NAMESPACE netCDF::
|
||||
)
|
||||
|
||||
include(CMakePackageConfigHelpers)
|
||||
@ -2063,6 +2064,7 @@ INSTALL(
|
||||
COMPONENT headers
|
||||
)
|
||||
|
||||
add_library(netCDF::netcdf ALIAS netcdf)
|
||||
target_include_directories(netcdf
|
||||
PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
|
Loading…
Reference in New Issue
Block a user