Skip to content

Commit f987954

Browse files
Totto16mgerhold
authored andcommitted
next mingw try
1 parent 7264bd1 commit f987954

File tree

1 file changed

+4
-23
lines changed

1 file changed

+4
-23
lines changed

meson.build

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ if meson.version().version_compare('<0.60.0')
1616
)
1717
endif
1818

19+
compile_args = []
1920

2021
cpp = meson.get_compiler('cpp')
2122
if cpp.get_id() == 'msvc'
@@ -27,13 +28,12 @@ elif cpp.get_id() == 'gcc'
2728
)
2829

2930
if host_machine.system() == 'windows'
31+
compile_args += ['-Wno-shadow']
3032
add_project_arguments(
3133
'-Wno-shadow',
3234
'-Wno-complain-wrong-lang',
3335
language: 'cpp',
3436
)
35-
36-
add_global_arguments('-Wno-shadow', language: 'cpp')
3737
endif
3838

3939
elif cpp.get_id() == 'clang'
@@ -44,24 +44,7 @@ endif
4444

4545
deps = []
4646

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-
47+
deps += dependency('sdl2', 'SDL2', required: true, fallback: 'sdl2')
6548
deps += dependency('sdl2_ttf', 'SDL2_ttf', required: true, fallback: 'sdl2_ttf')
6649
deps += dependency('spdlog', required: true, fallback: 'spdlog')
6750
deps += dependency('nlohmann_json', required: true, fallback: 'nlohmann_json')
@@ -81,9 +64,7 @@ executable(
8164
src_files,
8265
include_directories: inc_dirs,
8366
dependencies: deps,
84-
cpp_args: [
85-
86-
],
67+
cpp_args: compile_args,
8768
override_options: [
8869
'warning_level=3',
8970
'werror=true',

0 commit comments

Comments
 (0)