about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/ncnn/cmakelists.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/ncnn/cmakelists.patch')
-rw-r--r--nixpkgs/pkgs/development/libraries/ncnn/cmakelists.patch23
1 files changed, 16 insertions, 7 deletions
diff --git a/nixpkgs/pkgs/development/libraries/ncnn/cmakelists.patch b/nixpkgs/pkgs/development/libraries/ncnn/cmakelists.patch
index bdb3063acec4..a43d7b0c4b72 100644
--- a/nixpkgs/pkgs/development/libraries/ncnn/cmakelists.patch
+++ b/nixpkgs/pkgs/development/libraries/ncnn/cmakelists.patch
@@ -1,18 +1,27 @@
 diff --git a/CMakeLists.txt b/CMakeLists.txt
-index c453d23e..66b4aa24 100644
+index 785e2cd..459024d 100644
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -560,6 +560,8 @@ if(NCNN_VULKAN)
-                 message(WARNING "GLSLANG_TARGET_DIR must be defined! NCNN_SYSTEM_GLSLANG will be turned off.")
+@@ -589,7 +589,8 @@ endif()
+ if(NCNN_VULKAN)
+     if(NCNN_SYSTEM_GLSLANG)
+         find_package(Threads)
+-        find_package(glslang QUIET)
++        find_package(SPIRV-Tools-opt REQUIRED)
++        find_package(glslang REQUIRED)
+         if(glslang_FOUND)
+             add_library(glslang ALIAS glslang::glslang)
+             add_library(SPIRV ALIAS glslang::SPIRV)
+@@ -601,7 +602,6 @@ if(NCNN_VULKAN)
                  set(NCNN_SYSTEM_GLSLANG OFF)
              else()
-+                include("${GLSLANG_TARGET_DIR}/SPIRV-Tools/SPIRV-ToolsTarget.cmake")
-+                include("${GLSLANG_TARGET_DIR}/SPIRV-Tools-opt/SPIRV-Tools-optTargets.cmake")
                  include("${GLSLANG_TARGET_DIR}/OSDependentTargets.cmake")
-                 include("${GLSLANG_TARGET_DIR}/OGLCompilerTargets.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")
 diff --git a/src/ncnn.pc.in b/src/ncnn.pc.in
-index b580fcee..be2becd0 100644
+index b580fce..be2becd 100644
 --- a/src/ncnn.pc.in
 +++ b/src/ncnn.pc.in
 @@ -1,6 +1,6 @@