Skip to content

Commit 36100cc

Browse files
committed
fix: fix switch compilation with fatal warnings
1 parent 7d928b2 commit 36100cc

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tools/dependencies/meson.build

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,20 @@ if build_application
297297
}
298298
endif
299299

300+
## the switch sdl2 packages are not findable with '--fatal-meson-warnings' and cmake, so prefind it and than override the dependency
301+
if (meson.is_cross_build() and host_machine.system() == 'switch')
302+
sdl2_ttf_switch_dep = dependency(
303+
'sdl2_ttf',
304+
'SDL2_ttf',
305+
method: 'pkg-config',
306+
allow_fallback: not only_allow_native_libs,
307+
required: true,
308+
)
309+
310+
meson.override_dependency('sdl2_ttf', sdl2_ttf_switch_dep)
311+
312+
endif
313+
300314
sdl2_ttf_dep = dependency(
301315
'sdl2_ttf',
302316
'SDL2_ttf',

0 commit comments

Comments
 (0)