diff options
author | Max Kellermann <max@musicpd.org> | 2021-08-10 14:51:02 +0200 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2021-08-10 15:04:54 +0200 |
commit | 09d74f05c3f6f008da6e2c60ecb9b560486e6890 (patch) | |
tree | 7593460f6986fa66637f460a525e3a414aca275d | |
parent | 1af8694ef64c2791d060c13a41f4c74ac859ce75 (diff) |
python/meson: set exe_wrapper=wine for Windows builds
Allows running the unit tests on Linux.
-rw-r--r-- | python/build/meson.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/python/build/meson.py b/python/build/meson.py index 25d09b7d2..1c7176b65 100644 --- a/python/build/meson.py +++ b/python/build/meson.py @@ -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}' |