Skip to content

Commit 808803c

Browse files
committed
Add namespace for CMake targets
The usual convention with modern CMake is to namespace the targets. This gives the netCDF namespace to the package.
1 parent adf2f4d commit 808803c

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2043,6 +2043,7 @@ set(ConfigPackageLocation ${CMAKE_INSTALL_LIBDIR}/cmake/netCDF)
20432043
install(EXPORT netCDFTargets
20442044
DESTINATION ${ConfigPackageLocation}
20452045
COMPONENT headers
2046+
NAMESPACE netCDF::
20462047
)
20472048

20482049
include(CMakePackageConfigHelpers)
@@ -2063,6 +2064,7 @@ INSTALL(
20632064
COMPONENT headers
20642065
)
20652066

2067+
add_library(netCDF::netcdf ALIAS netcdf)
20662068
target_include_directories(netcdf
20672069
PUBLIC
20682070
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>

0 commit comments

Comments
 (0)