Tools: Add the SFML configuration flags as needed for joysticks

This commit is contained in:
Michael du Breuil 2020-11-12 14:13:31 -07:00 committed by Peter Barker
parent 350fe3ed8d
commit 960437d446

View File

@ -456,6 +456,11 @@ class sitl(Board):
if not cfg.check_SFML(env): if not cfg.check_SFML(env):
cfg.fatal("Failed to find SFML libraries") cfg.fatal("Failed to find SFML libraries")
if cfg.options.enable_sfml_joystick:
if not cfg.check_SFML(env):
cfg.fatal("Failed to find SFML libraries")
env.CXXFLAGS += ['-DSFML_JOYSTICK']
if cfg.options.sitl_osd: if cfg.options.sitl_osd:
env.CXXFLAGS += ['-DWITH_SITL_OSD','-DOSD_ENABLED=1'] env.CXXFLAGS += ['-DWITH_SITL_OSD','-DOSD_ENABLED=1']
for f in os.listdir('libraries/AP_OSD/fonts'): for f in os.listdir('libraries/AP_OSD/fonts'):