diff mbox series

libtraceevent: add libdl dependency to meson

Message ID 20240107230753.461368-1-giulio.benetti@benettiengineering.com (mailing list archive)
State Accepted
Commit ce0acec384c8b9cd3859291362272107c24fb20e
Headers show
Series libtraceevent: add libdl dependency to meson | expand

Commit Message

Giulio Benetti Jan. 7, 2024, 11:07 p.m. UTC
Libdl is mandatory since it's used by plugins, so let's add it to meson to
prevent build failure where -ldl is not implicit.

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
---
 src/meson.build | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/src/meson.build b/src/meson.build
index 20b1b7b..cd48de7 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -13,10 +13,14 @@  sources= [
    'trace-seq.c',
 ]
 
+cc = meson.get_compiler('c')
+dl_dep = cc.find_library('dl')
+
 libtraceevent = library(
     'traceevent',
     sources,
     version: library_version,
+    dependencies: [dl_dep],
     include_directories: [incdir],
     install: true)