]> git.mdlowis.com Git - proto/labwc.git/commitdiff
build: fix build with libinput as a subproject
authortokyo4j <hrak1529@gmail.com>
Wed, 1 Oct 2025 12:09:17 +0000 (21:09 +0900)
committerHiroaki Yamamoto <hrak1529@gmail.com>
Sat, 11 Oct 2025 14:51:28 +0000 (23:51 +0900)
Unfortunately, has_header_symbol() doesn't work with internal dependencies.

Ref: https://github.com/mesonbuild/meson/issues/13553

meson.build

index d3ba14dac877503c38edd53f13452d368f8bca86..335bf629ca77d00e06ff9baf36833f3c8eea968c 100644 (file)
@@ -127,7 +127,9 @@ conf_data.set10('HAVE_RSVG', have_rsvg)
 conf_data.set10('HAVE_LIBSFDO', have_libsfdo)
 
 foreach sym : ['LIBINPUT_CONFIG_DRAG_LOCK_ENABLED_STICKY', 'LIBINPUT_CONFIG_3FG_DRAG_ENABLED_3FG']
-       conf_data.set10('HAVE_' + sym, cc.has_header_symbol('libinput.h', sym, dependencies: input))
+  has_sym = input.type_name() != 'internal' \
+              and cc.has_header_symbol('libinput.h', sym, dependencies: input)
+       conf_data.set10('HAVE_' + sym, has_sym)
 endforeach
 
 if get_option('static_analyzer').enabled()