meson: Use new has_tools kwarg to avoid unnecessary lrelease dependency

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7937>
This commit is contained in:
Nirbheek Chauhan 2024-11-21 15:45:24 +05:30 committed by GStreamer Marge Bot
parent 6bcedb0d8b
commit 3540b33597
2 changed files with 12 additions and 2 deletions

View file

@ -42,7 +42,12 @@ if not add_languages('cpp', native: false, required: qt5_option)
endif
qt5_mod = import('qt5')
if not qt5_mod.has_tools(method: qt5_method)
if meson.version().version_compare('>=1.6')
have_tools = qt5_mod.has_tools(method: qt5_method, tools: ['moc', 'uic', 'rcc'])
else
have_tools = qt5_mod.has_tools(method: qt5_method)
endif
if not have_tools
if qt5_option.enabled()
error('qt5 qmlglsink plugin is enabled, but qt specific tools were not found')
endif

View file

@ -48,7 +48,12 @@ if not add_languages('cpp', native: false, required: qt6_option)
endif
qt6_mod = import('qt6')
if not qt6_mod.has_tools(method: qt6_method)
if meson.version().version_compare('>=1.6')
have_tools = qt6_mod.has_tools(method: qt6_method, tools: ['moc', 'uic', 'rcc'])
else
have_tools = qt6_mod.has_tools(method: qt6_method)
endif
if not have_tools
if qt6_option.enabled()
error('qt6 qmlglsink plugin is enabled, but qt specific tools were not found')
endif