diff --git a/yaml-cpp-config.cmake.in b/yaml-cpp-config.cmake.in index b1e30b6..181ec28 100644 --- a/yaml-cpp-config.cmake.in +++ b/yaml-cpp-config.cmake.in @@ -19,4 +19,12 @@ include("${CMAKE_CURRENT_LIST_DIR}/yaml-cpp-targets.cmake") # These are IMPORTED targets created by yaml-cpp-targets.cmake set(YAML_CPP_LIBRARIES "@EXPORT_TARGETS@") +add_library(yaml-cpp INTERFACE) +target_link_libraries(yaml-cpp INTERFACE yaml-cpp::yaml-cpp) +if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.17) + set_target_properties(yaml-cpp PROPERTIES + DEPRECATION "The target yaml-cpp is deprecated and will be removed in version 0.10.0. Use the yaml-cpp::yaml-cpp target instead." + ) +endif() + check_required_components(yaml-cpp)