Add namespace for the exported targets (#1196)

This matches the name for the ALIAS targets, and fixes #1025.
This commit is contained in:
Ryan 2023-06-28 10:37:09 -06:00 committed by GitHub
parent 0e6e28d1a3
commit b8882652fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -168,6 +168,7 @@ if (YAML_CPP_INSTALL)
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
FILES_MATCHING PATTERN "*.h")
install(EXPORT yaml-cpp-targets
NAMESPACE yaml-cpp::
DESTINATION "${CONFIG_EXPORT_DIR}")
install(FILES
"${PROJECT_BINARY_DIR}/yaml-cpp-config.cmake"