Patrick Williams | 7784c42 | 2022-11-17 07:29:11 -0600 | [diff] [blame] | 1 | From ba1728bc27c88597164957d000b70ec4be6edf28 Mon Sep 17 00:00:00 2001 |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 2 | From: Alexander Kanavin <alex.kanavin@gmail.com> |
| 3 | Date: Wed, 13 Feb 2019 15:32:05 +0100 |
| 4 | Subject: [PATCH] Set host_machine correctly when building with mingw32 |
| 5 | |
| 6 | Upstream-Status: Inappropriate [oe-core specific] |
| 7 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> |
Patrick Williams | 7784c42 | 2022-11-17 07:29:11 -0600 | [diff] [blame] | 8 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 9 | --- |
| 10 | gio/tests/meson.build | 8 ++++---- |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 11 | glib/tests/meson.build | 2 +- |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 12 | meson.build | 3 +++ |
Patrick Williams | 7784c42 | 2022-11-17 07:29:11 -0600 | [diff] [blame] | 13 | 3 files changed, 8 insertions(+), 5 deletions(-) |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 14 | |
| 15 | diff --git a/gio/tests/meson.build b/gio/tests/meson.build |
Patrick Williams | 7784c42 | 2022-11-17 07:29:11 -0600 | [diff] [blame] | 16 | index f644aa2..64a8684 100644 |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 17 | --- a/gio/tests/meson.build |
| 18 | +++ b/gio/tests/meson.build |
Patrick Williams | 7784c42 | 2022-11-17 07:29:11 -0600 | [diff] [blame] | 19 | @@ -29,7 +29,7 @@ endif |
| 20 | |
| 21 | test_cpp_args = test_c_args |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 22 | |
| 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 Williams | 7784c42 | 2022-11-17 07:29:11 -0600 | [diff] [blame] | 28 | @@ -210,7 +210,7 @@ if have_dbus_daemon |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 29 | endif |
| 30 | |
| 31 | # Test programs buildable on UNIX only |
| 32 | -if host_machine.system() != 'windows' |
| 33 | +if host_system != 'windows' |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 34 | gio_tests += { |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 35 | 'file' : {}, |
Patrick Williams | 7784c42 | 2022-11-17 07:29:11 -0600 | [diff] [blame] | 36 | 'gdbus-peer-object-manager' : {}, |
| 37 | @@ -462,7 +462,7 @@ if host_machine.system() != 'windows' |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 38 | endif # unix |
| 39 | |
| 40 | # Test programs buildable on Windows only |
| 41 | -if host_machine.system() == 'windows' |
| 42 | +if host_system == 'windows' |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 43 | gio_tests += {'win32-streams' : {}} |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 44 | endif |
| 45 | |
Patrick Williams | 7784c42 | 2022-11-17 07:29:11 -0600 | [diff] [blame] | 46 | @@ -532,7 +532,7 @@ if cc.get_id() != 'msvc' and cc.get_id() != 'clang-cl' |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 47 | } |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 48 | endif |
| 49 | |
| 50 | -if host_machine.system() != 'windows' |
| 51 | +if host_system != 'windows' |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 52 | test_extra_programs += { |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 53 | 'gdbus-example-unix-fd-client' : { |
| 54 | 'install' : false, |
| 55 | diff --git a/glib/tests/meson.build b/glib/tests/meson.build |
Patrick Williams | 7784c42 | 2022-11-17 07:29:11 -0600 | [diff] [blame] | 56 | index db01b54..6950817 100644 |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 57 | --- a/glib/tests/meson.build |
| 58 | +++ b/glib/tests/meson.build |
Patrick Williams | 7784c42 | 2022-11-17 07:29:11 -0600 | [diff] [blame] | 59 | @@ -188,7 +188,7 @@ if glib_conf.has('HAVE_EVENTFD') |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 60 | } |
| 61 | endif |
| 62 | |
| 63 | -if host_machine.system() == 'windows' |
| 64 | +if host_system == 'windows' |
| 65 | if winsock2.found() |
| 66 | glib_tests += { |
| 67 | 'gpoll' : { |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 68 | diff --git a/meson.build b/meson.build |
Patrick Williams | 7784c42 | 2022-11-17 07:29:11 -0600 | [diff] [blame] | 69 | index 43bb468..5f9b59c 100644 |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 70 | --- a/meson.build |
| 71 | +++ b/meson.build |
Patrick Williams | 7784c42 | 2022-11-17 07:29:11 -0600 | [diff] [blame] | 72 | @@ -43,6 +43,9 @@ else |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 73 | endif |
| 74 | |
| 75 | host_system = host_machine.system() |
| 76 | +if host_system == 'mingw32' |
| 77 | + host_system = 'windows' |
| 78 | +endif |
| 79 | |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 80 | if host_system == 'darwin' |
| 81 | ios_test_code = '''#include <TargetConditionals.h> |