[gtk/wip/baedert/for-master] build: Do not look for vulkan if explicitly disabled
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/baedert/for-master] build: Do not look for vulkan if explicitly disabled
- Date: Wed, 2 Sep 2020 04:10:12 +0000 (UTC)
commit a134ec11cbe539c69947c9a1e8b988cd768d890b
Author: Timm Bäder <mail baedert org>
Date: Wed Sep 2 06:09:24 2020 +0200
build: Do not look for vulkan if explicitly disabled
Fixes #3108
meson.build | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/meson.build b/meson.build
index 8fe92ec959..dc5d49f04b 100644
--- a/meson.build
+++ b/meson.build
@@ -648,23 +648,30 @@ if os_unix
endif
# Check for Vulkan support
+message('vulkan enabled: @0@'.format(get_option('vulkan').enabled()))
vulkan_dep = dependency('vulkan', required: get_option('vulkan'))
-if vulkan_dep.found()
+if get_option('vulkan').enabled() and vulkan_dep.found()
have_vulkan = true
vulkan_pkg_found = true
-else
+elif get_option('vulkan').auto()
have_vulkan = false
vulkan_pkg_found = false
+
if cc.get_id() == 'msvc'
vulkan_libname = 'vulkan-1'
else
vulkan_libname = 'vulkan'
endif
+
vulkan_dep = cc.find_library(vulkan_libname, required: false)
if vulkan_dep.found() and cc.has_function('vkCreateInstance', dependencies: vulkan_dep) and
cc.has_header('vulkan/vulkan.h')
have_vulkan = true
pc_gdk_extra_libs += ['-l@0@'.format(vulkan_libname)]
endif
+
+else
+ have_vulkan = false
+ vulkan_pkg_found = false
endif
cloudproviders_dep = dependency('cloudproviders',
@@ -862,7 +869,7 @@ summary('Display backends', display_backends)
summary('Print backends', print_backends)
summary('Media backends', media_backends)
-summary('Vulkan support', vulkan_dep.found(), section: 'Features')
+summary('Vulkan support', have_vulkan, section: 'Features')
summary('Cloud support', cloudproviders_dep.found(), section: 'Features')
summary('Sysprof support', libsysprof_capture_dep.found(), section: 'Features')
summary('Colord support', colord_dep.found(), section: 'Features')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]