From 81a0f1eca24b8605b9f2506122ff90db7129c39e Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 19 Oct 2020 12:28:17 -0700 Subject: [PATCH] meson: Only require libexpat when a part of the build needs it. Now that xmlconfig can be built without libexpat on Android, we can make android builds not require the presence of libexpat for many drivers. Reviewed-by: Kristian H. Kristensen Part-of: --- meson.build | 6 +++++- src/meson.build | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index f1e4118..a4aec17 100644 --- a/meson.build +++ b/meson.build @@ -276,6 +276,9 @@ with_freedreno_kgsl = get_option('freedreno-kgsl') with_broadcom_vk = _vulkan_drivers.contains('broadcom') with_any_vk = _vulkan_drivers.length() != 0 +with_any_broadcom = with_gallium_vc4 or with_gallium_v3d or with_broadcom_vk +with_any_intel = with_dri_i965 or with_intel_vk or with_gallium_iris + if with_swrast_vk and not with_gallium_softpipe error('swrast vulkan requires gallium swrast') endif @@ -1365,7 +1368,8 @@ if dep_thread.found() and host_machine.system() != 'windows' endif endif if host_machine.system() != 'windows' - dep_expat = dependency('expat', fallback : ['expat', 'expat_dep']) + dep_expat = dependency('expat', fallback : ['expat', 'expat_dep'], + required: not with_platform_android or with_any_broadcom or with_any_intel) else dep_expat = null_dep endif diff --git a/src/meson.build b/src/meson.build index b39ea7d..a175e33 100644 --- a/src/meson.build +++ b/src/meson.build @@ -73,7 +73,7 @@ endif if with_gallium_radeonsi or with_amd_vk subdir('amd') endif -if with_gallium_vc4 or with_gallium_v3d or with_broadcom_vk +if with_any_broadcom subdir('broadcom') endif if with_gallium_etnaviv @@ -88,7 +88,7 @@ endif if with_gallium_virgl subdir('virtio') endif -if with_dri_i965 or with_intel_vk or with_gallium_iris +if with_any_intel subdir('intel') endif subdir('mesa') -- 2.7.4