[gtk+] build: Add the appropriate paths in the configuration header
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] build: Add the appropriate paths in the configuration header
- Date: Wed, 3 May 2017 14:30:01 +0000 (UTC)
commit 8582f80391ec2b416790682ddbf6e165f9cf5c54
Author: Emmanuele Bassi <ebassi gnome org>
Date: Tue Apr 18 14:22:23 2017 +0100
build: Add the appropriate paths in the configuration header
Instead of injecting them into the C compiler arguments.
config.h.meson | 2 ++
gtk/meson.build | 9 ++++-----
meson.build | 2 ++
3 files changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/config.h.meson b/config.h.meson
index 158907f..b1f286b 100644
--- a/config.h.meson
+++ b/config.h.meson
@@ -277,6 +277,8 @@
/* Define to 1 if linux/memfd.h exists */
#mesondefine HAVE_LINUX_MEMFD_H
+#mesondefine GTK_SYSCONFDIR
+
#mesondefine GTK_LOCALEDIR
#mesondefine GTK_DATADIR
diff --git a/gtk/meson.build b/gtk/meson.build
index 14c181b..54fe86a 100644
--- a/gtk/meson.build
+++ b/gtk/meson.build
@@ -756,17 +756,16 @@ gtkversion = configure_file(
input : 'gtkversion.h.in',
output : 'gtkversion.h',
configuration: gtkversion_cdata,
- install_dir: 'include/gtk-4.0/gtk/'
+ install_dir: 'include/gtk-4.0/gtk'
)
gtk_cargs = [
'-DGTK_COMPILATION',
'-DG_LOG_DOMAIN="Gtk"',
'-DGTK_PRINT_BACKEND_ENABLE_UNSUPPORTED',
- '-DGTK_BINARY_VERSION="' + gtk_binary_version + '"',
- '-DGTK_HOST="' + host_machine.system() + '"',
- '-DGTK_SYSCONFDIR="' + get_option('sysconfdir') + '"',
- '-DGTK_DATA_PREFIX="'+ get_option('prefix') + '"',
+ '-DGTK_BINARY_VERSION="@0@"'.format(gtk_binary_version),
+ '-DGTK_HOST="@0@"'.format(host_machine.system()),
+ '-DGTK_DATA_PREFIX="@0@"'.format(gtk_prefix),
]
gtk_gen_headers = [gtkmarshal_h, gtktypebuiltins_h, gtkprivatetypebuiltins_h, gtkversion]
diff --git a/meson.build b/meson.build
index 9633d02..fef52f2 100644
--- a/meson.build
+++ b/meson.build
@@ -81,6 +81,7 @@ gtk_prefix = get_option('prefix')
gtk_libdir = join_paths(gtk_prefix, get_option('libdir'))
gtk_datadir = join_paths(gtk_prefix, get_option('datadir'))
gtk_localedir = join_paths(gtk_prefix, get_option('localedir'))
+gtk_sysconfdir = join_paths(gtk_prefix, get_option('sysconfdir'))
cc = meson.get_compiler('c')
@@ -89,6 +90,7 @@ cdata.set_quoted('PACKAGE_VERSION', meson.project_version())
cdata.set_quoted('GTK_LOCALEDIR', gtk_localedir)
cdata.set_quoted('GTK_DATADIR', gtk_datadir)
cdata.set_quoted('GTK_LIBDIR', gtk_libdir)
+cdata.set_quoted('GTK_SYSCONFDIR', gtk_sysconfdir)
cdata.set_quoted('GETTEXT_PACKAGE', 'gtk40')
cdata.set('GTK_MAJOR_VERSION', gtk_major_version)
cdata.set('GTK_MINOR_VERSION', gtk_minor_version)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]