build: Use the appropriate quoting

There's no need for string concatenation.
This commit is contained in:
Emmanuele Bassi 2017-04-18 14:21:05 +01:00
parent 9105227b56
commit 898bbb4626
2 changed files with 11 additions and 7 deletions

View File

@ -765,8 +765,7 @@ gtk_cargs = [
'-DGTK_PRINT_BACKEND_ENABLE_UNSUPPORTED',
'-DGTK_BINARY_VERSION="' + gtk_binary_version + '"',
'-DGTK_HOST="' + host_machine.system() + '"',
'-DGTK_SYSCONFDIR="' + get_option('prefix') + '/etc"',
'-DGTK_DATADIR="' + get_option('datadir') + '"',
'-DGTK_SYSCONFDIR="' + get_option('sysconfdir') + '"',
'-DGTK_DATA_PREFIX="'+ get_option('prefix') + '"',
]

View File

@ -77,14 +77,19 @@ endif
os_unix = not os_win32
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'))
cc = meson.get_compiler('c')
cdata = configuration_data()
cdata.set('PACKAGE_VERSION', '"'+meson.project_version()+'"')
cdata.set('GTK_LOCALEDIR', '"'+get_option('localedir')+'"')
cdata.set('GTK_DATADIR', '"'+get_option('datadir')+'"')
cdata.set('GTK_LIBDIR', '"'+get_option('libdir')+'"')
cdata.set('GETTEXT_PACKAGE', '"gtk40"')
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('GETTEXT_PACKAGE', 'gtk40')
cdata.set('GTK_MAJOR_VERSION', gtk_major_version)
cdata.set('GTK_MINOR_VERSION', gtk_minor_version)
cdata.set('GTK_MICRO_VERSION', gtk_micro_version)