summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Davenport <qball@blame.services>2022-11-15 17:18:51 +0100
committerDave Davenport <qball@blame.services>2022-11-15 17:18:51 +0100
commit53391da45a63301f651d8e004294387e3430f34b (patch)
tree7bee77c3083eb0c9117eee4ea68f09b5ff3fd26d
parent690924c270845119499909aba94196c321494b91 (diff)
[Build] Add option to disable imdkit at compile time.
Issue: #1742
-rw-r--r--configure.ac6
-rw-r--r--meson.build32
-rw-r--r--meson_options.txt1
3 files changed, 24 insertions, 15 deletions
diff --git a/configure.ac b/configure.ac
index 7da5465e..a84c8a36 100644
--- a/configure.ac
+++ b/configure.ac
@@ -146,10 +146,16 @@ PKG_CHECK_MODULES([glib], [glib-2.0 >= ${glib_min_version} gio-unix-2.0 gmod
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-cursor xcb-randr xcb-xinerama ])
+
+
+AC_ARG_ENABLE([imdkit], AS_HELP_STRING([--disable-imdkit], [Build with checks using check library (default: enabled)]))
+
+AS_IF([test "x${enable_imdkit}" != "xno"], [
PKG_CHECK_MODULES([imdclient], [xcb-imdkit <= 1.0.2 ],
[AC_DEFINE([XCB_IMDKIT_1_0_3_LOWER], [1], [Indicate lower version of imdclient])
AC_DEFINE([XCB_IMDKIT],[1], [IMD Kit missing])],
[PKG_CHECK_MODULES([imdclient], [xcb-imdkit >= 1.0.3],[AC_DEFINE([XCB_IMDKIT],[1], [IMD Kit missing])],[HAVE_IMDKIT=0])])
+])
PKG_CHECK_MODULES([pango], [pango pangocairo])
PKG_CHECK_MODULES([cairo], [cairo cairo-xcb])
PKG_CHECK_MODULES([libsn], [libstartup-notification-1.0 ])
diff --git a/meson.build b/meson.build
index ab6ba486..5aa3d483 100644
--- a/meson.build
+++ b/meson.build
@@ -74,25 +74,27 @@ deps += [
dependency('libstartup-notification-1.0'),
]
-imdkit_new = dependency('xcb-imdkit', version: '>= 1.0.3', required: false)
-imdkit_old = dependency('xcb-imdkit', version: '<= 1.0.2', required: false)
+header_conf = configuration_data()
+if get_option('imdkit')
+ imdkit_new = dependency('xcb-imdkit', version: '>= 1.0.3', required: false)
+ imdkit_old = dependency('xcb-imdkit', version: '<= 1.0.2', required: false)
+ if imdkit_new.found()
+ deps += imdkit_new
+ header_conf.set('XCB_IMDKIT_1_0_3_LOWER', false)
+ header_conf.set('XCB_IMDKIT', true)
+ elif imdkit_old.found()
+ deps+= imdkit_old
+ header_conf.set('XCB_IMDKIT_1_0_3_LOWER', true)
+ header_conf.set('XCB_IMDKIT', true)
+ else
+ header_conf.set('XCB_IMDKIT_1_0_3_LOWER', false)
+ header_conf.set('XCB_IMDKIT', false)
+ endif
+endif
check = dependency('check', version: '>= 0.11.0', required: get_option('check'))
-header_conf = configuration_data()
-if imdkit_new.found()
- deps += imdkit_new
- header_conf.set('XCB_IMDKIT_1_0_3_LOWER', false)
- header_conf.set('XCB_IMDKIT', true)
-elif imdkit_old.found()
- deps+= imdkit_old
- header_conf.set('XCB_IMDKIT_1_0_3_LOWER', true)
- header_conf.set('XCB_IMDKIT', true)
-else
- header_conf.set('XCB_IMDKIT_1_0_3_LOWER', false)
- header_conf.set('XCB_IMDKIT', false)
-endif
header_conf.set_quoted('PACKAGE_NAME', meson.project_name())
diff --git a/meson_options.txt b/meson_options.txt
index 08fb0de0..9ca68fc6 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,3 +1,4 @@
option('drun', type: 'boolean', value: true, description: 'Desktop file mode')
option('window', type: 'boolean', value: true, description: 'Window switcher mode')
option('check', type: 'feature', description: 'Build and run libcheck-based tests')
+option('imdkit', type: 'boolean', value: true, description: 'IMDKit support')