Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update glslang #4361

Merged
merged 1 commit into from
Nov 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 21 additions & 12 deletions cmake/ncnnConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,29 @@ if(NCNN_VULKAN)

if(NOT NCNN_SHARED_LIB)
if(NCNN_SYSTEM_GLSLANG)
set(GLSLANG_TARGET_DIR "@GLSLANG_TARGET_DIR@")
find_package(glslang QUIET)
if(glslang_FOUND)
add_library(glslang ALIAS glslang::glslang)
add_library(SPIRV ALIAS glslang::SPIRV)
else()
set(GLSLANG_TARGET_DIR "@GLSLANG_TARGET_DIR@")
include(${GLSLANG_TARGET_DIR}/OSDependentTargets.cmake)
include(${GLSLANG_TARGET_DIR}/OGLCompilerTargets.cmake)
if(EXISTS "${GLSLANG_TARGET_DIR}/HLSLTargets.cmake")
# hlsl support can be optional
include("${GLSLANG_TARGET_DIR}/HLSLTargets.cmake")
endif()
include(${GLSLANG_TARGET_DIR}/glslangTargets.cmake)
include(${GLSLANG_TARGET_DIR}/SPIRVTargets.cmake)
endif()
else()
set(GLSLANG_TARGET_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../@CMAKE_INSTALL_LIBDIR@/cmake")
endif(NCNN_SYSTEM_GLSLANG)

include(${GLSLANG_TARGET_DIR}/OSDependentTargets.cmake)
include(${GLSLANG_TARGET_DIR}/OGLCompilerTargets.cmake)
if(EXISTS "${GLSLANG_TARGET_DIR}/HLSLTargets.cmake")
# hlsl support can be optional
include("${GLSLANG_TARGET_DIR}/HLSLTargets.cmake")
set(glslang_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../@CMAKE_INSTALL_LIBDIR@/cmake/glslang")
find_package(glslang QUIET)
add_library(glslang ALIAS glslang::glslang)
add_library(SPIRV ALIAS glslang::SPIRV)
endif()
include(${GLSLANG_TARGET_DIR}/glslangTargets.cmake)
include(${GLSLANG_TARGET_DIR}/SPIRVTargets.cmake)

endif()
endif(NCNN_VULKAN)
endif()

include(${CMAKE_CURRENT_LIST_DIR}/ncnn.cmake)
2 changes: 1 addition & 1 deletion glslang
Submodule glslang updated 920 files