diff --git a/components/CMakeLists.txt b/components/CMakeLists.txt index 32482ec331..628a97265a 100644 --- a/components/CMakeLists.txt +++ b/components/CMakeLists.txt @@ -520,10 +520,15 @@ target_link_libraries(components SQLite::SQLite3 smhasher ${ICU_LIBRARIES} - yaml-cpp ZLIB::ZLIB ) +if(yaml-cpp_VERSION VERSION_GREATER_EQUAL 0.8.0) + target_link_libraries(components yaml-cpp::yaml-cpp) +else() + target_link_libraries(components yaml-cpp) +endif() + if(Boost_VERSION_STRING VERSION_GREATER_EQUAL 1.77.0) target_link_libraries(components ${Boost_ATOMIC_LIBRARY}) endif()