mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-20 10:54:16 +01:00
[build] MSVC check cleanup
This commit is contained in:
parent
aae889ccd9
commit
0367bf95c4
17
meson.build
17
meson.build
@ -5,15 +5,16 @@ cpu_family = target_machine.cpu_family()
|
||||
add_project_arguments('-DNOMINMAX', language : 'cpp')
|
||||
|
||||
dxvk_compiler = meson.get_compiler('cpp')
|
||||
dxvk_msvc=dxvk_compiler.get_id() == 'msvc'
|
||||
dxvk_is_msvc = dxvk_compiler.get_id() == 'msvc'
|
||||
|
||||
# c++17 was added in 15.3, older version needs c++latest
|
||||
if dxvk_compiler.get_id() == 'msvc' and dxvk_compiler.version().version_compare('<15.3')
|
||||
if dxvk_is_msvc and dxvk_compiler.version().version_compare('<15.3')
|
||||
dxvk_cpp_std='c++latest'
|
||||
else
|
||||
dxvk_cpp_std='c++17'
|
||||
endif
|
||||
|
||||
if dxvk_compiler.get_id() == 'msvc'
|
||||
if dxvk_is_msvc
|
||||
add_project_arguments('/std:' + dxvk_cpp_std, language : 'cpp')
|
||||
endif
|
||||
|
||||
@ -26,7 +27,7 @@ if dxvk_compiler.get_id() == 'clang'
|
||||
endif
|
||||
endif
|
||||
|
||||
if dxvk_compiler.get_id() != 'msvc'
|
||||
if not dxvk_is_msvc
|
||||
if get_option('build_id') and dxvk_compiler.has_link_argument('-Wl,--build-id')
|
||||
add_global_link_arguments('-Wl,--build-id', language: 'cpp')
|
||||
endif
|
||||
@ -48,7 +49,7 @@ endif
|
||||
|
||||
dxvk_extradep = [ ]
|
||||
|
||||
if dxvk_compiler.get_id() == 'msvc'
|
||||
if dxvk_is_msvc
|
||||
wrc = find_program('rc')
|
||||
else
|
||||
add_global_link_arguments('-static', '-static-libgcc', language: 'c')
|
||||
@ -82,7 +83,7 @@ lib_d3d11 = dxvk_compiler.find_library('d3d11')
|
||||
lib_dxgi = dxvk_compiler.find_library('dxgi')
|
||||
lib_d3dcompiler_43 = dxvk_compiler.find_library('d3dcompiler_43', dirs : dxvk_library_path)
|
||||
|
||||
if dxvk_compiler.get_id() == 'msvc'
|
||||
if dxvk_is_msvc
|
||||
lib_d3dcompiler_47 = dxvk_compiler.find_library('d3dcompiler')
|
||||
else
|
||||
lib_d3dcompiler_47 = dxvk_compiler.find_library('d3dcompiler_47')
|
||||
@ -91,7 +92,7 @@ endif
|
||||
exe_ext = ''
|
||||
dll_ext = ''
|
||||
|
||||
if dxvk_compiler.get_id() == 'msvc'
|
||||
if dxvk_is_msvc
|
||||
res_ext = '.res'
|
||||
else
|
||||
res_ext = '.o'
|
||||
@ -104,7 +105,7 @@ glsl_generator = generator(glsl_compiler,
|
||||
output : [ '@BASENAME@.h' ],
|
||||
arguments : [ '-V', '--vn', '@BASENAME@', '@INPUT@', '-o', '@OUTPUT@' ])
|
||||
|
||||
if dxvk_compiler.get_id() == 'msvc'
|
||||
if dxvk_is_msvc
|
||||
wrc_generator = generator(wrc,
|
||||
output : [ '@BASENAME@' + res_ext ],
|
||||
arguments : [ '/fo', '@OUTPUT@', '@INPUT@' ])
|
||||
|
@ -17,7 +17,7 @@ d3d10_core_dll = shared_library('d3d10core'+dll_ext, d3d10_core_src, d3d10_core_
|
||||
dependencies : [ d3d11_dep ],
|
||||
include_directories : dxvk_include_path,
|
||||
install : true,
|
||||
objects : not dxvk_msvc ? 'd3d10core'+def_spec_ext : [],
|
||||
objects : not dxvk_is_msvc ? 'd3d10core'+def_spec_ext : [],
|
||||
vs_module_defs : 'd3d10core'+def_spec_ext,
|
||||
override_options : ['cpp_std='+dxvk_cpp_std])
|
||||
|
||||
@ -31,7 +31,7 @@ d3d10_dll = shared_library('d3d10'+dll_ext, d3d10_main_src, d3d10_res,
|
||||
dependencies : [ d3d10_deps ],
|
||||
include_directories : dxvk_include_path,
|
||||
install : true,
|
||||
objects : not dxvk_msvc ? 'd3d10'+def_spec_ext : [],
|
||||
objects : not dxvk_is_msvc ? 'd3d10'+def_spec_ext : [],
|
||||
vs_module_defs : 'd3d10'+def_spec_ext,
|
||||
override_options : ['cpp_std='+dxvk_cpp_std])
|
||||
|
||||
@ -40,7 +40,7 @@ d3d10_1_dll = shared_library('d3d10_1'+dll_ext, d3d10_main_src, d3d10_1_res,
|
||||
dependencies : [ d3d10_deps ],
|
||||
include_directories : dxvk_include_path,
|
||||
install : true,
|
||||
objects : not dxvk_msvc ? 'd3d10_1'+def_spec_ext : [],
|
||||
objects : not dxvk_is_msvc ? 'd3d10_1'+def_spec_ext : [],
|
||||
vs_module_defs : 'd3d10_1'+def_spec_ext,
|
||||
override_options : ['cpp_std='+dxvk_cpp_std])
|
||||
|
||||
|
@ -63,7 +63,7 @@ d3d11_dll = shared_library('d3d11'+dll_ext, dxgi_common_src + d3d11_src + d3d10_
|
||||
dependencies : [ lib_dxgi, dxbc_dep, dxvk_dep ],
|
||||
include_directories : dxvk_include_path,
|
||||
install : true,
|
||||
objects : not dxvk_msvc ? 'd3d11'+def_spec_ext : [],
|
||||
objects : not dxvk_is_msvc ? 'd3d11'+def_spec_ext : [],
|
||||
vs_module_defs : 'd3d11'+def_spec_ext,
|
||||
override_options : ['cpp_std='+dxvk_cpp_std])
|
||||
|
||||
|
@ -46,7 +46,7 @@ d3d9_dll = shared_library('d3d9'+dll_ext, d3d9_src, glsl_generator.process(d3d9_
|
||||
dependencies : [ dxso_dep, dxvk_dep ],
|
||||
include_directories : dxvk_include_path,
|
||||
install : true,
|
||||
objects : not dxvk_msvc ? 'd3d9'+def_spec_ext : [],
|
||||
objects : not dxvk_is_msvc ? 'd3d9'+def_spec_ext : [],
|
||||
vs_module_defs : 'd3d9'+def_spec_ext,
|
||||
override_options : ['cpp_std='+dxvk_cpp_std])
|
||||
|
||||
|
@ -18,7 +18,7 @@ dxgi_dll = shared_library('dxgi'+dll_ext, dxgi_src, dxgi_res,
|
||||
include_directories : dxvk_include_path,
|
||||
install : true,
|
||||
vs_module_defs : 'dxgi'+def_spec_ext,
|
||||
objects : not dxvk_msvc ? 'dxgi'+def_spec_ext : [],
|
||||
objects : not dxvk_is_msvc ? 'dxgi'+def_spec_ext : [],
|
||||
override_options : ['cpp_std='+dxvk_cpp_std])
|
||||
|
||||
dxgi_dep = declare_dependency(
|
||||
|
Loading…
x
Reference in New Issue
Block a user