Fix fmtlib including windows.h everywhere

This commit is contained in:
DankParrot 2020-08-22 16:40:09 -07:00
parent 52d583c4c1
commit 75c1f4ce01
2 changed files with 37 additions and 36 deletions

View File

@ -3,16 +3,9 @@
#include <cstdio>
#include <cstdarg>
#ifdef _WIN32
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h>
#define ENABLE_VIRTUAL_TERMINAL_PROCESSING 0x0004
#endif
// Instead of defining FMT_HEADER_ONLY or building fmtlib
// we can just include all implementation code in Logger.cpp
#include "fmt/src/format.cc"
namespace Feather::Log
{
@ -36,6 +29,18 @@ namespace Feather::Log
return *s_logger;
}
}
#ifdef _WIN32
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h>
#define ENABLE_VIRTUAL_TERMINAL_PROCESSING 0x0004
#endif
namespace
{
@ -60,6 +65,5 @@ namespace Feather::Log
}
};
static LoggingManager s_networkManager;
}
static LoggingManager s_loggingManager;
}

View File

@ -1,8 +1,5 @@
#pragma once
#include <event2/event.h>
#define FMT_HEADER_ONLY
#include <fmt/core.h>
#include <fmt/color.h>
#include <ostream>