waf: pass uselib_store in check_package()

This guarantees waf will always add the flags with our known prefix.
This commit is contained in:
Lucas De Marchi 2016-07-13 15:22:36 -03:00
parent 1b12371e25
commit 8967220652
1 changed files with 3 additions and 2 deletions

View File

@ -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]