diff --git a/libs/hidapi/wscript b/libs/hidapi/wscript index cf95c8c71d..2cb4a5f3f6 100644 --- a/libs/hidapi/wscript +++ b/libs/hidapi/wscript @@ -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')