finch/meson: fix build with -Dgtkui=false

Wed, 03 Jan 2018 15:40:46 +0100

author
Lubomir Rintel <lkundrak@v3.sk>
date
Wed, 03 Jan 2018 15:40:46 +0100
changeset 38863
ec525e2a86e3
parent 38849
20c80c3c31c5
child 38864
b149f0a61857

finch/meson: fix build with -Dgtkui=false

$ meson build -Dgtkui=false
...
Meson encountered an error in file finch/plugins/meson.build, line 2, column 1:
Unknown variable "x11".

finch/plugins/meson.build file | annotate | diff | comparison | revisions
--- a/finch/plugins/meson.build	Fri Dec 29 03:57:44 2017 +0000
+++ b/finch/plugins/meson.build	Wed Jan 03 15:40:46 2018 +0100
@@ -1,13 +1,15 @@
 if PLUGINS
-	gntclipboard = library('gntclipboard', 'gntclipboard.c',
-	    dependencies : [x11, libpurple_dep, libfinch_dep, glib],
-	    name_prefix : '',
-	    install : true, install_dir : FINCH_PLUGINDIR)
+	if ENABLE_GTK
+		gntclipboard = library('gntclipboard', 'gntclipboard.c',
+		    dependencies : [x11, libpurple_dep, libfinch_dep, glib],
+		    name_prefix : '',
+		    install : true, install_dir : FINCH_PLUGINDIR)
 
-	gntgf = library('gntgf', 'gntgf.c',
-	    dependencies : [x11, libpurple_dep, libfinch_dep, glib],
-	    name_prefix : '',
-	    install : true, install_dir : FINCH_PLUGINDIR)
+		gntgf = library('gntgf', 'gntgf.c',
+		    dependencies : [x11, libpurple_dep, libfinch_dep, glib],
+		    name_prefix : '',
+		    install : true, install_dir : FINCH_PLUGINDIR)
+	endif
 
 	gnthistory = library('gnthistory', 'gnthistory.c',
 	    dependencies : [libpurple_dep, libfinch_dep, glib],

mercurial