1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
| | From ab1a39e0610c737993ef605559d9b7998a975666 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Tue, 29 Oct 2024 09:52:48 +0900
Subject: [PATCH] build/glslang: Fix build when OSDependent library is missing.
The OSDependent glslang library is only available when it is built as
a static library, not a shared one; look for the library but do not
fail the build when it doesn't exist.
Fixes: <https://github.com/OGRECave/ogre/issues/3248>
---
PlugIns/GLSLang/CMakeLists.txt | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/PlugIns/GLSLang/CMakeLists.txt b/PlugIns/GLSLang/CMakeLists.txt
index bfe03d9b8..7de816939 100644
--- a/PlugIns/GLSLang/CMakeLists.txt
+++ b/PlugIns/GLSLang/CMakeLists.txt
@@ -19,7 +19,11 @@ elseif(DEFINED ENV{VULKAN_SDK})
target_link_directories(Plugin_GLSLangProgramManager PUBLIC $ENV{VULKAN_SDK}/lib)
target_link_libraries(Plugin_GLSLangProgramManager PUBLIC OgreMain shaderc_combined)
else()
- set(GLSLANG_LIBS glslang OSDependent SPIRV SPIRV-Tools-opt SPIRV-Tools)
+ set(GLSLANG_LIBS glslang SPIRV SPIRV-Tools-opt SPIRV-Tools)
+ find_library(GLSLANG_OSDependent OSDependent)
+ if(GLSLANG_OGLCompiler)
+ set(GLSLANG_LIBS ${GLSLANG_LIBS} ${GLSLANG_OSDependent})
+ endif()
find_library(GLSLANG_HLSL HLSL)
if(GLSLANG_HLSL)
set(GLSLANG_LIBS ${GLSLANG_LIBS} ${GLSLANG_HLSL})
base-commit: edb3d26fa6fa2a40498e80db03e2c0e17c51d46d
--
2.46.0
|