1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-24 15:28:10 +00:00

core: enable firmware build without SDL2 installed

SConstruct includes SConscript.unix even for the firmware builds,
which resuls in error if SDL2 is not installed.
This commit workarounds the issue.

Is there a better way how to NOT include SConscript.unix via
SConstruct for firmware only builds?
This commit is contained in:
Pavol Rusnak 2019-08-29 12:35:16 +02:00
parent cc3f7b8d48
commit dbef93a30d
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

View File

@ -349,7 +349,10 @@ env.Replace(
] + CPPDEFINES_MOD,
ASPPFLAGS='$CFLAGS $CCFLAGS', )
env.ParseConfig('pkg-config --cflags --libs sdl2 SDL2_image')
try:
env.ParseConfig('pkg-config --cflags --libs sdl2 SDL2_image')
except OSError:
print("SDL2 not installed, Emulator build is not possible")
env.Replace(
PYTHON='python',