From d3334e83ae0da9ca184eb9c8daf0854544ece023 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin 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 --- gio/tests/meson.build | 8 ++++---- glib/tests/meson.build | 2 +- meson.build | 3 +++ tests/meson.build | 2 +- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/gio/tests/meson.build b/gio/tests/meson.build index dab65d2..e8bb2ee 100644 --- a/gio/tests/meson.build +++ b/gio/tests/meson.build @@ -12,7 +12,7 @@ test_c_args = [ '-UG_DISABLE_ASSERT', ] -if host_machine.system() == 'windows' +if host_system == 'windows' common_gio_tests_deps += [iphlpapi_dep, winsock2, cc.find_library ('secur32')] endif @@ -132,7 +132,7 @@ else endif # Test programs buildable on UNIX only -if host_machine.system() != 'windows' +if host_system != 'windows' gio_tests += { 'file' : {}, 'gdbus-peer' : { @@ -384,7 +384,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 @@ -454,7 +454,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 3dedafc..94605e6 100644 --- a/glib/tests/meson.build +++ b/glib/tests/meson.build @@ -134,7 +134,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 e1b4b79..afb6eaa 100644 --- a/meson.build +++ b/meson.build @@ -32,6 +32,9 @@ else endif host_system = host_machine.system() +if host_system == 'mingw32' + host_system = 'windows' +endif glib_version = meson.project_version() glib_api_version = '2.0' diff --git a/tests/meson.build b/tests/meson.build index 6741f8f..12fdc90 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -73,7 +73,7 @@ test_extra_programs = { 'unicode-collate' : {}, } -if host_machine.system() != 'windows' +if host_system != 'windows' tests += { 'timeloop' : {}, 'iochannel-test' : {},