nixpkgs/pkgs/by-name/nc/ncnn/cmakelists.patch
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +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