meson: Add a qt5 feature
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Tue, 15 Sep 2020 18:15:36 +0000 (14:15 -0400)
committerNicolas Dufresne <nicolas.dufresne@collabora.com>
Tue, 15 Sep 2020 18:15:36 +0000 (14:15 -0400)
This allow opting out items of the builds the depends on QT5 library.
Auto-detection of QT5 in cross-build requires host tools to match with the
sysroot, and detection of mis-match is not fully reliable.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/817>

meson_options.txt
tests/examples/gl/qt/meson.build
tests/examples/overlay/meson.build

index bb3cb3c..7010b91 100644 (file)
@@ -79,6 +79,7 @@ option('glib-asserts', type : 'feature', value : 'enabled', yield : true,
        description: 'Enable GLib assertion (auto = enabled for development, disabled for stable releases)')
 option('glib-checks', type : 'feature', value : 'enabled', yield : true,
        description: 'Enable GLib checks such as API guards (auto = enabled for development, disabled for stable releases)')
+option('qt5', type : 'feature', value : 'auto', yield : true, description : 'Qt5 QML examples')
 
 # Common options
 option('package-name', type : 'string', yield : true,
index ed0a0b0..66f3d93 100644 (file)
@@ -1,3 +1,7 @@
+if get_option('qt5').disabled()
+  subdir_done()
+endif
+
 qt5_mod = import('qt5')
 
 qt5gui_dep = dependency('qt5', modules : ['Core', 'Gui', 'Widgets'], required : false)
index b343f65..926e9f3 100644 (file)
@@ -1,3 +1,7 @@
+if get_option('qt5').disabled()
+  subdir_done()
+endif
+
 if x11_dep.found()
   if gtk_x11_dep.found()
     executable('gtk-videooverlay', 'gtk-videooverlay.c',