diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2025-01-07 18:40:30 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2025-01-07 18:41:50 +0200 |
commit | df21abb25741152f06077cc4b2b27fedba86470d (patch) | |
tree | 16c0e49b1387908ce7da1d550293d62ac629fc5a | |
parent | 3741a1d173bd189bdf1b29f46e684bb668e71d5c (diff) | |
download | meson-uninstallcheck.zip meson-uninstallcheck.tar.gz meson-uninstallcheck.tar.bz2 |
Only use uninstalled deps if a build dir exists.uninstallcheck
-rw-r--r-- | mesonbuild/dependencies/pkgconfig.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/mesonbuild/dependencies/pkgconfig.py b/mesonbuild/dependencies/pkgconfig.py index c6e6a5e..447b69e 100644 --- a/mesonbuild/dependencies/pkgconfig.py +++ b/mesonbuild/dependencies/pkgconfig.py @@ -258,9 +258,12 @@ class PkgConfigCLI(PkgConfigInterface): key = OptionKey('pkg_config_path', machine=self.for_machine) extra_paths: T.List[str] = self.env.coredata.optstore.get_value(key)[:] if uninstalled: - uninstalled_path = Path(self.env.get_build_dir(), 'meson-uninstalled').as_posix() - if uninstalled_path not in extra_paths: - extra_paths.insert(0, uninstalled_path) + bpath = self.env.get_build_dir() + if bpath is not None: + # uninstalled can only be used if a build dir exists. + uninstalled_path = Path(bpath, 'meson-uninstalled').as_posix() + if uninstalled_path not in extra_paths: + extra_paths.insert(0, uninstalled_path) env.set('PKG_CONFIG_PATH', extra_paths) sysroot = self.env.properties[self.for_machine].get_sys_root() if sysroot: |