mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
build: Restructure vulkan dependency handling and assert headers
vulkan_headers was a workaround for distributions providing pkg-config information without the headers. Replacing it with a more conventional have_vulkan and assert header availability if the option vulkan is enabled.
This commit is contained in:
parent
82b2515af3
commit
6064e5087e
2 changed files with 9 additions and 4 deletions
|
|
@ -87,9 +87,14 @@ if get_option('spa-plugins').allowed()
|
||||||
endif
|
endif
|
||||||
jack_dep = dependency('jack', version : '>= 1.9.10', required: get_option('jack'))
|
jack_dep = dependency('jack', version : '>= 1.9.10', required: get_option('jack'))
|
||||||
summary({'JACK2': jack_dep.found()}, bool_yn: true, section: 'Backend')
|
summary({'JACK2': jack_dep.found()}, bool_yn: true, section: 'Backend')
|
||||||
vulkan_dep = dependency('vulkan', disabler : true, version : '>= 1.1.69', required: get_option('vulkan'))
|
|
||||||
vulkan_headers = cc.has_header('vulkan/vulkan.h', dependencies : vulkan_dep)
|
have_vulkan = false
|
||||||
#summary({'Vulkan': vulkan_headers}, bool_yn: true, section: 'Misc dependencies')
|
vulkan_dep = dependency('vulkan', version : '>= 1.1.69', required: get_option('vulkan'))
|
||||||
|
if vulkan_dep.found()
|
||||||
|
have_vulkan = cc.has_header('vulkan/vulkan.h', dependencies : vulkan_dep)
|
||||||
|
assert((not get_option('vulkan').enabled()) or have_vulkan, 'Vulkan headers are missing')
|
||||||
|
endif
|
||||||
|
summary({'Vulkan': have_vulkan}, bool_yn: true, section: 'Misc dependencies')
|
||||||
|
|
||||||
libcamera_dep = dependency('libcamera', required: get_option('libcamera'))
|
libcamera_dep = dependency('libcamera', required: get_option('libcamera'))
|
||||||
summary({'libcamera': libcamera_dep.found()}, bool_yn: true, section: 'Backend')
|
summary({'libcamera': libcamera_dep.found()}, bool_yn: true, section: 'Backend')
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ endif
|
||||||
if get_option('volume').allowed()
|
if get_option('volume').allowed()
|
||||||
subdir('volume')
|
subdir('volume')
|
||||||
endif
|
endif
|
||||||
if vulkan_headers
|
if have_vulkan
|
||||||
subdir('vulkan')
|
subdir('vulkan')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue