We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent db03655 commit 30e6933Copy full SHA for 30e6933
yaml-cpp-config.cmake.in
@@ -19,8 +19,11 @@ include("${CMAKE_CURRENT_LIST_DIR}/yaml-cpp-targets.cmake")
19
# These are IMPORTED targets created by yaml-cpp-targets.cmake
20
set(YAML_CPP_LIBRARIES "@EXPORT_TARGETS@")
21
22
-add_library(yaml-cpp INTERFACE IMPORTED)
23
-target_link_libraries(yaml-cpp INTERFACE yaml-cpp::yaml-cpp)
+if(NOT TARGET yaml-cpp)
+ add_library(yaml-cpp INTERFACE IMPORTED)
24
+ 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."
0 commit comments