Merge pull request #294207 from iynaix/fix-realesrgan-ncnn-vulkan

realesrgan-ncnn-vulkan: fix build failure
This commit is contained in:
Sandro 2024-03-12 18:11:11 +01:00 committed by GitHub
commit 3f75fa8fef
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 13 additions and 6 deletions

View File

@ -1,13 +1,15 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1e7b71a..9db85b1 100644
index 1e7b71a..e743ab0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -107,6 +107,8 @@ if(USE_SYSTEM_NCNN)
@@ -106,9 +106,9 @@ if(USE_SYSTEM_NCNN)
message(STATUS "Using glslang install located at ${GLSLANG_TARGET_DIR}")
find_package(Threads)
+ find_package(SPIRV-Tools-opt REQUIRED)
+ 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")

View File

@ -50,15 +50,20 @@ stdenv.mkDerivation rec {
installPhase = ''
mkdir -p $out/bin $out/share
cp realesrgan-ncnn-vulkan $out/bin/
cp -r ${models}/models $out/share
'';
postFixup = ''
patchelf $out/bin/realesrgan-ncnn-vulkan --add-needed libvulkan.so
'';
meta = with lib; {
description = "NCNN implementation of Real-ESRGAN. Real-ESRGAN aims at developing Practical Algorithms for General Image Restoration";
homepage = "https://github.com/xinntao/Real-ESRGAN-ncnn-vulkan";
license = licenses.mit;
maintainers = with maintainers; [ tilcreator ];
maintainers = with maintainers; [ tilcreator iynaix ];
platforms = platforms.all;
mainProgram = "realesrgan-ncnn-vulkan";
};