From 925f6cfcb158ba8accdb3f2bcb7ad6eb0bea1fa3 Mon Sep 17 00:00:00 2001 From: Ebrahim Date: Wed, 18 Nov 2026 23:06:25 +0330 Subject: [PATCH] meson: honor default_library=static The Meson shim delegates to the CMake build without forwarding the requested library type, so default_library=static still produced shared libraries. Forward BUILD_SHARED_LIBS=OFF when static is requested; the default shared build is unchanged. --- meson.build | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meson.build b/meson.build index d7867cb4e..0e1cfad71 100644 --- a/meson.build +++ b/meson.build @@ -4,6 +4,9 @@ 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'}) +endif hidapi_build = cmake.subproject('hidapi_build_cmake', options: hidapi_build_options)