Skip to content

Commit

Permalink
build: only directly link shaderc and spirv-cross on windows
Browse files Browse the repository at this point in the history
See 1b03540. This is only relevant if
you are using d3d11 on --vo=gpu which is windows-only. For all other
platforms, vulkan uses libplacebo which uses shaderc. mpv itself doesn't
need it in those cases.
  • Loading branch information
Dudemanguy committed Nov 28, 2023
1 parent 8f1f188 commit 60a31a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions meson.build
Expand Up @@ -939,7 +939,7 @@ if features['sdl2-video']
sources += files('video/out/vo_sdl.c')
endif

shaderc = dependency('shaderc', required: get_option('shaderc'))
shaderc = dependency('shaderc', required: get_option('shaderc').require(features['win32-desktop']))
features += {'shaderc': shaderc.found()}
if features['shaderc']
dependencies += shaderc
Expand All @@ -958,7 +958,7 @@ if features['posix']
features += {'posix-shm': cc.has_function('shm_open', prefix: '#include <sys/mman.h>')}
endif

spirv_cross = dependency('spirv-cross-c-shared', required: get_option('spirv-cross'))
spirv_cross = dependency('spirv-cross-c-shared', required: get_option('spirv-cross').require(features['win32-desktop']))
features += {'spirv-cross': spirv_cross.found()}
if features['spirv-cross']
dependencies += spirv_cross
Expand Down

0 comments on commit 60a31a8

Please sign in to comment.