meson: lift driver-collection out into parent build-file
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Mon, 15 Apr 2019 08:11:43 +0000 (10:11 +0200)
committerErik Faye-Lund <erik.faye-lund@collabora.com>
Thu, 2 May 2019 18:30:29 +0000 (18:30 +0000)
This way we can mark the dri_drivers and dri_link arrays as temporary,
as all knowledge about them are contained in a single build-file with
clearly visible limited life-span.

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Acked-by: Dylan Baker <dylan@pnwbakers.com>
src/mesa/drivers/dri/i915/meson.build
src/mesa/drivers/dri/i965/meson.build
src/mesa/drivers/dri/meson.build
src/mesa/drivers/dri/nouveau/meson.build
src/mesa/drivers/dri/r200/meson.build
src/mesa/drivers/dri/radeon/meson.build
src/mesa/drivers/dri/swrast/meson.build

index 1971419a6b718b6009613fb6874a14ebce327596..9e62010f2a2ae86b3c6084c1e0c4eec86111a9f5 100644 (file)
@@ -92,6 +92,3 @@ libi915 = static_library(
   cpp_args : [cpp_vis_args],
   dependencies : [dep_libdrm, dep_libdrm_intel],
 )
-
-dri_drivers += libi915
-dri_link += 'i915_dri.so'
index 3c3637dbebc66e9068587b1fed0021cf82a42868..04b477db58b61e91650cac624da2c988201bb56f 100644 (file)
@@ -162,6 +162,3 @@ libi965 = static_library(
   ],
   dependencies : [dep_libdrm, dep_valgrind, idep_nir_headers, idep_genxml],
 )
-
-dri_drivers += libi965
-dri_link += 'i965_dri.so'
index dddc4ae3dfd9b7ccab36bd65fccc859d2f6caafc..38f56998d697d303d0eb8c170f06a7a462d3e875 100644 (file)
 
 subdir('common')
 
-dri_drivers = []
-dri_link = []
+_dri_drivers = []
+_dri_link = []
 if with_dri_swrast
   subdir('swrast')
+  _dri_drivers += libswrast_dri
+  _dri_link += 'swrast_dri.so'
 endif
 if with_dri_i915
   subdir('i915')
+  _dri_drivers += libi915
+  _dri_link += 'i915_dri.so'
 endif
 if with_dri_i965
   subdir('i965')
+  _dri_drivers += libi965
+  _dri_link += 'i965_dri.so'
 endif
 if with_dri_r100
   subdir('radeon')
+  _dri_drivers += libr100
+  _dri_link += 'radeon_dri.so'
 endif
 if with_dri_r200
   subdir('r200')
+  _dri_drivers += libr200
+  _dri_link += 'r200_dri.so'
 endif
 if with_dri_nouveau
   subdir('nouveau')
+  _dri_drivers += libnouveau_vieux
+  _dri_link += 'nouveau_vieux_dri.so'
 endif
 
-if dri_drivers != []
+if _dri_drivers != []
   libmesa_dri_drivers = shared_library(
     'mesa_dri_drivers',
     [],
-    link_whole : dri_drivers,
+    link_whole : _dri_drivers,
     link_with : [
       libmegadriver_stub, libdricommon, libxmlconfig, libglapi, libmesa_util,
       libmesa_classic,
@@ -65,7 +77,7 @@ if dri_drivers != []
     join_paths(meson.source_root(), 'bin/install_megadrivers.py'),
     libmesa_dri_drivers.full_path(),
     dri_drivers_path,
-    dri_link,
+    _dri_link,
   )
 endif
 
index 9ad6779d85e3d21338eee9bde9c9ee3953069c57..c07d2a2be1358da601ca1124195e4bb1b03ec968 100644 (file)
@@ -87,6 +87,3 @@ libnouveau_vieux = static_library(
   cpp_args : [cpp_vis_args],
   dependencies : [dep_libdrm, dep_libdrm_nouveau],
 )
-
-dri_drivers += libnouveau_vieux
-dri_link += 'nouveau_vieux_dri.so'
index 8389b4f636086e1bb2328e87112c5cc216c68919..686054d162b0eef0ddace0102bc51ddc5205d0bf 100644 (file)
@@ -86,6 +86,3 @@ libr200 = static_library(
   cpp_args : [cpp_vis_args],
   dependencies : [dep_libdrm, dep_libdrm_radeon],
 )
-
-dri_drivers += libr200
-dri_link += 'r200_dri.so'
index bed608258a7ef107dbe61470e49564e0dbcf5951..83b356550ec4696c9ddcd1bfc7c7d24da214c3e5 100644 (file)
@@ -82,6 +82,3 @@ libr100 = static_library(
   cpp_args : [cpp_vis_args],
   dependencies : [dep_libdrm, dep_libdrm_radeon],
 )
-
-dri_drivers += libr100
-dri_link += 'radeon_dri.so'
index 5ceb1e33e3e911c9c506f8de87045e9afcd19cc1..35b30588ca704965707baec3b8782e44d2d65b41 100644 (file)
@@ -25,6 +25,3 @@ libswrast_dri = static_library(
   include_directories : [inc_common, inc_dri_common],
   dependencies : dep_libdrm,
 )
-
-dri_drivers += libswrast_dri
-dri_link += 'swrast_dri.so'