mirror of
https://github.com/OpenMW/openmw.git
synced 2025-05-01 10:41:23 +00:00
Merge branch 'fix_windows_build' into 'master'
Fix build on Windows See merge request OpenMW/openmw!1796
This commit is contained in:
commit
c930aabf17
11 changed files with 20 additions and 30 deletions
|
@ -15,7 +15,7 @@
|
||||||
#include "model/world/data.hpp"
|
#include "model/world/data.hpp"
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include <Windows.h>
|
#include <components/windows.hpp>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
using namespace Fallback;
|
using namespace Fallback;
|
||||||
|
|
|
@ -9,10 +9,7 @@
|
||||||
#include "options.hpp"
|
#include "options.hpp"
|
||||||
|
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
#ifndef WIN32_LEAN_AND_MEAN
|
#include <components/windows.hpp>
|
||||||
#define WIN32_LEAN_AND_MEAN
|
|
||||||
#endif
|
|
||||||
#include <windows.h>
|
|
||||||
// makes __argc and __argv available on windows
|
// makes __argc and __argv available on windows
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -3,10 +3,7 @@
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#undef WIN32_LEAN_AND_MEAN
|
#include <components/windows.hpp>
|
||||||
#define WIN32_LEAN_AND_MEAN
|
|
||||||
#include <Windows.h>
|
|
||||||
|
|
||||||
#include <components/crashcatcher/crashcatcher.hpp>
|
#include <components/crashcatcher/crashcatcher.hpp>
|
||||||
|
|
||||||
namespace Crash
|
namespace Crash
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
#include "windows_crashmonitor.hpp"
|
#include "windows_crashmonitor.hpp"
|
||||||
|
|
||||||
#undef WIN32_LEAN_AND_MEAN
|
#include <components/windows.hpp>
|
||||||
#define WIN32_LEAN_AND_MEAN
|
|
||||||
#include <Windows.h>
|
|
||||||
#include <Psapi.h>
|
#include <Psapi.h>
|
||||||
|
|
||||||
#include <DbgHelp.h>
|
#include <DbgHelp.h>
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
#ifndef WINDOWS_CRASHMONITOR_HPP
|
#ifndef WINDOWS_CRASHMONITOR_HPP
|
||||||
#define WINDOWS_CRASHMONITOR_HPP
|
#define WINDOWS_CRASHMONITOR_HPP
|
||||||
|
|
||||||
#undef WIN32_LEAN_AND_MEAN
|
#include <components/windows.hpp>
|
||||||
#define WIN32_LEAN_AND_MEAN
|
|
||||||
#include <Windows.h>
|
|
||||||
|
|
||||||
#include <atomic>
|
#include <atomic>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
#ifndef WINDOWS_CRASHSHM_HPP
|
#ifndef WINDOWS_CRASHSHM_HPP
|
||||||
#define WINDOWS_CRASHSHM_HPP
|
#define WINDOWS_CRASHSHM_HPP
|
||||||
|
|
||||||
#undef WIN32_LEAN_AND_MEAN
|
#include <components/windows.hpp>
|
||||||
#define WIN32_LEAN_AND_MEAN
|
|
||||||
#include <Windows.h>
|
|
||||||
|
|
||||||
namespace Crash
|
namespace Crash
|
||||||
{
|
{
|
||||||
|
|
|
@ -8,9 +8,7 @@
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include <components/crashcatcher/windows_crashcatcher.hpp>
|
#include <components/crashcatcher/windows_crashcatcher.hpp>
|
||||||
# undef WIN32_LEAN_AND_MEAN
|
#include <components/windows.hpp>
|
||||||
# define WIN32_LEAN_AND_MEAN
|
|
||||||
# include <windows.h>
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace Debug
|
namespace Debug
|
||||||
|
|
|
@ -12,9 +12,7 @@
|
||||||
#include "debuglog.hpp"
|
#include "debuglog.hpp"
|
||||||
|
|
||||||
#if defined _WIN32 && defined _DEBUG
|
#if defined _WIN32 && defined _DEBUG
|
||||||
# undef WIN32_LEAN_AND_MEAN
|
#include <components/windows.hpp>
|
||||||
# define WIN32_LEAN_AND_MEAN
|
|
||||||
# include <windows.h>
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace Debug
|
namespace Debug
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#elif FILE_API == FILE_API_POSIX
|
#elif FILE_API == FILE_API_POSIX
|
||||||
#elif FILE_API == FILE_API_WIN32
|
#elif FILE_API == FILE_API_WIN32
|
||||||
#include <windows.h>
|
#include <components/windows.hpp>
|
||||||
#else
|
#else
|
||||||
#error Unsupported File API
|
#error Unsupported File API
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -25,10 +25,7 @@ namespace Misc
|
||||||
|
|
||||||
#elif defined(WIN32)
|
#elif defined(WIN32)
|
||||||
|
|
||||||
#undef WIN32_LEAN_AND_MEAN
|
#include <components/windows.hpp>
|
||||||
#define WIN32_LEAN_AND_MEAN
|
|
||||||
|
|
||||||
#include <windows.h>
|
|
||||||
|
|
||||||
namespace Misc
|
namespace Misc
|
||||||
{
|
{
|
||||||
|
|
9
components/windows.hpp
Normal file
9
components/windows.hpp
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
#ifndef OPENMW_COMPONENTS_WINDOWS_H
|
||||||
|
#define OPENMW_COMPONENTS_WINDOWS_H
|
||||||
|
|
||||||
|
#include <Windows.h>
|
||||||
|
|
||||||
|
#undef far
|
||||||
|
#undef near
|
||||||
|
|
||||||
|
#endif
|
Loading…
Reference in a new issue