Brad Bishop | f3f93bb | 2019-10-16 14:33:32 -0400 | [diff] [blame^] | 1 | From cfff734af6bff6a30a649f784ecf698658c01884 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> |
| 8 | |
| 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 +++ |
| 13 | tests/meson.build | 2 +- |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 14 | 4 files changed, 9 insertions(+), 6 deletions(-) |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 15 | |
| 16 | diff --git a/gio/tests/meson.build b/gio/tests/meson.build |
Brad Bishop | f3f93bb | 2019-10-16 14:33:32 -0400 | [diff] [blame^] | 17 | index 95aafc1..9025eb2 100644 |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 18 | --- a/gio/tests/meson.build |
| 19 | +++ b/gio/tests/meson.build |
Brad Bishop | f3f93bb | 2019-10-16 14:33:32 -0400 | [diff] [blame^] | 20 | @@ -13,7 +13,7 @@ test_c_args = [ |
| 21 | '-UG_DISABLE_ASSERT', |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 22 | ] |
| 23 | |
| 24 | -if host_machine.system() == 'windows' |
| 25 | +if host_system == 'windows' |
| 26 | common_gio_tests_deps += [iphlpapi_dep, winsock2, cc.find_library ('secur32')] |
| 27 | endif |
| 28 | |
Brad Bishop | f3f93bb | 2019-10-16 14:33:32 -0400 | [diff] [blame^] | 29 | @@ -120,7 +120,7 @@ if dbus1_dep.found() |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 30 | endif |
| 31 | |
| 32 | # Test programs buildable on UNIX only |
| 33 | -if host_machine.system() != 'windows' |
| 34 | +if host_system != 'windows' |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 35 | gio_tests += { |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 36 | 'file' : {}, |
| 37 | 'gdbus-peer' : { |
Brad Bishop | f3f93bb | 2019-10-16 14:33:32 -0400 | [diff] [blame^] | 38 | @@ -332,7 +332,7 @@ if host_machine.system() != 'windows' |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 39 | endif # unix |
| 40 | |
| 41 | # Test programs buildable on Windows only |
| 42 | -if host_machine.system() == 'windows' |
| 43 | +if host_system == 'windows' |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 44 | gio_tests += {'win32-streams' : {}} |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 45 | endif |
| 46 | |
Brad Bishop | f3f93bb | 2019-10-16 14:33:32 -0400 | [diff] [blame^] | 47 | @@ -397,7 +397,7 @@ if cc.get_id() != 'msvc' and cc.get_id() != 'clang-cl' |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 48 | } |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 49 | endif |
| 50 | |
| 51 | -if host_machine.system() != 'windows' |
| 52 | +if host_system != 'windows' |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 53 | test_extra_programs += { |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 54 | 'gdbus-example-unix-fd-client' : { |
| 55 | 'install' : false, |
| 56 | diff --git a/glib/tests/meson.build b/glib/tests/meson.build |
Brad Bishop | f3f93bb | 2019-10-16 14:33:32 -0400 | [diff] [blame^] | 57 | index c47133f..cad975f 100644 |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 58 | --- a/glib/tests/meson.build |
| 59 | +++ b/glib/tests/meson.build |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 60 | @@ -132,7 +132,7 @@ if glib_conf.has('HAVE_EVENTFD') |
| 61 | } |
| 62 | endif |
| 63 | |
| 64 | -if host_machine.system() == 'windows' |
| 65 | +if host_system == 'windows' |
| 66 | if winsock2.found() |
| 67 | glib_tests += { |
| 68 | 'gpoll' : { |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 69 | diff --git a/meson.build b/meson.build |
Brad Bishop | f3f93bb | 2019-10-16 14:33:32 -0400 | [diff] [blame^] | 70 | index 717d1bc..2a3beb8 100644 |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 71 | --- a/meson.build |
| 72 | +++ b/meson.build |
Brad Bishop | f3f93bb | 2019-10-16 14:33:32 -0400 | [diff] [blame^] | 73 | @@ -32,6 +32,9 @@ else |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 74 | endif |
| 75 | |
| 76 | host_system = host_machine.system() |
| 77 | +if host_system == 'mingw32' |
| 78 | + host_system = 'windows' |
| 79 | +endif |
| 80 | |
| 81 | glib_version = meson.project_version() |
| 82 | glib_api_version = '2.0' |
| 83 | diff --git a/tests/meson.build b/tests/meson.build |
Brad Bishop | f3f93bb | 2019-10-16 14:33:32 -0400 | [diff] [blame^] | 84 | index ce30442..5710f2c 100644 |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 85 | --- a/tests/meson.build |
| 86 | +++ b/tests/meson.build |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 87 | @@ -66,7 +66,7 @@ test_extra_programs = { |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 88 | 'unicode-collate' : {}, |
| 89 | } |
| 90 | |
| 91 | -if host_machine.system() != 'windows' |
| 92 | +if host_system != 'windows' |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 93 | tests += { |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 94 | 'timeloop' : {}, |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 95 | 'iochannel-test' : {}, |