Skip to content

Commit 51adc5f

Browse files
Levi-Armstrongjbeder
authored andcommitted
Update yaml-cpp-config.cmake.in
1 parent 30e6933 commit 51adc5f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

yaml-cpp-config.cmake.in

+6-6
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ include("${CMAKE_CURRENT_LIST_DIR}/yaml-cpp-targets.cmake")
1919
# These are IMPORTED targets created by yaml-cpp-targets.cmake
2020
set(YAML_CPP_LIBRARIES "@EXPORT_TARGETS@")
2121

22+
# Protect against multiple inclusion, which would fail when already imported targets are added once more.
2223
if(NOT TARGET yaml-cpp)
2324
add_library(yaml-cpp INTERFACE IMPORTED)
2425
target_link_libraries(yaml-cpp INTERFACE yaml-cpp::yaml-cpp)
25-
endif()
26-
27-
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.17)
28-
set_target_properties(yaml-cpp PROPERTIES
29-
DEPRECATION "The target yaml-cpp is deprecated and will be removed in version 0.10.0. Use the yaml-cpp::yaml-cpp target instead."
30-
)
26+
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.17)
27+
set_target_properties(yaml-cpp PROPERTIES
28+
DEPRECATION "The target yaml-cpp is deprecated and will be removed in version 0.10.0. Use the yaml-cpp::yaml-cpp target instead."
29+
)
30+
endif()
3131
endif()
3232

3333
check_required_components(yaml-cpp)

0 commit comments

Comments
 (0)