tests/meson: Set the version number for the dummy libraries.

Add a "version" parameter to the dummy libraries instead of using a separate cp
command.
This commit is contained in:
Kyle Brenneman 2019-12-09 07:25:17 -07:00
parent 793a772d3f
commit c1c9a00c19

View file

@ -40,41 +40,21 @@ if with_glx
include_directories : [inc_dispatch, inc_glx, inc_include],
link_with: [libpatchentrypoints],
dependencies : [idep_trace, idep_utils_misc, dep_x11],
)
# The ICD loader expects to load a .so.0, but meson generates the .X.Y.Z
# links at install time, the build time directories only have the plain .so
# files, so we copy the .so to .so.0 so tests will work
custom_target(
'GLX_dummy.so.0',
input : [libGLX_dummy],
output : 'libGLX_dummy.so.0',
command : [prog_cp, '@INPUT@', '@OUTPUT@'],
build_by_default : true,
version : '0',
)
endif
if get_option('egl')
foreach v : ['0', '1']
_lib = shared_library(
shared_library(
'EGL_dummy' + v,
['EGL_dummy.c'],
c_args : ['-DDUMMY_VENDOR_NAME="dummy@0@"'.format(v)],
include_directories : [inc_include],
link_with: [libpatchentrypoints],
dependencies : [idep_glvnd_pthread],
version : '0',
)
set_variable('libEGL_dummy' + v, _lib)
# see The comment in the with_glx block
custom_target(
'EGL_dummy@0@.so.0'.format(v),
input : _lib,
output : 'libEGL_dummy@0@.so.0'.format(v),
command : [prog_cp, '@INPUT@', '@OUTPUT@'],
build_by_default : true,
)
endforeach
endif