From daf6eabc960c9d8b9e566653ac2d302c69ebfdaf Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Tue, 30 Jul 2024 11:55:12 +0100 Subject: [PATCH] meson: link with libdl if it's not available in libc Fixes #1295 Signed-off-by: Yuxuan Shui --- src/meson.build | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/meson.build b/src/meson.build index d05ee95e98..ed8784306d 100644 --- a/src/meson.build +++ b/src/meson.build @@ -103,8 +103,13 @@ subdir('renderer') subdir('transition') subdir('utils') +dl_dep = [] +if not cc.has_function('dlopen') + dl_dep = [ cc.find_library('dl', required: true) ] +endif + picom = executable('picom', srcs, c_args: cflags, - dependencies: [ base_deps, deps, test_h_dep ], + dependencies: [ base_deps, deps, test_h_dep ] + dl_dep, install: true, include_directories: picom_inc, export_dynamic: true, gnu_symbol_visibility: 'hidden')