On Windows, I use pkgconf as pkg-config implementation.
Its executable is called pkgconf.
Finding a dependency that provides a .pc fails with the following output:
Did not find pkg-config by name 'pkgconfig'
Found Pkg-config: NO
Then it goes on trying cmake...
I've set the PKG_CONFIG environment variable,
but that doesn't work because meson doesn't do environment variables.
The reason is that meson only looks for a limited number of pkg-config names:
|
mlog.debug('Pkg-config binary for %s is not cached.' % self.for_machine) |
|
for potential_pkgbin in find_external_program( |
|
self.env, self.for_machine, 'pkgconfig', 'Pkg-config', |
|
environment.default_pkgconfig, allow_default_for_cross=False): |
|
version_if_ok = self.check_pkgconfig(potential_pkgbin) |
|
if not version_if_ok: |
|
continue |
|
if not self.silent: |
|
mlog.log('Found pkg-config:', mlog.bold(potential_pkgbin.get_path()), |
|
'(%s)' % version_if_ok) |
|
PkgConfigDependency.class_pkgbin[self.for_machine] = potential_pkgbin |
|
break |
|
else: |
|
if not self.silent: |
|
mlog.log('Found Pkg-config:', mlog.red('NO')) |
|
# Set to False instead of None to signify that we've already |
|
# searched for it and not found it |
|
PkgConfigDependency.class_pkgbin[self.for_machine] = False |
|
|
|
self.pkgbin = PkgConfigDependency.class_pkgbin[self.for_machine] |
|
if self.pkgbin is False: |
|
self.pkgbin = None |
|
msg = 'Pkg-config binary for machine %s not found. Giving up.' % self.for_machine |
|
if self.required: |
|
raise DependencyException(msg) |
|
else: |
|
mlog.debug(msg) |
|
return |
The default is
pkg-config.
How can I add pkgconf to this list or change the default?
system parameters
- Is this a cross build or just a plain native build (for the same computer)? NO
- what operating system Windows 10
- what Python version are you using e.g. 3.8.0: 3.7.7
- what
meson --version 0.55.0
- what
ninja --version if it's a Ninja build 1.10.0
On Windows, I use
pkgconfaspkg-configimplementation.Its executable is called
pkgconf.Finding a dependency that provides a .pc fails with the following output:
Then it goes on trying cmake...
I've set the
PKG_CONFIGenvironment variable,but that doesn't work because meson doesn't do environment variables.
The reason is that meson only looks for a limited number of pkg-config names:
meson/mesonbuild/dependencies/base.py
Lines 580 to 607 in 104b80a
The default is
pkg-config.How can I add
pkgconfto this list or change the default?system parameters
meson --version0.55.0ninja --versionif it's a Ninja build 1.10.0