blob: 2e1e2313e8b15c1cbb81db84d7ad48d553ba8402 [file] [log] [blame]
Patrick Williams7784c422022-11-17 07:29:11 -06001From ba1728bc27c88597164957d000b70ec4be6edf28 Mon Sep 17 00:00:00 2001
Brad Bishop19323692019-04-05 15:28:33 -04002From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Wed, 13 Feb 2019 15:32:05 +0100
4Subject: [PATCH] Set host_machine correctly when building with mingw32
5
6Upstream-Status: Inappropriate [oe-core specific]
7Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Patrick Williams7784c422022-11-17 07:29:11 -06008
Brad Bishop19323692019-04-05 15:28:33 -04009---
10 gio/tests/meson.build | 8 ++++----
Brad Bishop15ae2502019-06-18 21:44:24 -040011 glib/tests/meson.build | 2 +-
Brad Bishop19323692019-04-05 15:28:33 -040012 meson.build | 3 +++
Patrick Williams7784c422022-11-17 07:29:11 -060013 3 files changed, 8 insertions(+), 5 deletions(-)
Brad Bishop19323692019-04-05 15:28:33 -040014
15diff --git a/gio/tests/meson.build b/gio/tests/meson.build
Patrick Williams7784c422022-11-17 07:29:11 -060016index f644aa2..64a8684 100644
Brad Bishop19323692019-04-05 15:28:33 -040017--- a/gio/tests/meson.build
18+++ b/gio/tests/meson.build
Patrick Williams7784c422022-11-17 07:29:11 -060019@@ -29,7 +29,7 @@ endif
20
21 test_cpp_args = test_c_args
Brad Bishop19323692019-04-05 15:28:33 -040022
23-if host_machine.system() == 'windows'
24+if host_system == 'windows'
25 common_gio_tests_deps += [iphlpapi_dep, winsock2, cc.find_library ('secur32')]
26 endif
27
Patrick Williams7784c422022-11-17 07:29:11 -060028@@ -210,7 +210,7 @@ if have_dbus_daemon
Brad Bishop19323692019-04-05 15:28:33 -040029 endif
30
31 # Test programs buildable on UNIX only
32-if host_machine.system() != 'windows'
33+if host_system != 'windows'
Brad Bishop15ae2502019-06-18 21:44:24 -040034 gio_tests += {
Brad Bishop19323692019-04-05 15:28:33 -040035 'file' : {},
Patrick Williams7784c422022-11-17 07:29:11 -060036 'gdbus-peer-object-manager' : {},
37@@ -462,7 +462,7 @@ if host_machine.system() != 'windows'
Brad Bishop19323692019-04-05 15:28:33 -040038 endif # unix
39
40 # Test programs buildable on Windows only
41-if host_machine.system() == 'windows'
42+if host_system == 'windows'
Brad Bishop15ae2502019-06-18 21:44:24 -040043 gio_tests += {'win32-streams' : {}}
Brad Bishop19323692019-04-05 15:28:33 -040044 endif
45
Patrick Williams7784c422022-11-17 07:29:11 -060046@@ -532,7 +532,7 @@ if cc.get_id() != 'msvc' and cc.get_id() != 'clang-cl'
Brad Bishop15ae2502019-06-18 21:44:24 -040047 }
Brad Bishop19323692019-04-05 15:28:33 -040048 endif
49
50-if host_machine.system() != 'windows'
51+if host_system != 'windows'
Brad Bishop15ae2502019-06-18 21:44:24 -040052 test_extra_programs += {
Brad Bishop19323692019-04-05 15:28:33 -040053 'gdbus-example-unix-fd-client' : {
54 'install' : false,
55diff --git a/glib/tests/meson.build b/glib/tests/meson.build
Patrick Williams7784c422022-11-17 07:29:11 -060056index db01b54..6950817 100644
Brad Bishop19323692019-04-05 15:28:33 -040057--- a/glib/tests/meson.build
58+++ b/glib/tests/meson.build
Patrick Williams7784c422022-11-17 07:29:11 -060059@@ -188,7 +188,7 @@ if glib_conf.has('HAVE_EVENTFD')
Brad Bishop15ae2502019-06-18 21:44:24 -040060 }
61 endif
62
63-if host_machine.system() == 'windows'
64+if host_system == 'windows'
65 if winsock2.found()
66 glib_tests += {
67 'gpoll' : {
Brad Bishop19323692019-04-05 15:28:33 -040068diff --git a/meson.build b/meson.build
Patrick Williams7784c422022-11-17 07:29:11 -060069index 43bb468..5f9b59c 100644
Brad Bishop19323692019-04-05 15:28:33 -040070--- a/meson.build
71+++ b/meson.build
Patrick Williams7784c422022-11-17 07:29:11 -060072@@ -43,6 +43,9 @@ else
Brad Bishop19323692019-04-05 15:28:33 -040073 endif
74
75 host_system = host_machine.system()
76+if host_system == 'mingw32'
77+ host_system = 'windows'
78+endif
79
Andrew Geissler6ce62a22020-11-30 19:58:47 -060080 if host_system == 'darwin'
81 ios_test_code = '''#include <TargetConditionals.h>