meson: Do not warn when a windowing system is not found
authorNirbheek Chauhan <nirbheek@centricular.com>
Wed, 1 Jul 2020 02:05:08 +0000 (07:35 +0530)
committerNirbheek Chauhan <nirbheek@centricular.com>
Sat, 12 Sep 2020 18:22:09 +0000 (23:52 +0530)
Error out when the vulkan option is enabled, and just print
a message() otherwise. This is more correct and also allows us to pass
--fatal-meson-warnings more reliably.

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

gst-libs/gst/vulkan/meson.build

index f368838..5e315dd 100644 (file)
@@ -265,7 +265,11 @@ if host_system == 'android'
 endif
 
 if not vulkan_windowing
-  warning('No Windowing system found.  vulkansink will not work')
+  if get_option('vulkan').enabled()
+    error('No Windowing system found. vulkansink will not work')
+  else
+    message('No Windowing system found. vulkansink will not work')
+  endif
 endif
 
 # Only needed for the vulkan plugin, but doesn't make sense to build