summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2018-03-15 13:30:22 -0700
committerDylan Baker <dylan@pnwbakers.com>2018-04-06 15:29:53 -0700
commitb5f92b6fd4e4ef0358fe464d951893de20048bf6 (patch)
treeb701b8208feac6431e752911020a6e2c93eeb656 /src/gallium/auxiliary
parent81ed629b385af62bbac2d7975986ea7ad4ed2d1a (diff)
meson: fix warnings about comparing unlike types
In the old days (0.42.x), when mesa's meson system was written the recommendation for handling conditional dependencies was to define them as empty lists. When meson would evaluate the dependencies of a target it would recursively flatten all of the arguments, and empty lists would be removed. There are some problems with this, among them that lists and dependencies have different methods (namely .found()), so the recommendation changed to use `dependency('', required : false)` for such cases. This has the advantage of providing a .found() method, so there is no need to do things like `dep_foo != [] and dep_foo.found()`, such a dependency should never exist. I've tested this with 0.42 (the minimum we claim to support) and 0.45. On 0.45 this removes warnings about comparing unlike types, such as: meson.build:1337: WARNING: Trying to compare values of different types (DependencyHolder, list) using !=. v2: - Use dependency('', required : false) instead of declare_dependency(), the later will always report that it is found, which is not what we want. Signed-off-by: Dylan Baker <dylan.c.baker@intel.com> Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r--src/gallium/auxiliary/meson.build2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/meson.build b/src/gallium/auxiliary/meson.build
index 5908f9c430..0108b0e756 100644
--- a/src/gallium/auxiliary/meson.build
+++ b/src/gallium/auxiliary/meson.build
@@ -339,7 +339,7 @@ files_libgallium = files(
'nir/tgsi_to_nir.h',
)
-if dep_libdrm != [] and dep_libdrm.found()
+if dep_libdrm.found()
files_libgallium += files(
'renderonly/renderonly.c',
'renderonly/renderonly.h',