Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame^] | 1 | From 4f327be49fd6ac5a77da6e48459b37f37a601977 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> |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 8 | --- |
| 9 | gio/tests/meson.build | 8 ++++---- |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 10 | glib/tests/meson.build | 2 +- |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 11 | meson.build | 3 +++ |
| 12 | tests/meson.build | 2 +- |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 13 | 4 files changed, 9 insertions(+), 6 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 |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame^] | 16 | index abe676767c60..34b347815308 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 |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame^] | 19 | @@ -27,7 +27,7 @@ if build_machine.system() == 'linux' |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 20 | endif # libutil.length() > 0 |
| 21 | endif # build_machine.system() == 'linux' |
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 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame^] | 28 | @@ -176,7 +176,7 @@ else |
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' : {}, |
| 36 | 'gdbus-peer' : { |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame^] | 37 | @@ -434,7 +434,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 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame^] | 46 | @@ -504,7 +504,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 |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame^] | 56 | index a0c64afe6ae9..48407f99569c 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 |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame^] | 59 | @@ -151,7 +151,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 |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame^] | 69 | index e0b14319fb58..f6756a3c7dfb 100644 |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 70 | --- a/meson.build |
| 71 | +++ b/meson.build |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame^] | 72 | @@ -54,6 +54,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> |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 82 | diff --git a/tests/meson.build b/tests/meson.build |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame^] | 83 | index 5ff99a4a8258..8a4dad0ccae7 100644 |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 84 | --- a/tests/meson.build |
| 85 | +++ b/tests/meson.build |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame^] | 86 | @@ -53,7 +53,7 @@ test_extra_programs = { |
| 87 | 'assert-msg-test' : {}, |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 88 | } |
| 89 | |
| 90 | -if host_machine.system() != 'windows' |
| 91 | +if host_system != 'windows' |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 92 | tests += { |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 93 | 'timeloop' : {}, |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame^] | 94 | } |
| 95 | -- |
| 96 | 2.34.1 |
| 97 | |