Skip to content

Commit

Permalink
Update yaml-cpp-config.cmake.in
Browse files Browse the repository at this point in the history
  • Loading branch information
Levi-Armstrong authored and jbeder committed Nov 7, 2023
1 parent 30e6933 commit 51adc5f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions yaml-cpp-config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 51adc5f

Please sign in to comment.