[glib/wip/3v1n0/more-unix-oses: 3/7] meson: Cleanup computation of glib OS and their definition
- From: Marco Trevisan <marcotrevi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/wip/3v1n0/more-unix-oses: 3/7] meson: Cleanup computation of glib OS and their definition
- Date: Wed, 19 Oct 2022 15:53:30 +0000 (UTC)
commit 53b16d963c91eb82794a746d5f431d27cab2587b
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date: Wed Oct 19 16:40:15 2022 +0200
meson: Cleanup computation of glib OS and their definition
meson.build | 26 ++++++++++++++++----------
1 file changed, 16 insertions(+), 10 deletions(-)
---
diff --git a/meson.build b/meson.build
index bd30f53d7a..cd9c88e4a4 100644
--- a/meson.build
+++ b/meson.build
@@ -230,18 +230,24 @@ endif
# This makes G_PLATFORM_WIN32 a synonym for
# G_OS_WIN32.
if host_system == 'windows'
- glib_os = '''#define G_OS_WIN32
-#define G_PLATFORM_WIN32'''
-elif host_system == 'cygwin'
- glib_os = '''#define G_OS_UNIX
-#define G_WITH_CYGWIN'''
-elif host_system == 'darwin'
- glib_os = '''#define G_OS_UNIX
-#define G_OS_DARWIN'''
+ glib_os = [
+ 'G_OS_WIN32',
+ 'G_PLATFORM_WIN32',
+ ]
else
- glib_os = '#define G_OS_UNIX'
+ glib_os = ['G_OS_UNIX']
+
+ if host_system == 'cygwin'
+ glib_os += 'G_WITH_CYGWIN'
+ elif host_system == 'darwin'
+ glib_os += 'G_OS_DARWIN'
+ endif
endif
-glibconfig_conf.set('glib_os', glib_os)
+glib_os_defines = []
+foreach os : glib_os
+ glib_os_defines += '#define @0@'.format(os)
+endforeach
+glibconfig_conf.set('glib_os', '\n'.join(glib_os_defines))
# We need to know the CRT being used to determine what .lib files we need on
# Visual Studio for dependencies that don't normally come with pkg-config files
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]