try using the following; in this order, the #define statement must come first.
#define FMT_HEADER_ONLY
<fmt/format.h>