From 2e2826d121c1473da7c7ecd5031731e72fb71335 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Mon, 30 Jun 2025 17:01:40 +0000 Subject: [PATCH] meson: use .enable_if for intel tools dependency on expat Part-of: --- meson.build | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/meson.build b/meson.build index b291f349b6d..76bc4665d01 100644 --- a/meson.build +++ b/meson.build @@ -1585,7 +1585,8 @@ if dep_thread.found() endif with_expat = get_option('expat') \ - .disable_auto_if(with_platform_android or with_platform_windows) + .disable_auto_if(with_platform_android or with_platform_windows) \ + .enable_if(with_intel_tools, error_message : 'Intel tools require expat') if host_machine.system() == 'darwin' dep_expat = meson.get_compiler('c').find_library('expat', required : with_expat) @@ -1594,11 +1595,6 @@ else required : with_expat) endif -# TODO: with Meson 1.1.0 this can be replaced with with_expat.enable_if(with_intel_tools) -if with_intel_tools and not dep_expat.found() - error('Intel tools require expat') -endif - # We don't require expat on Android or Windows use_xmlconfig = get_option('xmlconfig') \ .require(not (with_platform_android or with_platform_windows),