File tree Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Original file line number Diff line number Diff 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
3739elif cpp.get_id() == ' clang'
4244
4345deps = []
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+
4665deps += dependency (' sdl2_ttf' , ' SDL2_ttf' , required : true , fallback : ' sdl2_ttf' )
4766deps += dependency (' spdlog' , required : true , fallback : ' spdlog' )
4867deps += 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' ,
You can’t perform that action at this time.
0 commit comments