Skip to content

Commit f17e73e

Browse files
committed
Move Windows.h defines to the build system
1 parent 65b615d commit f17e73e

File tree

2 files changed

+41
-40
lines changed

2 files changed

+41
-40
lines changed

Source/System/StandardIncludes.h

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -4,45 +4,6 @@
44
#define _HAS_AUTO_PTR_ETC 1
55
#define _LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR
66

7-
// Disable a bunch of unneeded crap in WinAPI (on top of WIN32_LEAN_AND_MEAN)
8-
#ifdef _WIN32
9-
#define NOMINMAX
10-
#define NOGDI
11-
#define NOKERNEL
12-
#define NONLS
13-
#define NOMEMMGR
14-
#define NOGDICAPMASKS
15-
#define NOVIRTUALKEYCODES
16-
#define NOWINMESSAGES
17-
#define NOWINSTYLES
18-
#define NOMETAFILE
19-
#define NOSCROLL
20-
#define NOTEXTMETRIC
21-
#define NOCOMM
22-
#define NOKANJI
23-
#define NOHELP
24-
#define NOPROFILER
25-
#define NODEFERWINDOWPOS
26-
#define NOMCX
27-
#define NOMENUS
28-
#define NOICONS
29-
#define NOKEYSTATES
30-
#define NOSYSCOMMANDS
31-
#define NORASTEROPS
32-
#define NOSHOWWINDOW
33-
#define OEMRESOURCE
34-
#define NOATOM
35-
#define NODRAWTEXT
36-
#define NOCOLOR
37-
#define NOCTLMGR
38-
#define NOMSG
39-
#define NOOPENFILE
40-
#define NOSERVICE
41-
#define NOSOUND
42-
#define NOWH
43-
#define NOWINOFFSETS
44-
#endif
45-
467
// Inclusion of relevant C++ Standard Library headers.
478
#include <cstdlib>
489
#include <cstdarg>

meson.build

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,47 @@ elif compiler.get_argument_syntax()== 'msvc'
7878
if host_machine.cpu_family() == 'x86'
7979
elfname += ' x86'
8080
endif
81-
preprocessor_flags += ['-D_CRT_SECURE_NO_DEPRECATE', '-D_WINDOWS', '-DWIN32', '-DWIN32_LEAN_AND_MEAN']
81+
preprocessor_flags += [
82+
'-D_CRT_SECURE_NO_DEPRECATE',
83+
'-D_WINDOWS',
84+
'-DWIN32',
85+
'-DWIN32_LEAN_AND_MEAN',
86+
'-DNOMINMAX',
87+
'-DNOGDI',
88+
'-DNOKERNEL',
89+
'-DNONLS',
90+
'-DNOMEMMGR',
91+
'-DNOGDICAPMASKS',
92+
'-DNOVIRTUALKEYCODES',
93+
'-DNOWINMESSAGES',
94+
'-DNOWINSTYLES',
95+
'-DNOMETAFILE',
96+
'-DNOSCROLL',
97+
'-DNOTEXTMETRIC',
98+
'-DNOCOMM',
99+
'-DNOKANJI',
100+
'-DNOHELP',
101+
'-DNOPROFILER',
102+
'-DNODEFERWINDOWPOS',
103+
'-DNOMCX',
104+
'-DNOMENUS',
105+
'-DNOICONS',
106+
'-DNOKEYSTATES',
107+
'-DNOSYSCOMMANDS',
108+
'-DNORASTEROPS',
109+
'-DNOSHOWWINDOW',
110+
'-DOEMRESOURCE',
111+
'-DNOATOM',
112+
'-DNODRAWTEXT',
113+
'-DNOCOLOR',
114+
'-DNOCTLMGR',
115+
'-DNOMSG',
116+
'-DNOOPENFILE',
117+
'-DNOSERVICE',
118+
'-DNOSOUND',
119+
'-DNOWH',
120+
'-DNOWINOFFSETS'
121+
]
82122
link_args+=['-ignore:4099', '-ignore:4217']
83123
buildtype_debug = get_option('debug')
84124
if buildtype_debug

0 commit comments

Comments
 (0)