Skip to content

Commit

Permalink
r
Browse files Browse the repository at this point in the history
  • Loading branch information
nihui committed Feb 19, 2025
1 parent 23f85ce commit d6810d5
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion cmake/ncnnConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,18 @@ if(NCNN_VULKAN)
if(NCNN_SYSTEM_GLSLANG)
find_package(SPIRV-Tools QUIET)
find_package(SPIRV-Tools-opt QUIET)
find_package(glslang REQUIRED)
find_package(glslang QUIET)
if(NOT glslang_FOUND)
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_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../@CMAKE_INSTALL_LIBDIR@/cmake/glslang")
find_package(glslang QUIET)
Expand Down

0 comments on commit d6810d5

Please sign in to comment.