meson: Improve Qt examples

Qt dependencies have been moved to the main build file where the
rest of dependencies are located. This makes it easier to find them.

The included directories has also reviewed and removed the
unnecessary ones.
This commit is contained in:
Iñigo Martínez 2019-09-11 13:00:54 +02:00 committed by Thomas Haller
parent da40a6597f
commit 700f6f6b5f
2 changed files with 8 additions and 10 deletions

View file

@ -4,18 +4,11 @@ examples = [
['change-ipv4-addresses', []],
]
incs = [
top_inc,
libnm_core_inc,
]
qt_core_dep = dependency('QtCore', version: '>= 4')
deps = [
dbus_dep,
qt_core_dep,
dependency('QtDBus'),
dependency('QtNetwork'),
qt_dbus_dep,
qt_network_dep,
]
moc = find_program('moc-qt4', required: false)
@ -39,7 +32,7 @@ foreach example: examples
executable(
example[0],
example[0] + '.cpp',
include_directories: incs,
include_directories: libnm_core_inc,
dependencies: deps,
link_depends: example[1],
)

View file

@ -840,6 +840,11 @@ subdir('examples/C/glib')
enable_qt = get_option('qt')
if enable_qt
add_languages('cpp')
qt_core_dep = dependency('QtCore', version: '>= 4')
qt_dbus_dep = dependency('QtDBus')
qt_network_dep = dependency('QtNetwork')
subdir('examples/C/qt')
endif