diff --git a/Tools/ardupilotwaf/cxx_checks.py b/Tools/ardupilotwaf/cxx_checks.py index 624d85b5ac..2181a2f1e3 100644 --- a/Tools/ardupilotwaf/cxx_checks.py +++ b/Tools/ardupilotwaf/cxx_checks.py @@ -159,9 +159,10 @@ def check_librt(cfg, env): @conf def check_package(cfg, env, libname): '''use pkg-config to look for an installed library that has a LIBNAME.pc file''' - cfg.check_cfg(package=libname, mandatory=False, global_define=True, - args=['--libs', '--cflags']) capsname = libname.upper() + cfg.check_cfg(package=libname, mandatory=False, global_define=True, + args=['--libs', '--cflags'], uselib_store=capsname) + env.LIB += cfg.env['LIB_%s' % capsname] env.INCLUDES += cfg.env['INCLUDES_%s' % capsname] env.CFLAGS += cfg.env['CFLAGS_%s' % capsname]