Fix HIDAPI optional (python: False vs 'False')
authorRobin Gareus <robin@gareus.org>
Sun, 23 Oct 2016 22:51:51 +0000 (00:51 +0200)
committerRobin Gareus <robin@gareus.org>
Sun, 23 Oct 2016 22:51:51 +0000 (00:51 +0200)
libs/hidapi/wscript

index cf95c8c71d2fc23cadb3d2bc4ba3d66afb81d5e6..2cb4a5f3f6cff928958383a8a9bc0b8f276cf683 100644 (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')