From 3cf58991d5a3d47203b8b6f6ac02b674aaf5c13b Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Sat, 7 Jul 2018 00:07:51 +0530 Subject: meson: Add not-found dependencies for conditional declared deps Instead of not defining the variable, or defining it to [], define it to the not-found dependency instead, so that when other projects (such as gtk+) are using pango as a subproject, they get a valid dependency object which tells them that the dependency cannot be found. --- pango/meson.build | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pango/meson.build b/pango/meson.build index 25b939f7..c44853de 100644 --- a/pango/meson.build +++ b/pango/meson.build @@ -233,6 +233,9 @@ if build_pangoft2 dependencies: pango_deps + [ libpango_dep ], sources: pangoft2_dep_sources, ) +else + # For usage as a subproject + libpangoft2_dep = dependency('', required : false) endif # Xft @@ -289,6 +292,9 @@ if xft_dep.found() dependencies: pango_deps + [ libpango_dep, libpangoft2_dep ], sources: pangoxft_dep_sources, ) +else + # For usage as a subproject + libpangoxft_dep = dependency('', required: false) endif # Win32 @@ -341,6 +347,9 @@ if host_system == 'windows' include_directories: root_inc, dependencies: pango_deps + [ libpango_dep ], ) +else + # For usage as a subproject + libpangowin32_dep = dependency('', required: false) endif # Cairo @@ -437,4 +446,7 @@ if cairo_dep.found() dependencies: pango_deps + [ libpango_dep ], sources: pangocairo_dep_sources, ) +else + # For usage as a subproject + libpangocairo_dep = dependency('', required: false) endif -- cgit v1.2.1