Fix fmtlib including windows.h everywhere
This commit is contained in:
parent
52d583c4c1
commit
75c1f4ce01
|
@ -3,16 +3,9 @@
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <cstdarg>
|
#include <cstdarg>
|
||||||
|
|
||||||
#ifdef _WIN32
|
// Instead of defining FMT_HEADER_ONLY or building fmtlib
|
||||||
|
// we can just include all implementation code in Logger.cpp
|
||||||
#ifndef WIN32_LEAN_AND_MEAN
|
#include "fmt/src/format.cc"
|
||||||
#define WIN32_LEAN_AND_MEAN
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <windows.h>
|
|
||||||
#define ENABLE_VIRTUAL_TERMINAL_PROCESSING 0x0004
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace Feather::Log
|
namespace Feather::Log
|
||||||
{
|
{
|
||||||
|
@ -36,6 +29,18 @@ namespace Feather::Log
|
||||||
|
|
||||||
return *s_logger;
|
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
|
namespace
|
||||||
{
|
{
|
||||||
|
@ -60,6 +65,5 @@ namespace Feather::Log
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
static LoggingManager s_networkManager;
|
static LoggingManager s_loggingManager;
|
||||||
}
|
|
||||||
}
|
}
|
|
@ -1,8 +1,5 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <event2/event.h>
|
|
||||||
|
|
||||||
#define FMT_HEADER_ONLY
|
|
||||||
#include <fmt/core.h>
|
#include <fmt/core.h>
|
||||||
#include <fmt/color.h>
|
#include <fmt/color.h>
|
||||||
#include <ostream>
|
#include <ostream>
|
||||||
|
|
Loading…
Reference in New Issue