Skip to content

Commit 8118629

Browse files
committed
Merge pull request kivy#2687 from kived/build-sdl2
prevent sdl2 from auto-building if not building for this host
2 parents b91f4f5 + 5b360a0 commit 8118629

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

setup.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,15 +218,16 @@ def update_if_changed(self, fn, content):
218218
c_options['use_ios'] = True
219219
c_options['use_sdl'] = True
220220

221-
# detect gstreamer, only on desktop
221+
# detect gstreamer/sdl2, only on desktop
222+
sdl2_flags = {}
222223
if platform not in ('ios', 'android'):
223224
gst_flags = pkgconfig('gstreamer-1.0')
224225
if 'libraries' in gst_flags:
225226
c_options['use_gstreamer'] = True
226227

227-
sdl2_flags = pkgconfig('sdl2', 'SDL2_ttf', 'SDL2_image', 'SDL2_mixer')
228-
if 'libraries' in sdl2_flags:
229-
c_options['use_sdl2'] = True
228+
sdl2_flags = pkgconfig('sdl2', 'SDL2_ttf', 'SDL2_image', 'SDL2_mixer')
229+
if 'libraries' in sdl2_flags:
230+
c_options['use_sdl2'] = True
230231

231232

232233
# -----------------------------------------------------------------------------

0 commit comments

Comments
 (0)