meson: if dep_dl is an empty list, it's not a dependency object

It's ok to use an empty list for dependencies:, but it's not ok to try to
use the found() method of it.

See also https://github.com/mesonbuild/meson/issues/2324

Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
This commit is contained in:
Jon Turney 2017-11-13 10:13:54 +00:00
parent 7c25578863
commit 7df9a3609a

View file

@ -922,7 +922,7 @@ endif
if dep_m.found()
gl_priv_libs += '-lm'
endif
if dep_dl.found()
if dep_dl != [] and dep_dl.found()
gl_priv_libs += '-ldl'
endif