diff --git a/include/aidge/utils/TensorUtils.hpp b/include/aidge/utils/TensorUtils.hpp
index a62850c7342836494b29405acea5b74aaae7d2e0..0ed0da97cbc81fcdb607f74c28c320d2c259195d 100644
--- a/include/aidge/utils/TensorUtils.hpp
+++ b/include/aidge/utils/TensorUtils.hpp
@@ -13,7 +13,12 @@
 #define AIDGE_CORE_UTILS_TENSOR_UTILS_H_
 #include "aidge/data/Tensor.hpp"
 #include <cmath> // std::abs
-#include <fmt/base.h>
+
+#if FMT_VERSION < 100000  // If fmt version is less than 10.0.0
+    #include <fmt/core.h>
+#else
+    #include <fmt/base.h>
+#endif
 
 namespace Aidge {