diff options
| author | Joshua Vandaƫle <joshua@vandaele.software> | 2025-10-13 01:43:08 +0200 |
|---|---|---|
| committer | Joshua Vandaƫle <joshua@vandaele.software> | 2025-10-13 01:52:24 +0200 |
| commit | 37d6fe61baec2f17e6ac03dca67aea9832844063 (patch) | |
| tree | af39bd6dcc0d64bb8b708e4b3917cb7f874d8e8a /CMakeLists.txt | |
| parent | 8323c21e40f1faaa19e097d91fa58c60dc0104fc (diff) | |
CMakeLists: Fix compilation of glslang in cases where it hasn't been linked against SPIRV-Tools
Diffstat (limited to 'CMakeLists.txt')
| -rw-r--r-- | CMakeLists.txt | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 7febb80846..4d4e495a75 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -651,7 +651,15 @@ dolphin_find_optional_system_library_pkgconfig(FMT add_subdirectory(Externals/imgui) add_subdirectory(Externals/implot) -dolphin_find_optional_system_library(glslang Externals/glslang 15.0) + +# 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() # 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) |
