aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/modules/cmake.py
diff options
context:
space:
mode:
authorFilipe Laíns <lains@riseup.net>2021-08-17 13:38:48 +0100
committerDaniel Mensinger <daniel@mensinger-ka.de>2021-09-06 18:10:55 +0200
commitaf8b55d49b64e72dbefbd40d613b93f56d17b855 (patch)
treeff763c3346d5b7f8f87f41e3f0cb7348ded1a47e /mesonbuild/modules/cmake.py
parentbe3bd9ea64570a468d482a8fc70e3d8474f77286 (diff)
downloadmeson-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.py7
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