tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
ncnn: 20231027 -> 20240102 and fix build
rewine
2 years ago
74e0cd35
a940bf92
+18
-11
2 changed files
expand all
collapse all
unified
split
pkgs
development
libraries
ncnn
cmakelists.patch
default.nix
+16
-7
pkgs/development/libraries/ncnn/cmakelists.patch
···
1
1
diff --git a/CMakeLists.txt b/CMakeLists.txt
2
2
-
index c453d23e..66b4aa24 100644
2
2
+
index 785e2cd..459024d 100644
3
3
--- a/CMakeLists.txt
4
4
+++ b/CMakeLists.txt
5
5
-
@@ -560,6 +560,8 @@ if(NCNN_VULKAN)
6
6
-
message(WARNING "GLSLANG_TARGET_DIR must be defined! NCNN_SYSTEM_GLSLANG will be turned off.")
5
5
+
@@ -589,7 +589,8 @@ endif()
6
6
+
if(NCNN_VULKAN)
7
7
+
if(NCNN_SYSTEM_GLSLANG)
8
8
+
find_package(Threads)
9
9
+
- find_package(glslang QUIET)
10
10
+
+ find_package(SPIRV-Tools-opt REQUIRED)
11
11
+
+ find_package(glslang REQUIRED)
12
12
+
if(glslang_FOUND)
13
13
+
add_library(glslang ALIAS glslang::glslang)
14
14
+
add_library(SPIRV ALIAS glslang::SPIRV)
15
15
+
@@ -601,7 +602,6 @@ if(NCNN_VULKAN)
7
16
set(NCNN_SYSTEM_GLSLANG OFF)
8
17
else()
9
9
-
+ include("${GLSLANG_TARGET_DIR}/SPIRV-Tools/SPIRV-ToolsTarget.cmake")
10
10
-
+ include("${GLSLANG_TARGET_DIR}/SPIRV-Tools-opt/SPIRV-Tools-optTargets.cmake")
11
18
include("${GLSLANG_TARGET_DIR}/OSDependentTargets.cmake")
12
12
-
include("${GLSLANG_TARGET_DIR}/OGLCompilerTargets.cmake")
19
19
+
- include("${GLSLANG_TARGET_DIR}/OGLCompilerTargets.cmake")
13
20
if(EXISTS "${GLSLANG_TARGET_DIR}/HLSLTargets.cmake")
21
21
+
# hlsl support can be optional
22
22
+
include("${GLSLANG_TARGET_DIR}/HLSLTargets.cmake")
14
23
diff --git a/src/ncnn.pc.in b/src/ncnn.pc.in
15
15
-
index b580fcee..be2becd0 100644
24
24
+
index b580fce..be2becd 100644
16
25
--- a/src/ncnn.pc.in
17
26
+++ b/src/ncnn.pc.in
18
27
@@ -1,6 +1,6 @@
+2
-4
pkgs/development/libraries/ncnn/default.nix
···
11
11
12
12
stdenv.mkDerivation rec {
13
13
pname = "ncnn";
14
14
-
version = "20231027";
14
14
+
version = "20240102";
15
15
16
16
src = fetchFromGitHub {
17
17
owner = "Tencent";
18
18
repo = pname;
19
19
rev = version;
20
20
-
sha256 = "sha256-ak/5QTOptg5M2I+3olnrBK6JZ01haIE6oh+sagEboAc=";
20
20
+
hash = "sha256-kk70oLY+2QJOkyYq10whLRMxBuibQMWMOBA9dcbKf/I=";
21
21
};
22
22
23
23
patches = [
···
33
33
"-DNCNN_BUILD_TOOLS=0"
34
34
"-DNCNN_SYSTEM_GLSLANG=1"
35
35
"-DNCNN_PYTHON=0" # Should be an attribute
36
36
-
37
37
-
"-DGLSLANG_TARGET_DIR=${glslang}/lib/cmake"
38
36
];
39
37
40
38
nativeBuildInputs = [ cmake ];