Set the stem of library names instead of the name_prefix

This is necessary for compatibility with Meson's pkg module, which
generates pkg-config metadata containing "-lNAME" where NAME is the
first argument to shared_library(). Changing the name_prefix parameter
would break that.

Conversely, including .dll or .so in the first parameter would also
break that, so remove the `+dll_ext` part (in practice this is not a
functional change, because `dll_ext` is always set to an empty string).

Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
Simon McVittie 2023-03-31 15:01:43 +01:00 committed by Ethan Lee
parent 99b47b5548
commit 99c65c7ccd
5 changed files with 6 additions and 11 deletions

View File

@ -54,7 +54,7 @@ dep_displayinfo = dependency(
)
if platform == 'windows'
dxvk_so_version = {}
dxvk_so_version = {'name_prefix': ''}
compiler_args += [
'-DNOMINMAX',
@ -145,7 +145,7 @@ else
error('SDL2 or GLFW are required to build dxvk-native')
endif
dxvk_name_prefix = 'libdxvk_'
dxvk_name_prefix = 'dxvk_'
link_args += [
'-static-libgcc',
@ -161,7 +161,6 @@ add_project_link_arguments(cpp.get_supported_link_arguments(link_args), language
add_project_link_arguments(cc.get_supported_link_arguments(link_args), language: 'c')
exe_ext = ''
dll_ext = ''
def_spec_ext = '.def'
glsl_compiler = find_program('glslang', 'glslangValidator')

View File

@ -15,8 +15,7 @@ else
d3d10_d3d11_dep = d3d11_dep
endif
d3d10_core_dll = shared_library('d3d10core'+dll_ext, d3d10_core_src, d3d10_core_res,
name_prefix : dxvk_name_prefix,
d3d10_core_dll = shared_library(dxvk_name_prefix+'d3d10core', d3d10_core_src, d3d10_core_res,
dependencies : [ d3d10_d3d11_dep ],
include_directories : dxvk_include_path,
install : true,

View File

@ -77,9 +77,8 @@ else
d3d11_dxgi_dep = dxgi_dep
endif
d3d11_dll = shared_library('d3d11'+dll_ext, dxgi_common_src + d3d11_src + d3d10_src,
d3d11_dll = shared_library(dxvk_name_prefix+'d3d11', dxgi_common_src + d3d11_src + d3d10_src,
glsl_generator.process(d3d11_shaders), d3d11_res,
name_prefix : dxvk_name_prefix,
dependencies : [ d3d11_dxgi_dep, dxbc_dep, dxvk_dep ],
include_directories : dxvk_include_path,
install : true,

View File

@ -57,8 +57,7 @@ if platform != 'windows'
d3d9_link_depends += files('d3d9.sym')
endif
d3d9_dll = shared_library('d3d9'+dll_ext, d3d9_src, glsl_generator.process(d3d9_shaders), d3d9_res,
name_prefix : dxvk_name_prefix,
d3d9_dll = shared_library(dxvk_name_prefix+'d3d9', d3d9_src, glsl_generator.process(d3d9_shaders), d3d9_res,
dependencies : [ dxso_dep, dxvk_dep ],
include_directories : dxvk_include_path,
install : true,

View File

@ -21,8 +21,7 @@ if platform != 'windows'
dxgi_link_depends += files('dxgi.sym')
endif
dxgi_dll = shared_library('dxgi'+dll_ext, dxgi_src, dxgi_res,
name_prefix : dxvk_name_prefix,
dxgi_dll = shared_library(dxvk_name_prefix+'dxgi', dxgi_src, dxgi_res,
dependencies : [ dxvk_dep ],
include_directories : dxvk_include_path,
install : true,