aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/modules/cmake.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2021-01-04 23:42:50 +0000
committerGitHub <noreply@github.com>2021-01-04 23:42:50 +0000
commitd47a5c81a9af992eca42d857477f2bb5821712b6 (patch)
tree9c9ff772c696661a1582dc81c86273e8d975a13f /mesonbuild/modules/cmake.py
parent6b515c432109cf7ab488da37cddeb1752e91fa5c (diff)
parentf14bf8b2ed052f68857ed3eaec08a326d335a3a4 (diff)
downloadmeson-d47a5c81a9af992eca42d857477f2bb5821712b6.zip
meson-d47a5c81a9af992eca42d857477f2bb5821712b6.tar.gz
meson-d47a5c81a9af992eca42d857477f2bb5821712b6.tar.bz2
Merge pull request #8080 from dcbaker/submit/option-key-type
Use an object for option keys
Diffstat (limited to 'mesonbuild/modules/cmake.py')
-rw-r--r--mesonbuild/modules/cmake.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/mesonbuild/modules/cmake.py b/mesonbuild/modules/cmake.py
index 35c85a7..f6afaf3 100644
--- a/mesonbuild/modules/cmake.py
+++ b/mesonbuild/modules/cmake.py
@@ -269,7 +269,7 @@ class CmakeModule(ExtensionModule):
pkgroot = kwargs.get('install_dir', None)
if pkgroot is None:
- pkgroot = os.path.join(state.environment.coredata.get_builtin_option('libdir'), 'cmake', name)
+ pkgroot = os.path.join(state.environment.coredata.get_option(mesonlib.OptionKey('libdir')), 'cmake', name)
if not isinstance(pkgroot, str):
raise mesonlib.MesonException('Install_dir must be a string.')
@@ -342,7 +342,7 @@ class CmakeModule(ExtensionModule):
(ofile_path, ofile_fname) = os.path.split(os.path.join(state.subdir, '{}Config.cmake'.format(name)))
ofile_abs = os.path.join(state.environment.build_dir, ofile_path, ofile_fname)
- install_dir = kwargs.get('install_dir', os.path.join(state.environment.coredata.get_builtin_option('libdir'), 'cmake', name))
+ install_dir = kwargs.get('install_dir', os.path.join(state.environment.coredata.get_option(mesonlib.OptionKey('libdir')), 'cmake', name))
if not isinstance(install_dir, str):
raise mesonlib.MesonException('"install_dir" must be a string.')
@@ -352,7 +352,7 @@ class CmakeModule(ExtensionModule):
if not isinstance(conf, ConfigurationDataHolder):
raise mesonlib.MesonException('Argument "configuration" is not of type configuration_data')
- prefix = state.environment.coredata.get_builtin_option('prefix')
+ prefix = state.environment.coredata.get_option(mesonlib.OptionKey('prefix'))
abs_install_dir = install_dir
if not os.path.isabs(abs_install_dir):
abs_install_dir = os.path.join(prefix, install_dir)