diff options
author | Lin Xianyi <iynaix@gmail.com> | 2024-03-20 11:24:29 +0800 |
---|---|---|
committer | Lin Xianyi <iynaix@gmail.com> | 2024-03-24 08:25:19 +0800 |
commit | b962fbf0fb8eda357ea0f788b76f3d10587dc911 (patch) | |
tree | 5da095261c88a5a32a7aef6d7a2812ff872a1798 /pkgs/tools/graphics/realesrgan-ncnn-vulkan | |
parent | a474411771523ecb4092d05e6dfa1a47c4a85791 (diff) |
realesrgan-ncnn-vulkan: fix build for glslang 14.1.0
Diffstat (limited to 'pkgs/tools/graphics/realesrgan-ncnn-vulkan')
-rw-r--r-- | pkgs/tools/graphics/realesrgan-ncnn-vulkan/cmakelists.patch | 22 | ||||
-rw-r--r-- | pkgs/tools/graphics/realesrgan-ncnn-vulkan/default.nix | 2 |
2 files changed, 18 insertions, 6 deletions
diff --git a/pkgs/tools/graphics/realesrgan-ncnn-vulkan/cmakelists.patch b/pkgs/tools/graphics/realesrgan-ncnn-vulkan/cmakelists.patch index 19453e8912a9b..bf51aec6367ea 100644 --- a/pkgs/tools/graphics/realesrgan-ncnn-vulkan/cmakelists.patch +++ b/pkgs/tools/graphics/realesrgan-ncnn-vulkan/cmakelists.patch @@ -1,15 +1,27 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 1e7b71a..e743ab0 100644 +index 1e7b71a..2ac2826 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -106,9 +106,9 @@ if(USE_SYSTEM_NCNN) +@@ -106,20 +106,13 @@ if(USE_SYSTEM_NCNN) message(STATUS "Using glslang install located at ${GLSLANG_TARGET_DIR}") - + find_package(Threads) ++ find_package(glslang REQUIRED) + find_package(SPIRV-Tools-opt REQUIRED) - - include("${GLSLANG_TARGET_DIR}/OSDependentTargets.cmake") + +- 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") +- +- if (NOT TARGET glslang OR NOT TARGET SPIRV) +- message(WARNING "glslang or SPIRV target not found! USE_SYSTEM_NCNN will be turned off.") +- set(USE_SYSTEM_NCNN OFF) +- endif() + endif() + endif() + diff --git a/pkgs/tools/graphics/realesrgan-ncnn-vulkan/default.nix b/pkgs/tools/graphics/realesrgan-ncnn-vulkan/default.nix index c7f9817326b8a..59c2753011d31 100644 --- a/pkgs/tools/graphics/realesrgan-ncnn-vulkan/default.nix +++ b/pkgs/tools/graphics/realesrgan-ncnn-vulkan/default.nix @@ -55,7 +55,7 @@ stdenv.mkDerivation rec { cp -r ${models}/models $out/share ''; - postFixup = '' + postFixup = lib.optionalString stdenv.isLinux '' patchelf $out/bin/realesrgan-ncnn-vulkan --add-needed libvulkan.so ''; |