python/build/meson.py: generate `windres` line

This commit is contained in:
Max Kellermann 2018-10-14 23:41:20 +02:00
parent 89bf4c5fad
commit 13ce142df1
2 changed files with 5 additions and 0 deletions

View File

@ -5,8 +5,10 @@ from build.project import Project
def make_cross_file(toolchain):
if toolchain.is_windows:
system = 'windows'
windres = "windres = '%s'" % toolchain.windres
else:
system = 'linux'
windres = ''
if toolchain.is_arm:
cpu_family = 'arm'
@ -38,6 +40,7 @@ c = '%s'
cpp = '%s'
ar = '%s'
strip = '%s'
%s
[properties]
root = '%s'
@ -57,6 +60,7 @@ cpu_family = '%s'
cpu = '%s'
endian = '%s'
""" % (toolchain.cc, toolchain.cxx, toolchain.ar, toolchain.strip,
windres,
toolchain.install_prefix,
repr((toolchain.cppflags + ' ' + toolchain.cflags).split()),
repr(toolchain.ldflags.split()),

View File

@ -49,6 +49,7 @@ class CrossGccToolchain:
self.ranlib = os.path.join(toolchain_bin, arch + '-ranlib')
self.nm = os.path.join(toolchain_bin, arch + '-nm')
self.strip = os.path.join(toolchain_bin, arch + '-strip')
self.windres = os.path.join(toolchain_bin, arch + '-windres')
common_flags = '-O2 -g'