From 121d786100429762f2b70c3ba2e6472ce84a4b2d Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 15 Apr 2019 11:30:56 +0200 Subject: Squashed 'waflib/' changes from 27a69a7..b074a1e b074a1e Support building against local header-only libraries git-subtree-dir: waflib git-subtree-split: b074a1ef75005785ef7fadbaaaec7574ca4149ed --- extras/autowaf.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'extras') diff --git a/extras/autowaf.py b/extras/autowaf.py index 5feef03..8c6e258 100644 --- a/extras/autowaf.py +++ b/extras/autowaf.py @@ -174,7 +174,8 @@ def define(conf, var_name, value): def check_pkg(conf, name, **args): "Check for a package iff it hasn't been checked for yet" - if args['uselib_store'].lower() in conf.env['AUTOWAF_LOCAL_LIBS']: + if (args['uselib_store'].lower() in conf.env['AUTOWAF_LOCAL_LIBS'] or + args['uselib_store'].lower() in conf.env['AUTOWAF_LOCAL_HEADERS']): return class CheckType: @@ -483,7 +484,7 @@ def version_lib(self): if [x for x in applicable if x in self.features]: self.target = self.target + 'D' -def set_lib_env(conf, name, version): +def set_lib_env(conf, name, version, has_objects=True): "Set up environment for local library as if found via pkg-config." NAME = name.upper() major_ver = version.split('.')[0] @@ -495,7 +496,8 @@ def set_lib_env(conf, name, version): conf.env[pkg_var_name] = lib_name conf.env['INCLUDES_' + NAME] = ['${INCLUDEDIR}/%s-%s' % (name, major_ver)] conf.env['LIBPATH_' + NAME] = lib_path - conf.env['LIB_' + NAME] = [lib_name] + if has_objects: + conf.env['LIB_' + NAME] = [lib_name] conf.run_env.append_unique(lib_path_name, lib_path) conf.define(NAME + '_VERSION', version) -- cgit v1.2.1