diff options
author | Filipe LaÃns <lains@riseup.net> | 2021-08-17 13:38:48 +0100 |
---|---|---|
committer | Daniel Mensinger <daniel@mensinger-ka.de> | 2021-09-06 18:10:55 +0200 |
commit | af8b55d49b64e72dbefbd40d613b93f56d17b855 (patch) | |
tree | ff763c3346d5b7f8f87f41e3f0cb7348ded1a47e /mesonbuild/modules/cmake.py | |
parent | be3bd9ea64570a468d482a8fc70e3d8474f77286 (diff) | |
download | meson-af8b55d49b64e72dbefbd40d613b93f56d17b855.zip meson-af8b55d49b64e72dbefbd40d613b93f56d17b855.tar.gz meson-af8b55d49b64e72dbefbd40d613b93f56d17b855.tar.bz2 |
mintro: add installed_plan
Signed-off-by: Filipe LaÃns <lains@riseup.net>
Diffstat (limited to 'mesonbuild/modules/cmake.py')
-rw-r--r-- | mesonbuild/modules/cmake.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/mesonbuild/modules/cmake.py b/mesonbuild/modules/cmake.py index d0b6065..53beded 100644 --- a/mesonbuild/modules/cmake.py +++ b/mesonbuild/modules/cmake.py @@ -272,9 +272,10 @@ class CmakeModule(ExtensionModule): if not self.detect_cmake(): raise mesonlib.MesonException('Unable to find cmake') - pkgroot = kwargs.get('install_dir', None) + pkgroot = pkgroot_name = kwargs.get('install_dir', None) if pkgroot is None: pkgroot = os.path.join(state.environment.coredata.get_option(mesonlib.OptionKey('libdir')), 'cmake', name) + pkgroot_name = os.path.join('{libdir}', 'cmake', name) if not isinstance(pkgroot, str): raise mesonlib.MesonException('Install_dir must be a string.') @@ -290,7 +291,7 @@ class CmakeModule(ExtensionModule): } mesonlib.do_conf_file(template_file, version_file, conf, 'meson') - res = build.Data([mesonlib.File(True, state.environment.get_scratch_dir(), version_file)], pkgroot, None, state.subproject) + res = build.Data([mesonlib.File(True, state.environment.get_scratch_dir(), version_file)], pkgroot, pkgroot_name, None, state.subproject) return ModuleReturnValue(res, [res]) def create_package_file(self, infile, outfile, PACKAGE_RELATIVE_PATH, extra, confdata): @@ -375,7 +376,7 @@ class CmakeModule(ExtensionModule): if conffile not in self.interpreter.build_def_files: self.interpreter.build_def_files.append(conffile) - res = build.Data([mesonlib.File(True, ofile_path, ofile_fname)], install_dir, None, state.subproject) + res = build.Data([mesonlib.File(True, ofile_path, ofile_fname)], install_dir, install_dir, None, state.subproject) self.interpreter.build.data.append(res) return res |