about summary refs log tree commit diff
path: root/examples/C/qt
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2018-04-23 18:01:04 +0200
committerMichael Biebl <biebl@debian.org>2018-04-23 18:01:04 +0200
commitd00e17d14b5df5f7fcba1a17f91edbb3180fbf64 (patch)
tree2b16542fff332a3c38fb2191f7ae4d4795f66451 /examples/C/qt
parent2e03b565aa24225ca4992797a5d563542b0b2bdd (diff)
parentf60117b41d5433be1b4a96d82cd11d0c3dce9b63 (diff)
Update upstream source from tag 'upstream/1.11.3'
Update to upstream version '1.11.3'
with Debian dir a3a34e6c602cb81e76dc3c255c617e7f7ecfc11c
Diffstat (limited to 'examples/C/qt')
-rw-r--r--examples/C/qt/meson.build47
1 files changed, 47 insertions, 0 deletions
diff --git a/examples/C/qt/meson.build b/examples/C/qt/meson.build
new file mode 100644
index 00000000..d92205b1
--- /dev/null
+++ b/examples/C/qt/meson.build
@@ -0,0 +1,47 @@
+examples = [
+  ['add-connection-wired', []],
+  ['list-connections', []],
+  ['change-ipv4-addresses', []]
+]
+
+incs = [
+  top_inc,
+  libnm_core_inc
+]
+
+qt_core_dep = dependency('QtCore', version: '>= 4')
+
+deps = [
+  dbus_dep,
+  dbus_glib_dep,
+  qt_core_dep,
+  dependency('QtDBus'),
+  dependency('QtNetwork')
+]
+
+moc = find_program('moc-qt4', required: false)
+if not moc.found()
+  moc = qt_core_dep.get_pkgconfig_variable('moc_location')
+endif
+
+example = 'monitor-nm-running'
+output = example + '.moc'
+
+example_moc = custom_target(
+  output,
+  input: example + '.cpp',
+  output: output,
+  command: [moc, '-i', '@INPUT@', '-o', '@OUTPUT@']
+)
+
+examples += [[example, [example_moc]]]
+
+foreach example: examples
+  executable(
+    example[0],
+    example[0] + '.cpp',
+    include_directories: incs,
+    dependencies: deps,
+    link_depends: example[1]
+  )
+endforeach