meson: Specify that build-machine compiler for C++ is not required

When cross-compiling Windows binaries on (for example) Linux, we only
need a Windows C++ compiler and not a Linux C++ compiler.

Resolves: https://gitlab.freedesktop.org/dbus/dbus/-/issues/439
Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
Simon McVittie 2023-08-14 20:32:03 +01:00 committed by Ralf Habacker
parent 3365c95c20
commit 3d0ee109c3

View file

@ -93,7 +93,7 @@ platform_windows = host_os.contains('windows')
if platform_windows
# On Windows, we use C++ constructors to initialize global locks
using_cpp = true
add_languages('cpp', required: true)
add_languages('cpp', required: true, native: false)
cpp = meson.get_compiler('cpp')
else
using_cpp = false