13
0

Fix HIDAPI optional (python: False vs 'False')

This commit is contained in:
Robin Gareus 2016-10-24 00:51:51 +02:00
parent c78824aef5
commit 53e9337eba

View File

@ -24,10 +24,12 @@ def configure(conf):
else:
if conf.env['build_target'] == 'mingw':
conf.check (compiler='cxx', lib='setupapi', mandatory=True, uselib_store='SETUPAPI')
conf.define ('HAVE_HIDAPI', conf.is_defined('HAVE_SETUPAPI'))
if conf.is_defined('HAVE_SETUPAPI'):
conf.define ('HAVE_HIDAPI', 1)
elif re.search ("linux", sys.platform) != None:
autowaf.check_pkg(conf, 'libudev', uselib_store='UDEV', mandatory=False)
conf.define ('HAVE_HIDAPI', conf.is_defined('HAVE_UDEV'))
if conf.is_defined('HAVE_UDEV'):
conf.define ('HAVE_HIDAPI', 1)
else:
conf.define ('HAVE_HIDAPI', 1)
conf.load('compiler_c')