summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@gmail.com>2018-08-17 15:56:00 +0200
committerMatthias Vogelgesang <matthias.vogelgesang@gmail.com>2018-08-17 15:56:00 +0200
commite33d4f76c74cd16945138bd69287ab24faf9c561 (patch)
tree2c9bcd01cb23a7f8e99735613b698d4219b3290b /bin
parentf8b64ceea625df8bcddaa7310fe250349c5e5468 (diff)
downloaduca-e33d4f76c74cd16945138bd69287ab24faf9c561.tar.gz
uca-e33d4f76c74cd16945138bd69287ab24faf9c561.tar.bz2
uca-e33d4f76c74cd16945138bd69287ab24faf9c561.tar.xz
uca-e33d4f76c74cd16945138bd69287ab24faf9c561.zip
meson: do not require gtk
Diffstat (limited to 'bin')
-rw-r--r--bin/gui/meson.build44
1 files changed, 23 insertions, 21 deletions
diff --git a/bin/gui/meson.build b/bin/gui/meson.build
index f9cf238..eb2424d 100644
--- a/bin/gui/meson.build
+++ b/bin/gui/meson.build
@@ -1,29 +1,31 @@
cc = meson.get_compiler('c')
libm = cc.find_library('m')
-gtk_dep = dependency('gtk+-2.0')
+gtk_dep = dependency('gtk+-2.0', required: false)
gthread_dep = dependency('gthread-2.0')
-gnome = import('gnome')
+if gtk_dep.found()
+ gnome = import('gnome')
-resources = gnome.compile_resources(
- 'resources', 'uca-camera-control.gresource.xml',
- source_dir: '.',
- c_name: 'foo'
-)
+ resources = gnome.compile_resources(
+ 'resources', 'uca-camera-control.gresource.xml',
+ source_dir: '.',
+ c_name: 'foo'
+ )
-sources = [
- 'uca-camera-control.c',
- 'egg-histogram-view.c',
- 'egg-property-cell-renderer.c',
- 'egg-property-tree-view.c',
- resources
-]
+ sources = [
+ 'uca-camera-control.c',
+ 'egg-histogram-view.c',
+ 'egg-property-cell-renderer.c',
+ 'egg-property-tree-view.c',
+ resources
+ ]
-executable('uca-camera-control',
- sources: sources,
- include_directories: include_dir,
- dependencies: [libm, gtk_dep, gthread_dep],
- link_with: lib,
- install: true,
-)
+ executable('uca-camera-control',
+ sources: sources,
+ include_directories: include_dir,
+ dependencies: [libm, gtk_dep, gthread_dep],
+ link_with: lib,
+ install: true,
+ )
+endif