From 592ff603ca8985c4c3b565e5b126a8b0d5ddbc92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Wed, 14 Jun 2023 17:36:24 +0800 Subject: [PATCH] CMake: don't install yyjson Fix #474 --- CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c711b8b7c..9213817a0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.14.0) # target_link_libraries with OBJECT libs & project homepage url & FetchContent +cmake_minimum_required(VERSION 3.12.0) # target_link_libraries with OBJECT libs & project homepage url & FetchContent project(fastfetch VERSION 1.11.3 @@ -46,7 +46,11 @@ FetchContent_Declare( GIT_REPOSITORY https://github.com/ibireme/yyjson GIT_TAG 0.7.0 ) -FetchContent_MakeAvailable(yyjson) +FetchContent_GetProperties(yyjson) +if(NOT yyjson_POPULATED) + FetchContent_Populate(yyjson) + add_subdirectory(${yyjson_SOURCE_DIR} ${yyjson_BINARY_DIR} EXCLUDE_FROM_ALL) +endif() ##################### # Configure options #