From 51adc5f7392648622c80909f65bf794fc48d013f Mon Sep 17 00:00:00 2001 From: Levi Armstrong Date: Mon, 6 Nov 2023 10:17:50 -0600 Subject: [PATCH] Update yaml-cpp-config.cmake.in --- yaml-cpp-config.cmake.in | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/yaml-cpp-config.cmake.in b/yaml-cpp-config.cmake.in index 7f16f7958..260ae00e0 100644 --- a/yaml-cpp-config.cmake.in +++ b/yaml-cpp-config.cmake.in @@ -19,15 +19,15 @@ 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@") +# Protect against multiple inclusion, which would fail when already imported targets are added once more. if(NOT TARGET yaml-cpp) add_library(yaml-cpp INTERFACE IMPORTED) target_link_libraries(yaml-cpp INTERFACE yaml-cpp::yaml-cpp) -endif() - -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." - ) + 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() endif() check_required_components(yaml-cpp)