1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2024-11-18 13:54:36 -05:00

configure.ac,meson: Define GLIB_VERSION_{MIN_REQUIRED,MAX_ALLOWED}

Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
This commit is contained in:
Quentin Glidic 2019-04-19 10:15:06 +02:00
parent 4224614115
commit c33543f5ca
No known key found for this signature in database
GPG key ID: AC203F96E2C34BB7
2 changed files with 13 additions and 2 deletions

View file

@ -120,8 +120,13 @@ PKG_PROG_PKG_CONFIG
dnl --------------------------------------------------------------------- dnl ---------------------------------------------------------------------
dnl PKG_CONFIG based dependencies dnl PKG_CONFIG based dependencies
dnl --------------------------------------------------------------------- dnl ---------------------------------------------------------------------
glib_min_major="2"
glib_min_minor="40"
glib_min_version="${glib_min_major}.${glib_min_minor}"
NK_INIT([bindings xdg-theme]) NK_INIT([bindings xdg-theme])
PKG_CHECK_MODULES([glib], [glib-2.0 >= 2.40 gio-unix-2.0 gmodule-2.0]) PKG_CHECK_MODULES([glib], [glib-2.0 >= ${glib_min_version} gio-unix-2.0 gmodule-2.0])
AC_DEFINE_UNQUOTED([GLIB_VERSION_MIN_REQUIRED], [(G_ENCODE_VERSION(${glib_min_major},${glib_min_minor}))], [The lower GLib version supported])
AC_DEFINE_UNQUOTED([GLIB_VERSION_MAX_ALLOWED], [(G_ENCODE_VERSION(${glib_min_major},${glib_min_minor}))], [The highest GLib version supported])
GW_CHECK_XCB([xcb-aux xcb-xkb xkbcommon xkbcommon-x11 xcb-ewmh xcb-icccm xcb-xrm xcb-randr xcb-xinerama]) GW_CHECK_XCB([xcb-aux xcb-xkb xkbcommon xkbcommon-x11 xcb-ewmh xcb-icccm xcb-xrm xcb-randr xcb-xinerama])
PKG_CHECK_MODULES([pango], [pango pangocairo]) PKG_CHECK_MODULES([pango], [pango pangocairo])
PKG_CHECK_MODULES([cairo], [cairo cairo-xcb]) PKG_CHECK_MODULES([cairo], [cairo cairo-xcb])

View file

@ -31,8 +31,11 @@ endforeach
plugindir = join_paths(get_option('libdir'), meson.project_name()) plugindir = join_paths(get_option('libdir'), meson.project_name())
themedir = join_paths(get_option('datadir'), meson.project_name(), 'themes') themedir = join_paths(get_option('datadir'), meson.project_name(), 'themes')
glib_min_major=2
glib_min_minor=40
glib_min_version='@0@.@1@'.format(glib_min_major, glib_min_minor)
plugins_deps = [ plugins_deps = [
dependency('glib-2.0', version: '>= 2.40'), dependency('glib-2.0', version: '>= @0@'.format(glib_min_version)),
dependency('gmodule-2.0'), dependency('gmodule-2.0'),
dependency('cairo'), dependency('cairo'),
] ]
@ -77,6 +80,9 @@ header_conf.set('_GNU_SOURCE', true)
header_conf.set('USE_NK_GIT_VERSION', true) header_conf.set('USE_NK_GIT_VERSION', true)
header_conf.set('GLIB_VERSION_MIN_REQUIRED', '(G_ENCODE_VERSION(@0@,@1@))'.format(glib_min_major, glib_min_minor))
header_conf.set('GLIB_VERSION_MAX_ALLOWED', '(G_ENCODE_VERSION(@0@,@1@))'.format(glib_min_major, glib_min_minor))
header_conf.set('ENABLE_DRUN', get_option('drun')) header_conf.set('ENABLE_DRUN', get_option('drun'))
header_conf.set('WINDOW_MODE', get_option('window')) header_conf.set('WINDOW_MODE', get_option('window'))
header_conf.set('TIMINGS', get_option('timings')) header_conf.set('TIMINGS', get_option('timings'))