Add export(EXPORT ...) to allow the build directory to be used directly by another project. Also necessary to allow FetchContent to work. Might help with #97
Change CMAKE_SOURCE_DIR to CMAKE_CURRENT_SOURCE_DIR, necessary for building from another project
Add the alias netCDF::netcdf-cxx4, which makes find_package/add_subdirectory both expose the same target name
export(EXPORT ...)
to allow the build directory to be used directly by another project. Also necessary to allowFetchContent
to work. Might help with #97CMAKE_SOURCE_DIR
toCMAKE_CURRENT_SOURCE_DIR
, necessary for building from another projectnetCDF::netcdf-cxx4
, which makesfind_package
/add_subdirectory
both expose the same target name