aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/ncnn
diff options
context:
space:
mode:
Diffstat (limited to 'vcpkg/ports/ncnn')
-rw-r--r--vcpkg/ports/ncnn/portfile.cmake36
-rw-r--r--vcpkg/ports/ncnn/vcpkg.json27
2 files changed, 63 insertions, 0 deletions
diff --git a/vcpkg/ports/ncnn/portfile.cmake b/vcpkg/ports/ncnn/portfile.cmake
new file mode 100644
index 0000000..9ce79ed
--- /dev/null
+++ b/vcpkg/ports/ncnn/portfile.cmake
@@ -0,0 +1,36 @@
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO Tencent/ncnn
+ REF "${VERSION}"
+ SHA512 bb20d8ece3dcddf49530e1ca44eaad1045702b5fb7a7c9cfd6754eb158c7349bba7d63a3ef1e1a4a6e30ed59622367b802f98bf8343bd30ff0cb6def734757c4
+ HEAD_REF master
+)
+
+string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED)
+
+vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
+ FEATURES
+ vulkan NCNN_VULKAN
+ vulkan NCNN_SYSTEM_GLSLANG
+)
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ OPTIONS
+ ${FEATURE_OPTIONS}
+ -DNCNN_BUILD_TOOLS=OFF
+ -DNCNN_BUILD_EXAMPLES=OFF
+ -DNCNN_BUILD_BENCHMARK=OFF
+ -DNCNN_SHARED_LIB=${BUILD_SHARED}
+)
+
+vcpkg_cmake_install()
+
+vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/ncnn)
+vcpkg_copy_pdbs()
+vcpkg_fixup_pkgconfig()
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
+
+vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")
diff --git a/vcpkg/ports/ncnn/vcpkg.json b/vcpkg/ports/ncnn/vcpkg.json
new file mode 100644
index 0000000..bd8fdef
--- /dev/null
+++ b/vcpkg/ports/ncnn/vcpkg.json
@@ -0,0 +1,27 @@
+{
+ "name": "ncnn",
+ "version": "20250916",
+ "description": "ncnn is a high-performance neural network inference computing framework.",
+ "homepage": "https://github.com/Tencent/ncnn",
+ "license": "BSD-3-Clause",
+ "supports": "!(windows & arm)",
+ "dependencies": [
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ },
+ {
+ "name": "vcpkg-cmake-config",
+ "host": true
+ }
+ ],
+ "features": {
+ "vulkan": {
+ "description": "Enable Vulkan support",
+ "dependencies": [
+ "glslang",
+ "vulkan"
+ ]
+ }
+ }
+}