1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-07 06:15:34 +00:00

Fix build on Windows

When rearranging the code some features of Windows.h start to interfere
with other code. For example this happens when adding more precompiled
headers.
This commit is contained in:
elsid 2022-06-28 15:59:23 +02:00
parent d991b63861
commit 5ad2ae04ce
No known key found for this signature in database
GPG key ID: 4DE04C198CBA7625
4 changed files with 12 additions and 5 deletions

View file

@ -346,7 +346,12 @@ if (WIN32)
add_definitions(-DSDL_MAIN_HANDLED)
# Get rid of useless crud from windows.h
add_definitions(-DNOMINMAX -DWIN32_LEAN_AND_MEAN)
add_definitions(
-DNOMINMAX # name conflict with std::min, std::max
-DWIN32_LEAN_AND_MEAN
-DNOMB # name conflict with MWGui::MessageBox
-DNOGDI # name conflict with osgAnimation::MorphGeometry::RELATIVE
)
endif()
if(OPENMW_USE_SYSTEM_BULLET)

View file

@ -13,8 +13,6 @@
#include "../mwbase/inputmanager.hpp"
#include "../mwbase/windowmanager.hpp"
#undef MessageBox
namespace MWGui
{

View file

@ -3,8 +3,6 @@
#include "windowbase.hpp"
#undef MessageBox
namespace MyGUI
{
class Widget;

View file

@ -4,10 +4,16 @@
#include <cstring>
#define FAR
#define NEAR
#include <shlobj.h>
#include <shlwapi.h>
#include <winreg.h>
#undef NEAR
#undef FAR
#include <boost/locale.hpp>
namespace bconv = boost::locale::conv;