From d404805b7f68e2dc84c54bbc488d765755e7ec6f Mon Sep 17 00:00:00 2001 From: TellowKrinkle Date: Fri, 24 Oct 2025 22:56:46 -0500 Subject: [PATCH] CMake: Fix bundled glslang --- CMakeLists.txt | 10 ++-------- Source/Core/VideoBackends/D3DCommon/CMakeLists.txt | 2 -- Source/Core/VideoBackends/Metal/CMakeLists.txt | 1 - Source/Core/VideoBackends/Vulkan/CMakeLists.txt | 2 -- Source/Core/VideoCommon/CMakeLists.txt | 3 ++- 5 files changed, 4 insertions(+), 14 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index edebd2af5bf..7c708e9987a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -653,14 +653,8 @@ dolphin_find_optional_system_library_pkgconfig(FMT add_subdirectory(Externals/imgui) add_subdirectory(Externals/implot) -# A few distributions (mainly Debian-based ones) distribute glslang without linking it against SPIRV-Tools -find_package(SPIRV-Tools) -if(SPIRV-Tools_FOUND) - dolphin_find_optional_system_library(glslang Externals/glslang 15.0) - target_link_libraries(glslang::glslang INTERFACE SPIRV-Tools) -else() - dolphin_add_bundled_library(glslang OFF Externals/glslang) -endif() +dolphin_find_optional_system_library(glslang Externals/glslang 15.0) + # SPIRV-Cross is used on Windows for GLSL to HLSL conversion for the Direct3D 11 and Direct3D 12 # video backends, and on Apple devices for the Metal video backend. if(WIN32 OR APPLE) diff --git a/Source/Core/VideoBackends/D3DCommon/CMakeLists.txt b/Source/Core/VideoBackends/D3DCommon/CMakeLists.txt index 18a033f0cbf..90464c72e74 100644 --- a/Source/Core/VideoBackends/D3DCommon/CMakeLists.txt +++ b/Source/Core/VideoBackends/D3DCommon/CMakeLists.txt @@ -12,8 +12,6 @@ PUBLIC common videocommon spirv_cross -PRIVATE - glslang::glslang ) if(MSVC) diff --git a/Source/Core/VideoBackends/Metal/CMakeLists.txt b/Source/Core/VideoBackends/Metal/CMakeLists.txt index 0aaf79bfd14..db633a0380c 100644 --- a/Source/Core/VideoBackends/Metal/CMakeLists.txt +++ b/Source/Core/VideoBackends/Metal/CMakeLists.txt @@ -35,7 +35,6 @@ PUBLIC videocommon PRIVATE spirv_cross - glslang::glslang ${FOUNDATION_LIBRARY} ${METAL_LIBRARY} ${QUARTZCORE_LIBRARY} diff --git a/Source/Core/VideoBackends/Vulkan/CMakeLists.txt b/Source/Core/VideoBackends/Vulkan/CMakeLists.txt index c717488c839..5f5583f2b0d 100644 --- a/Source/Core/VideoBackends/Vulkan/CMakeLists.txt +++ b/Source/Core/VideoBackends/Vulkan/CMakeLists.txt @@ -43,8 +43,6 @@ PUBLIC videocommon PRIVATE - # Link against glslang, the other necessary libraries are referenced by the executable. - glslang::glslang xxhash::xxhash ) diff --git a/Source/Core/VideoCommon/CMakeLists.txt b/Source/Core/VideoCommon/CMakeLists.txt index ae9aafbbbaf..fb9cba4fa4b 100644 --- a/Source/Core/VideoCommon/CMakeLists.txt +++ b/Source/Core/VideoCommon/CMakeLists.txt @@ -218,13 +218,14 @@ add_library(videocommon target_link_libraries(videocommon PUBLIC core + glslang::glslang PRIVATE fmt::fmt spng::spng xxhash::xxhash imgui implot - glslang::glslang + glslang::SPIRV tinygltf )