File tree 1 file changed +6
-6
lines changed
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -19,15 +19,15 @@ include("${CMAKE_CURRENT_LIST_DIR}/yaml-cpp-targets.cmake")
19
19
# These are IMPORTED targets created by yaml-cpp-targets.cmake
20
20
set (YAML_CPP_LIBRARIES "@EXPORT_TARGETS@" )
21
21
22
+ # Protect against multiple inclusion, which would fail when already imported targets are added once more.
22
23
if (NOT TARGET yaml-cpp)
23
24
add_library (yaml-cpp INTERFACE IMPORTED )
24
25
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 ()
31
31
endif ()
32
32
33
33
check_required_components(yaml-cpp)
You can’t perform that action at this time.
0 commit comments