gbm: replace NULL sentinel with explicit ARRAY_SIZE()
[mesa.git] / src / gbm / meson.build
index 719f9c1a9b8a59bbbe414d9ad82e107d49ab0c82..311bcc74efc2affcd11ed2e2d1703ff1343dc50f 100644 (file)
@@ -37,7 +37,6 @@ incs_gbm = [
 if with_dri2
   files_gbm += files('backends/dri/gbm_dri.c', 'backends/dri/gbm_driint.h')
   deps_gbm += dep_libdrm # TODO: pthread-stubs
-  args_gbm += '-DDEFAULT_DRIVER_DIR="@0@"'.format(dri_search_path)
 endif
 if with_platform_wayland
   deps_gbm += dep_wayland_server
@@ -50,8 +49,8 @@ libgbm = shared_library(
   include_directories : incs_gbm,
   c_args : [c_vis_args, args_gbm],
   link_args : [ld_args_gc_sections],
-  link_with : [libloader, libmesa_util, libxmlconfig],
-  dependencies : [deps_gbm, dep_dl, dep_thread],
+  link_with : libloader,
+  dependencies : [deps_gbm, dep_dl, dep_thread, idep_mesautil, idep_xmlconfig],
   version : '1.0.0',
   install : true,
 )
@@ -67,11 +66,15 @@ pkg.generate(
   libraries_private : '-ldl',  # FIXME: autotools lists this a incomplete
 )
 
-if with_tests
+if with_tests and prog_nm.found()
   test(
     'gbm-symbols-check',
-    find_program('gbm-symbols-check'),
-    env : env_test,
-    args : libgbm
+    symbols_check,
+    args : [
+      '--lib', libgbm,
+      '--symbols-file', files('gbm-symbols.txt'),
+      '--nm', prog_nm.path(),
+    ],
+    suite : ['gbm'],
   )
 endif