From 5df8d74bed367258be581d5db0d14c68301bce40 Mon Sep 17 00:00:00 2001 From: C Stout Date: Mon, 24 Jun 2024 17:35:40 -0600 Subject: [PATCH] FUCHSIA: meson: add platforms 'none' This is used when building for Fuchsia, which doesn't offer SDK support for Vulkan WSI. Change-Id: Id3ccbbfdfb8b5c0c14fca8dec52d1f5a6e1f5ac0 --- meson.build | 4 ++++ meson_options.txt | 2 +- src/vulkan/wsi/meson.build | 8 ++++++-- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index 499ff7e64cb..0e75f2fbfbe 100644 --- a/meson.build +++ b/meson.build @@ -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' diff --git a/meson_options.txt b/meson_options.txt index d07c335a2e8..f5a6aa39e8f 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -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.' diff --git a/src/vulkan/wsi/meson.build b/src/vulkan/wsi/meson.build index f2b21306029..afaa1dcaf12 100644 --- a/src/vulkan/wsi/meson.build +++ b/src/vulkan/wsi/meson.build @@ -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