Skip to content

Commit

Permalink
build: remove complicated shaderc detection logic
Browse files Browse the repository at this point in the history
Meson does all of this internally since 0.51.0
  • Loading branch information
Akaricchi committed Dec 16, 2022
1 parent cd2d460 commit c575601
Showing 1 changed file with 1 addition and 21 deletions.
22 changes: 1 addition & 21 deletions src/renderer/common/shaderlib/meson.build
Expand Up @@ -10,27 +10,7 @@ r_shaderlib_libdeps = []

if get_option('shader_transpiler')
dep_spvc = dependency('spirv-cross-c-shared', required : true, static : static, fallback : ['SPIRV-Cross', 'spirv_cross_dep'])

if get_option('wrap_mode') != 'forcefallback'
dep_shaderc = dependency('shaderc', static : static, required : false)

if not dep_shaderc.found()
# Thanks, google.
# https://github.com/google/shaderc/issues/392
if static
dep_shaderc = cc.find_library('shaderc_combined', required : false)
else
dep_shaderc = cc.find_library('shaderc_shared', required : false)
endif
endif
if not dep_shaderc.found()
dep_shaderc = dependency('shaderc', static : static, fallback : ['shaderc', 'shaderc_dep'], required : true)
endif
else
dep_shaderc = dependency('shaderc', static : static, fallback : ['shaderc', 'shaderc_dep'], required : true)
endif

assert(dep_shaderc.found(), 'shaderc is required for the shader transpiler')
dep_shaderc = dependency('shaderc', static : static, fallback : ['shaderc', 'shaderc_dep'], required : true)

r_shaderlib_src += files(
'lang_spirv.c'
Expand Down

0 comments on commit c575601

Please sign in to comment.