meson: Install dri.pc file when building gallium dri drivers
authorDylan Baker <dylan@pnwbakers.com>
Fri, 1 Dec 2017 22:01:40 +0000 (14:01 -0800)
committerDylan Baker <dylan@pnwbakers.com>
Mon, 4 Dec 2017 18:14:09 +0000 (10:14 -0800)
Currently this pkg-config file is only installed if a classic dri driver
is built. This is wrong, it should be installed if any dri driver is
installed, which includes the gallium dri target.

Reported-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
src/mesa/drivers/dri/meson.build

index 217f1e5c71cdcb7f4c3f9e8f3e5f18f7b3229a99..4ec2f343df286bf0ab434f92a4d8b63f75f9ba73 100644 (file)
@@ -53,6 +53,17 @@ if dri_drivers != []
     link_args : ['-Wl,--build-id=sha1', ld_args_bsymbolic, ld_args_gc_sections],
   )
 
+  meson.add_install_script(
+    join_paths(meson.source_root(), 'bin/install_megadrivers.py'),
+    libmesa_dri_drivers.full_path(),
+    dri_drivers_path,
+    dri_link,
+  )
+endif
+
+# This needs to be installed if any dri drivers (including gallium dri drivers)
+# are built.
+if with_dri
   pkg.generate(
     name : 'dri',
     filebase : 'dri',
@@ -61,11 +72,4 @@ if dri_drivers != []
     variables : ['dridriverdir=${prefix}/' + dri_drivers_path],
     requires_private : ['libdrm >= 2.4.75'],  # FIXME: don't hardcode this
   )
-
-  meson.add_install_script(
-    join_paths(meson.source_root(), 'bin/install_megadrivers.py'),
-    libmesa_dri_drivers.full_path(),
-    dri_drivers_path,
-    dri_link,
-  )
 endif