From 7f6563176fa7aaa5a2241af1a741e761e14f2292 Mon Sep 17 00:00:00 2001 From: Ebrahim Date: Wed, 18 Nov 2026 23:06:25 +0330 Subject: [PATCH] meson: honor default_library The Meson shim delegates to the CMake build without forwarding the requested library type, so default_library=static still produced shared libraries. Forward the requested type: BUILD_SHARED_LIBS=OFF for static, ON for shared. Assisted-by: deepseek-harness:deepseek-flash --- meson.build | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/meson.build b/meson.build index d7867cb4e..294ecf844 100644 --- a/meson.build +++ b/meson.build @@ -4,6 +4,11 @@ cmake = import('cmake') hidapi_build_options = cmake.subproject_options() hidapi_build_options.set_install(true) +if get_option('default_library') == 'static' + hidapi_build_options.add_cmake_defines({'BUILD_SHARED_LIBS': 'OFF'}) +elif get_option('default_library') == 'shared' + hidapi_build_options.add_cmake_defines({'BUILD_SHARED_LIBS': 'ON'}) +endif hidapi_build = cmake.subproject('hidapi_build_cmake', options: hidapi_build_options)