meson: if dep_dl is an empty list, it's not a dependency object
authorJon Turney <jon.turney@dronecode.org.uk>
Mon, 13 Nov 2017 10:13:54 +0000 (10:13 +0000)
committerJon Turney <jon.turney@dronecode.org.uk>
Tue, 14 Nov 2017 12:00:25 +0000 (12:00 +0000)
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>
meson.build

index e8467590df27669f786245f8d32293071f7c3d25..1c4200705f3511d1036513974b7d3f7fc40d9045 100644 (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