aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2022-11-09 16:18:58 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2022-11-09 16:18:58 +0200
commit83da54643daeaeecd56db0aa9e8e9b15d515aa6f (patch)
tree08674c8272503e6ecc068b72b1a89f7f23f0ee27
parent4c86511fb4baeed923f022feb2da277af28753ee (diff)
downloadmeson-debcrossfixes.zip
meson-debcrossfixes.tar.gz
meson-debcrossfixes.tar.bz2
Add CMake to cross file.debcrossfixes
-rwxr-xr-xmesonbuild/scripts/env2mfile.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/mesonbuild/scripts/env2mfile.py b/mesonbuild/scripts/env2mfile.py
index c91c110..be0fd30 100755
--- a/mesonbuild/scripts/env2mfile.py
+++ b/mesonbuild/scripts/env2mfile.py
@@ -164,6 +164,10 @@ def detect_cross_debianlike(options: T.Any) -> MachineInfo:
host_cpu = cpu_map.get(data['DEB_HOST_ARCH'],
data['DEB_HOST_ARCH'])
host_endian = data['DEB_HOST_ARCH_ENDIAN']
+ try:
+ cmake = locate_path("cmake")
+ except ValueError:
+ cmake = None
compilerstems = [('c', 'gcc'),
('cpp', 'g++'),
@@ -177,6 +181,8 @@ def detect_cross_debianlike(options: T.Any) -> MachineInfo:
infos.binaries['strip'] = locate_path("%s-strip" % host_arch)
infos.binaries['objcopy'] = locate_path("%s-objcopy" % host_arch)
infos.binaries['ld'] = locate_path("%s-ld" % host_arch)
+ if cmake:
+ infos.binaries['cmake'] = cmake
try:
infos.binaries['pkgconfig'] = locate_path("%s-pkg-config" % host_arch)
except ValueError:
@@ -217,6 +223,8 @@ def write_machine_file(infos: MachineInfo, ofilename: str, write_system_info: bo
write_args_line(ofile, lang + '_args', infos.compile_args[lang])
if lang in infos.link_args:
write_args_line(ofile, lang + '_link_args', infos.link_args[lang])
+ for k, v in infos.properties.items():
+ write_args_line(ofile, k, v)
ofile.write('\n')
if write_system_info: