From 7ad6bbf206ead01aa52a1279f8a807fa6f734f22 Mon Sep 17 00:00:00 2001
From: NAUD Maxence <maxence.naud@cea.fr>
Date: Tue, 21 Jan 2025 11:04:56 +0000
Subject: [PATCH] ADD: fmt as private library

---
 CMakeLists.txt | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7a2b168..80c5ae7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -85,17 +85,6 @@ endif()
 
 # ##############################################
 # Find system dependencies
-Include(FetchContent)
-
-FetchContent_Declare(
-    fmt
-    GIT_REPOSITORY https://github.com/fmtlib/fmt.git
-    GIT_TAG        10.2.1 # or a later release
-)
-
-set(FMT_SYSTEM_HEADERS ON)
-FetchContent_MakeAvailable(fmt)
-set_property(TARGET fmt PROPERTY POSITION_INDEPENDENT_CODE ON)
 
 if(CUDA)
     find_package(CUDAToolkit REQUIRED)
@@ -169,7 +158,7 @@ if (PYBIND)
 endif()
 
 # XXX HERE !!!
-target_link_libraries(${module_name} PUBLIC fmt::fmt)
+target_link_libraries(${module_name} PRIVATE fmt::fmt)
 target_compile_features(${module_name} PRIVATE cxx_std_14)
 
 target_compile_options(${module_name} PRIVATE
-- 
GitLab