mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-03 07:50:31 +01:00
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:
parent
da40a6597f
commit
700f6f6b5f
2 changed files with 8 additions and 10 deletions
|
|
@ -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],
|
||||
)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue