diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-05-20 22:50:54 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-05-06 20:42:08 +0200 |
| commit | a8238b7b32978c7b261ad0e11f77abed35bc19c6 (patch) | |
| tree | 47779bdc63f18b6b4282a3f294d923cb0dd24b1c /wscript | |
| parent | c19e610c5cb978db7ad049f9d8947f735791fbae (diff) | |
Add check_via_pkg_config to wscript
Diffstat (limited to 'wscript')
| -rw-r--r-- | wscript | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -251,6 +251,16 @@ def configure(conf): # linked and others that should be dynamic. This doesn't work too well with waf # as it wants them separate. + def check_via_pkg_config(conf, package, uselib_store, mandatory, static, minimum_version): + args = package if minimum_version is None else '%s >= %s' % (package, minimum_version) + args += ' --cflags' + if not static: + args += ' --libs' + msg = 'Checking for %s' % package + if minimum_version is not None: + msg += ' >= %s' % minimum_version + conf.check_cfg(package=package, args=args, uselib_store=uselib_store, mandatory=mandatory, msg=msg) + # libcurl if conf.options.static_curl: conf.env.STLIB_CURL = ['curl'] |
