diff options
| author | Jussi Pakkanen <jpakkane@gmail.com> | 2024-04-14 12:58:30 +0300 |
|---|---|---|
| committer | Jussi Pakkanen <jpakkane@gmail.com> | 2025-02-13 23:57:48 +0200 |
| commit | d37d649b08b832d52fa684bc0506829fb40d5261 (patch) | |
| tree | c66e1461e91d6349457b826978e866fdabb19de1 /mesonbuild/dependencies | |
| parent | ea678ed82938ceac00682b2695b57193d36b71b4 (diff) | |
| download | meson-d37d649b08b832d52fa684bc0506829fb40d5261.tar.gz | |
Make all Meson level options overridable per subproject.
Diffstat (limited to 'mesonbuild/dependencies')
| -rw-r--r-- | mesonbuild/dependencies/boost.py | 2 | ||||
| -rw-r--r-- | mesonbuild/dependencies/pkgconfig.py | 6 | ||||
| -rw-r--r-- | mesonbuild/dependencies/qt.py | 7 |
3 files changed, 9 insertions, 6 deletions
diff --git a/mesonbuild/dependencies/boost.py b/mesonbuild/dependencies/boost.py index 870c0b16b..0c613205f 100644 --- a/mesonbuild/dependencies/boost.py +++ b/mesonbuild/dependencies/boost.py @@ -582,7 +582,9 @@ class BoostDependency(SystemDependency): vscrt = '' try: crt_val = self.env.coredata.optstore.get_value('b_vscrt') + assert isinstance(crt_val, str) buildtype = self.env.coredata.optstore.get_value('buildtype') + assert isinstance(buildtype, str) vscrt = self.clib_compiler.get_crt_compile_args(crt_val, buildtype)[0] except (KeyError, IndexError, AttributeError): pass diff --git a/mesonbuild/dependencies/pkgconfig.py b/mesonbuild/dependencies/pkgconfig.py index 447b69ea0..94e089356 100644 --- a/mesonbuild/dependencies/pkgconfig.py +++ b/mesonbuild/dependencies/pkgconfig.py @@ -256,7 +256,9 @@ class PkgConfigCLI(PkgConfigInterface): def _get_env(self, uninstalled: bool = False) -> EnvironmentVariables: env = EnvironmentVariables() key = OptionKey('pkg_config_path', machine=self.for_machine) - extra_paths: T.List[str] = self.env.coredata.optstore.get_value(key)[:] + pathlist = self.env.coredata.optstore.get_value_for(key) + assert isinstance(pathlist, list) + extra_paths: T.List[str] = pathlist[:] if uninstalled: bpath = self.env.get_build_dir() if bpath is not None: @@ -419,7 +421,7 @@ class PkgConfigDependency(ExternalDependency): # # Only prefix_libpaths are reordered here because there should not be # too many system_libpaths to cause library version issues. - pkg_config_path: T.List[str] = self.env.coredata.optstore.get_value(OptionKey('pkg_config_path', machine=self.for_machine)) + pkg_config_path: T.List[str] = self.env.coredata.optstore.get_value(OptionKey('pkg_config_path', machine=self.for_machine)) # type: ignore[assignment] pkg_config_path = self._convert_mingw_paths(pkg_config_path) prefix_libpaths = OrderedSet(sort_libpaths(list(prefix_libpaths), pkg_config_path)) system_libpaths: OrderedSet[str] = OrderedSet() diff --git a/mesonbuild/dependencies/qt.py b/mesonbuild/dependencies/qt.py index 1b60deb8a..a3a938828 100644 --- a/mesonbuild/dependencies/qt.py +++ b/mesonbuild/dependencies/qt.py @@ -19,7 +19,6 @@ from .pkgconfig import PkgConfigDependency from .factory import DependencyFactory from .. import mlog from .. import mesonlib -from ..options import OptionKey if T.TYPE_CHECKING: from ..compilers import Compiler @@ -297,9 +296,9 @@ class QmakeQtDependency(_QtBase, ConfigToolDependency, metaclass=abc.ABCMeta): # Use the buildtype by default, but look at the b_vscrt option if the # compiler supports it. - is_debug = self.env.coredata.get_option(OptionKey('buildtype')) == 'debug' - if OptionKey('b_vscrt') in self.env.coredata.optstore: - if self.env.coredata.optstore.get_value('b_vscrt') in {'mdd', 'mtd'}: + is_debug = self.env.coredata.optstore.get_value_for('buildtype') == 'debug' + if 'b_vscrt' in self.env.coredata.optstore: + if self.env.coredata.optstore.get_value_for('b_vscrt') in {'mdd', 'mtd'}: is_debug = True modules_lib_suffix = _get_modules_lib_suffix(self.version, self.env.machines[self.for_machine], is_debug) |
