From b954deff2071399ca941ffd719e762968f28feae Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Sun, 14 Aug 2022 03:33:57 +0300 Subject: meson: Use dependency() instead of find_library() where possible Usage of find_library() to find dependencies that libcamera needs to compile against can lead to the library being found even if the corresponding headers are not installed. This will then result in a compilation failure. Switch to dependency() for libdw, libunwind and lttng-ust to fix this, all three libraries come with a pkgconfig file that is usually installed by the distribution package that contains the library headers. Reported-by: Christian Rauch Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham Reviewed-by: Paul Elder --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'meson.build') diff --git a/meson.build b/meson.build index e8b81ad8..72919102 100644 --- a/meson.build +++ b/meson.build @@ -122,7 +122,7 @@ libcamera_includes = include_directories('include') py_modules = [] # Libraries used by multiple components -liblttng = cc.find_library('lttng-ust', required : get_option('tracing')) +liblttng = dependency('lttng-ust', required : get_option('tracing')) # Pipeline handlers # -- cgit v1.2.1