nixpkgs/pkgs/development/libraries/ncnn/cmakelists.patch
2024-01-30 21:28:02 +08:00

36 lines
1.4 KiB
Diff

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 785e2cd..459024d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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}/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")
diff --git a/src/ncnn.pc.in b/src/ncnn.pc.in
index b580fce..be2becd 100644
--- a/src/ncnn.pc.in
+++ b/src/ncnn.pc.in
@@ -1,6 +1,6 @@
prefix=${pcfiledir}/../..
-librarydir=${prefix}/@CMAKE_INSTALL_LIBDIR@
-includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
+librarydir=@CMAKE_INSTALL_FULL_LIBDIR@
+includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
Name: @CMAKE_PROJECT_NAME@
Description: high-performance neural network inference framework optimized for the mobile platform