Follow libGL and only include -ldl in gbm pkg-config file if libdl was
actually found. Many systems have these functions in libc and don't
have libdl.
Fixes: 816bf7d1644 ("meson: build gbm")
Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5630>
gl_priv_libs += '-ldl'
endif
+# FIXME: autotools lists this as incomplete
+gbm_priv_libs = []
+if dep_dl.found()
+ gbm_priv_libs += '-ldl'
+endif
+
pkg = import('pkgconfig')
if host_machine.system() == 'windows'
description : 'Mesa gbm library',
version : meson.project_version(),
libraries : libgbm,
- libraries_private : '-ldl', # FIXME: autotools lists this a incomplete
+ libraries_private : gbm_priv_libs,
)
if with_symbols_check