blob: e1d2fb0e54f319bda1bf62f2c6f57acd987f7bf6 [file] [log] [blame]
From bafde4eedc0a22b45e73ee6183b9a11393a1e400 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Wed, 13 Feb 2019 15:32:05 +0100
Subject: [PATCH] Set host_machine correctly when building with mingw32
Upstream-Status: Inappropriate [oe-core specific]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
gio/tests/meson.build | 8 ++++----
glib/tests/meson.build | 2 +-
meson.build | 3 +++
3 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/gio/tests/meson.build b/gio/tests/meson.build
index 4ef3343..e498e7e 100644
--- a/gio/tests/meson.build
+++ b/gio/tests/meson.build
@@ -29,7 +29,7 @@ endif
test_cpp_args = test_c_args
-if host_machine.system() == 'windows'
+if host_system == 'windows'
common_gio_tests_deps += [iphlpapi_dep, winsock2, cc.find_library ('secur32')]
endif
@@ -230,7 +230,7 @@ if have_dbus_daemon
endif
# Test programs buildable on UNIX only
-if host_machine.system() != 'windows'
+if host_system != 'windows'
gio_tests += {
'file' : {},
'gdbus-peer-object-manager' : {},
@@ -562,7 +562,7 @@ if host_machine.system() != 'windows'
endif # unix
# Test programs buildable on Windows only
-if host_machine.system() == 'windows'
+if host_system == 'windows'
gio_tests += {'win32-streams' : {}}
endif
@@ -632,7 +632,7 @@ if cc.get_id() != 'msvc' and cc.get_id() != 'clang-cl'
}
endif
-if host_machine.system() != 'windows'
+if host_system != 'windows'
test_extra_programs += {
'gdbus-example-unix-fd-client' : {
'install' : false,
diff --git a/glib/tests/meson.build b/glib/tests/meson.build
index d80c86e..5329cda 100644
--- a/glib/tests/meson.build
+++ b/glib/tests/meson.build
@@ -216,7 +216,7 @@ if glib_conf.has('HAVE_EVENTFD')
}
endif
-if host_machine.system() == 'windows'
+if host_system == 'windows'
if winsock2.found()
glib_tests += {
'gpoll' : {
diff --git a/meson.build b/meson.build
index f7e936e..122f8b5 100644
--- a/meson.build
+++ b/meson.build
@@ -54,6 +54,9 @@ else
endif
host_system = host_machine.system()
+if host_system == 'mingw32'
+ host_system = 'windows'
+endif
if host_system == 'darwin'
ios_test_code = '''#include <TargetConditionals.h>