From 5b360a0d9ac6a3552586a137d8504f15c111783a Mon Sep 17 00:00:00 2001 From: Ryan Pessa Date: Tue, 18 Nov 2014 12:03:24 -0600 Subject: [PATCH] prevent sdl2 from building if not building for this host --- setup.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index 07db1f63c..c3187c1a0 100644 --- a/setup.py +++ b/setup.py @@ -218,15 +218,16 @@ if platform == 'ios': c_options['use_ios'] = True c_options['use_sdl'] = True -# detect gstreamer, only on desktop +# detect gstreamer/sdl2, only on desktop +sdl2_flags = {} if platform not in ('ios', 'android'): gst_flags = pkgconfig('gstreamer-1.0') if 'libraries' in gst_flags: c_options['use_gstreamer'] = True -sdl2_flags = pkgconfig('sdl2', 'SDL2_ttf', 'SDL2_image', 'SDL2_mixer') -if 'libraries' in sdl2_flags: - c_options['use_sdl2'] = True + sdl2_flags = pkgconfig('sdl2', 'SDL2_ttf', 'SDL2_image', 'SDL2_mixer') + if 'libraries' in sdl2_flags: + c_options['use_sdl2'] = True # -----------------------------------------------------------------------------