diff --git a/openVulkanoCpp/Math/ByteSize.hpp b/openVulkanoCpp/Math/ByteSize.hpp index c527f34..7c7731b 100644 --- a/openVulkanoCpp/Math/ByteSize.hpp +++ b/openVulkanoCpp/Math/ByteSize.hpp @@ -12,7 +12,14 @@ #include #include #include +#if __has_include("fmt/format.h") +#include +#elif __has_include("spdlog/fmt/fmt.h") #include +#else +#warning "Failed to find fmt include" +#define OVKMBS_FMT_MISSING +#endif #include namespace openVulkanoCpp @@ -154,6 +161,7 @@ namespace openVulkanoCpp inline constexpr ByteSize operator"" _EB(unsigned long long int num) { return { num, ByteSizeUnit::EB }; } } +#ifndef OVKMBS_FMT_MISSING template<> struct fmt::formatter { template constexpr auto parse(ParseContext& ctx) @@ -165,4 +173,5 @@ template<> struct fmt::formatter { return format_to(ctx.out(), "{}", bs.Format()); } -}; \ No newline at end of file +}; +#endif \ No newline at end of file