From 6c784abd5de0a470fa3b05f9e7596b05c6ae1dcb Mon Sep 17 00:00:00 2001 From: TennesseeTrash Date: Sun, 8 Jun 2025 18:29:41 +0200 Subject: [PATCH] Make sure FetchContent targets are replaceable --- CMake/ctre.cmake | 20 +++++++++++--------- CMake/pugixml.cmake | 20 +++++++++++--------- 2 files changed, 22 insertions(+), 18 deletions(-) diff --git a/CMake/ctre.cmake b/CMake/ctre.cmake index 8cc43ce..6706f42 100644 --- a/CMake/ctre.cmake +++ b/CMake/ctre.cmake @@ -1,11 +1,13 @@ -include(FetchContent) +if(NOT TARGET pugixml) + include(FetchContent) -FetchContent_Declare( - ctre - GIT_REPOSITORY https://code.3011.io/Mirrors/compile-time-regular-expressions - GIT_TAG v3.10.0 -) + FetchContent_Declare( + ctre + GIT_REPOSITORY https://code.3011.io/Mirrors/compile-time-regular-expressions + GIT_TAG v3.10.0 + ) -FetchContent_MakeAvailable( - ctre -) + FetchContent_MakeAvailable( + ctre + ) +endif() diff --git a/CMake/pugixml.cmake b/CMake/pugixml.cmake index f7df319..fd5f750 100644 --- a/CMake/pugixml.cmake +++ b/CMake/pugixml.cmake @@ -1,11 +1,13 @@ -include(FetchContent) +if(NOT TARGET pugixml) + include(FetchContent) -FetchContent_Declare( - pugixml - GIT_REPOSITORY https://code.3011.io/Mirrors/pugixml - GIT_TAG v1.15 -) + FetchContent_Declare( + pugixml + GIT_REPOSITORY https://code.3011.io/Mirrors/pugixml + GIT_TAG v1.15 + ) -FetchContent_MakeAvailable( - pugixml -) + FetchContent_MakeAvailable( + pugixml + ) +endif()