Add include directories as netcdf property
Modern CMake tracks the properties of targets so that down stream
libraries do not have to worry about include directories.  However, the
include directories must be added to the target and not just at the
directory level.
@@ -2063,6 +2063,12 @@ INSTALL(
COMPONENT headers
)
+target_include_directories(netcdf
+ PUBLIC
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
+ $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
+)
+
# Create export configuration
write_basic_package_version_file(
"${CMAKE_CURRENT_BINARY_DIR}/netCDF/netCDFConfigVersion.cmake"
