From db8ae5009d3f12d91c944b259133819143557e9d Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Mon, 10 Aug 2026 15:41:58 -0600 Subject: [PATCH] meson: gate MSVC-isms on argument syntax, not compiler id clang-cl reports cc.get_id() == 'clang-cl', so it falls through both 'msvc' checks: it loses the __declspec(dllexport) export define, and it tries to find a libm that does not exist on Windows, which is a hard failure since the lookup is required. get_argument_syntax() is 'msvc' for both cl and clang-cl and 'gcc' otherwise, so this is a no-op for existing configurations. --- meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 24f9ef01b..51acbc407 100644 --- a/meson.build +++ b/meson.build @@ -49,7 +49,7 @@ endif build_shared = get_option('default_library') == 'shared' -if cc.get_id() == 'msvc' +if cc.get_argument_syntax() == 'msvc' if build_shared cc_export_define = '__declspec(dllexport) extern' else @@ -77,7 +77,7 @@ gudev_dep = dependency ('gudev-1.0', required: get_option('v4l2')) aravis_public_dependencies = [glib_dep, gobject_dep, gio_dep] aravis_dependencies = [aravis_public_dependencies, xml2_dep, libz_dep, gmodule_dep] -if cc.get_id()!='msvc' +if cc.get_argument_syntax()!='msvc' libm = cc.find_library ('m', required: true) aravis_dependencies += libm endif