Merge pull request #298447 from reckenrode/ncnn-darwin

ncnn: fix build on Darwin
This commit is contained in:
Weijia Wang 2024-04-05 18:25:36 +02:00 committed by GitHub
commit 7e1679f3f3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -33,7 +33,9 @@ stdenv.mkDerivation rec {
"-DNCNN_BUILD_TOOLS=0"
"-DNCNN_SYSTEM_GLSLANG=1"
"-DNCNN_PYTHON=0" # Should be an attribute
];
]
# Requires setting `Vulkan_LIBRARY` on Darwin. Otherwise the build fails due to missing symbols.
++ lib.optionals stdenv.isDarwin [ "-DVulkan_LIBRARY=-lvulkan" ];
nativeBuildInputs = [ cmake ];
buildInputs = [ vulkan-headers vulkan-loader glslang opencv protobuf ];