FUCHSIA: meson: add platforms 'none'

This is used when building for Fuchsia, which doesn't offer SDK
support for Vulkan WSI.

Change-Id: Id3ccbbfdfb8b5c0c14fca8dec52d1f5a6e1f5ac0
This commit is contained in:
C Stout 2024-06-24 17:35:40 -06:00
parent 5e314d38bd
commit 5df8d74bed
3 changed files with 11 additions and 3 deletions

View file

@ -384,6 +384,10 @@ with_platform_x11 = _platforms.contains('x11')
with_platform_wayland = _platforms.contains('wayland')
with_platform_haiku = _platforms.contains('haiku')
with_platform_windows = _platforms.contains('windows')
with_platform_none = _platforms.contains('none')
if with_platform_none and _platforms.length() > 1
error('Platforms cannot be combined with \'none\'')
endif
with_glx = get_option('glx')
if with_glx == 'auto'

View file

@ -12,7 +12,7 @@ option(
type : 'array',
value : ['auto'],
choices : [
'auto', 'x11', 'wayland', 'haiku', 'android', 'windows',
'auto', 'x11', 'wayland', 'haiku', 'android', 'windows', 'none',
],
description : 'window systems to support. If this is set to `auto`, all ' +
'platforms applicable will be enabled.'

View file

@ -1,10 +1,14 @@
# Copyright © 2017 Intel Corporation
# SPDX-License-Identifier: MIT
files_vulkan_wsi = files('wsi_common.c')
files_vulkan_wsi = []
links_vulkan_wsi = []
platform_deps = []
if not with_platform_none
files_vulkan_wsi += files('wsi_common.c')
endif
if dep_libdrm.found()
files_vulkan_wsi += files('wsi_common_drm.c')
endif
@ -25,7 +29,7 @@ endif
if with_platform_windows
files_vulkan_wsi += files('wsi_common_win32.cpp')
platform_deps += dep_dxheaders
else
elif not with_platform_none
files_vulkan_wsi += files('wsi_common_headless.c')
endif