meson: make nm binary optional
[mesa.git] / src / mapi / es1api / meson.build
index 657dc2d9eff35ed04ede1d2c67a65c79e159e9d8..53bdc16d94694476c93fa81976abe28db5e6798c 100644 (file)
 
 es1_glapi_mapi_tmp_h = custom_target(
   'es1_glapi_mapi_tmp.h',
-  input : [mapi_abi_py, gl_and_es_api_files],
+  input : [glapi_gen_mapi_py, glapi_gen_gl_xml],
   output : 'glapi_mapi_tmp.h',
-  command : [prog_python2, '@INPUT0@', '--printer', 'es1api', '@INPUT1@'],
-  depend_files : api_xml_files,
+  command : [prog_python, '@INPUT0@', 'glesv1', '@INPUT1@'],
+  depend_files : glapi_gen_mapi_deps,
   capture : true,
 )
 
 libglesv1_cm = shared_library(
-  'GLESv1_CM',
+  'GLESv1_CM' + get_option('gles-lib-suffix'),
   ['../entry.c', es1_glapi_mapi_tmp_h],
   c_args : [
     c_msvc_compat_args, c_vis_args, '-DMAPI_MODE_BRIDGE',
     '-DMAPI_ABI_HEADER="@0@"'.format(es1_glapi_mapi_tmp_h.full_path()),
+    gcc_lto_quirk,
   ],
   link_args : [ld_args_gc_sections],
   include_directories : [inc_src, inc_include, inc_mapi],
   link_with : libglapi,
   dependencies : [dep_thread, dep_libdrm, dep_m, dep_dl],
-  version : '1.0.0',
+  version : '1.1.0',
   install : true,
 )
 
@@ -51,11 +52,12 @@ pkg.generate(
   libraries_private : gl_priv_libs,
 )
 
-if with_tests
+if with_tests and prog_nm.found()
   test(
     'es1-ABI-check',
     find_program('ABI-check'),
     env : env_test,
-    args : libglesv1_cm
+    args : libglesv1_cm,
+    suite : ['mapi'],
   )
 endif