Skip to content

Commit

Permalink
glslang: Fix build when OSDependent library is missing. (OGRECave#3249)
Browse files Browse the repository at this point in the history
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: <OGRECave#3248>
  • Loading branch information
Apteryks authored Oct 30, 2024
1 parent 18699bf commit a84db69
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion PlugIns/GLSLang/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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_OSDependent)
set(GLSLANG_LIBS ${GLSLANG_LIBS} ${GLSLANG_OSDependent})
endif()
find_library(GLSLANG_HLSL HLSL)
if(GLSLANG_HLSL)
set(GLSLANG_LIBS ${GLSLANG_LIBS} ${GLSLANG_HLSL})
Expand Down

0 comments on commit a84db69

Please sign in to comment.