Skip to content

Commit 7264bd1

Browse files
Totto16mgerhold
authored andcommitted
desperate last try to get mingw working
1 parent 8d6265c commit 7264bd1

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

meson.build

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ elif cpp.get_id() == 'gcc'
3232
'-Wno-complain-wrong-lang',
3333
language: 'cpp',
3434
)
35+
36+
add_global_arguments('-Wno-shadow', language: 'cpp')
3537
endif
3638

3739
elif cpp.get_id() == 'clang'
@@ -42,7 +44,24 @@ endif
4244

4345
deps = []
4446

45-
deps += dependency('sdl2', 'SDL2', required: true, fallback: 'sdl2')
47+
if cpp.get_id() == 'gcc' and host_machine.system() == 'windows'
48+
deps += dependency(
49+
'sdl2',
50+
'SDL2',
51+
required: true,
52+
fallback: 'sdl2',
53+
default_options: [
54+
'buildtype=release',
55+
'optimization=3',
56+
'strip=true',
57+
'b_ndebug=if-release',
58+
'cpp_args=-Wno-shadow',
59+
],
60+
)
61+
else
62+
deps += dependency('sdl2', 'SDL2', required: true, fallback: 'sdl2')
63+
endif
64+
4665
deps += dependency('sdl2_ttf', 'SDL2_ttf', required: true, fallback: 'sdl2_ttf')
4766
deps += dependency('spdlog', required: true, fallback: 'spdlog')
4867
deps += dependency('nlohmann_json', required: true, fallback: 'nlohmann_json')
@@ -62,6 +81,9 @@ executable(
6281
src_files,
6382
include_directories: inc_dirs,
6483
dependencies: deps,
84+
cpp_args: [
85+
86+
],
6587
override_options: [
6688
'warning_level=3',
6789
'werror=true',

0 commit comments

Comments
 (0)