From b38ac5b55f5b64cffce71eac9433e553b3898bd1 Mon Sep 17 00:00:00 2001 From: Cristian Le Date: Wed, 21 Aug 2024 09:46:53 +0200 Subject: [PATCH] Use FetchContent_MakeAvailable --- README.md | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/README.md b/README.md index a121b700c..1dc452d57 100644 --- a/README.md +++ b/README.md @@ -61,13 +61,7 @@ FetchContent_Declare( GIT_REPOSITORY https://github.com/jbeder/yaml-cpp.git GIT_TAG # Can be a tag (yaml-cpp-x.x.x), a commit hash, or a branch name (master) ) -FetchContent_GetProperties(yaml-cpp) - -if(NOT yaml-cpp_POPULATED) - message(STATUS "Fetching yaml-cpp...") - FetchContent_Populate(yaml-cpp) - add_subdirectory(${yaml-cpp_SOURCE_DIR} ${yaml-cpp_BINARY_DIR}) -endif() +FetchContent_MakeAvailable(yaml-cpp) target_link_libraries(YOUR_LIBRARY PUBLIC yaml-cpp::yaml-cpp) # The library or executable that require yaml-cpp library ```