meson: don't use dl dependency on old meson

dl dependency was introduced with version 0.62.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev 2024-05-03 13:11:47 -07:00
parent 0160127fda
commit 4b2f250a5b

View File

@ -412,7 +412,11 @@ if want_modules == true
endif
if with_modules == false
dl_dep = dependency('dl', required: false)
if meson.version().version_compare('>=0.62')
dl_dep = dependency('dl', required: false)
else
dl_dep = cc.find_library('dl', required: false)
endif
if dl_dep.found()
config_h.set10('HAVE_DLOPEN', true)
xml_deps += dl_dep