From 9a8a0f425cc476bf9a03298a28e522ce38db3825 Mon Sep 17 00:00:00 2001 From: maxirmx Date: Fri, 30 Aug 2024 20:46:28 +0300 Subject: [PATCH] fix: OVERRIDE_FIND_PACKAGE for fmt and gtest (2) --- CMakeLists.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 81adc6ead..85c9f993b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -346,7 +346,9 @@ endif() if(PREFER_SYSTEM_LIBFMT) find_package(fmt 10 CONFIG) -else() +else(PREFER_SYSTEM_LIBFMT) + include_directories(${fmt_SOURCE_DIR}/include) + include(FetchContent) FetchContent_Declare( fmt @@ -355,8 +357,8 @@ else() OVERRIDE_FIND_PACKAGE ) FetchContent_MakeAvailable(fmt) - include_directories(${fmt_SOURCE_DIR}/include) -endif() + +endif(PREFER_SYSTEM_LIBFMT) find_package(Boost 1.67 REQUIRED COMPONENTS chrono iostreams program_options)