python/meson: set exe_wrapper=wine for Windows builds

Allows running the unit tests on Linux.
This commit is contained in:
Max Kellermann 2021-08-10 14:51:02 +02:00
parent 1af8694ef6
commit 09d74f05c3
1 changed files with 5 additions and 1 deletions

View File

@ -1,4 +1,5 @@
import os.path, subprocess, sys
import platform
from build.project import Project
@ -43,9 +44,12 @@ strip = '{toolchain.strip}'
pkgconfig = '{toolchain.pkg_config}'
""")
if toolchain.is_windows:
if toolchain.is_windows and platform.system() != 'Windows':
f.write(f"windres = '{toolchain.windres}'\n")
# Run unit tests with WINE when cross-building for Windows
print("exe_wrapper = 'wine'", file=f)
f.write(f"""
[properties]
root = '{toolchain.install_prefix}'