Commit 8582f803 authored by Emmanuele Bassi's avatar Emmanuele Bassi
Browse files

build: Add the appropriate paths in the configuration header

Instead of injecting them into the C compiler arguments.
parent 898bbb46
......@@ -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
......
......@@ -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]
......
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment