Skip to content

Commit

Permalink
GLSlang: fixing linking on archlinux (#3115)
Browse files Browse the repository at this point in the history
  • Loading branch information
Joilnen committed May 23, 2024
1 parent 26b0323 commit 6d51e64
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions PlugIns/GLSLang/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,24 @@ 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 HLSL OSDependent OGLCompiler SPIRV SPIRV-Tools-opt SPIRV-Tools)
find_library(GLSLANG_MI MachineIndependent)
if(GLSLANG_MI)
set(GLSLANG_LIBS ${GLSLANG_MI} ${GLSLANG_LIBS})
endif()
target_link_libraries(Plugin_GLSLangProgramManager PUBLIC OgreMain ${GLSLANG_LIBS})
set(GLSLANG_LIBS glslang OSDependent SPIRV SPIRV-Tools-opt SPIRV-Tools)
find_library(GLSLANG_HLSL HLSL)
if(GLSLANG_HLSL)
set(GLSLANG_LIBS ${GLSLANG_LIBS} ${GLSLANG_HLSL})
endif()
find_library(GLSLANG_OGLCompiler OGLCompiler)
if(GLSLANG_OGLCompiler)
set(GLSLANG_LIBS ${GLSLANG_LIBS} ${GLSLANG_OGLCompiler})
endif()
find_library(GLSLANG_MI MachineIndependent)
if(GLSLANG_MI)
set(GLSLANG_LIBS ${GLSLANG_MI} ${GLSLANG_LIBS})
endif()
target_link_libraries(Plugin_GLSLangProgramManager PUBLIC OgreMain ${GLSLANG_LIBS})
endif()

ogre_config_framework(Plugin_GLSLangProgramManager)
ogre_config_plugin(Plugin_GLSLangProgramManager)
generate_export_header(Plugin_GLSLangProgramManager
EXPORT_MACRO_NAME _OgreGLSLangProgramManagerExport
EXPORT_FILE_NAME ${PROJECT_BINARY_DIR}/include/OgreGLSLangProgramManagerExports.h)
install(FILES ${HEADER_FILES} DESTINATION include/OGRE/Plugins/GLSLang)
install(FILES ${HEADER_FILES} DESTINATION include/OGRE/Plugins/GLSLang)

0 comments on commit 6d51e64

Please sign in to comment.