aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/knncolle-hnsw
diff options
context:
space:
mode:
Diffstat (limited to 'vcpkg/ports/knncolle-hnsw')
-rw-r--r--vcpkg/ports/knncolle-hnsw/portfile.cmake27
-rw-r--r--vcpkg/ports/knncolle-hnsw/usage4
-rw-r--r--vcpkg/ports/knncolle-hnsw/vcpkg.json19
3 files changed, 50 insertions, 0 deletions
diff --git a/vcpkg/ports/knncolle-hnsw/portfile.cmake b/vcpkg/ports/knncolle-hnsw/portfile.cmake
new file mode 100644
index 0000000..4f89821
--- /dev/null
+++ b/vcpkg/ports/knncolle-hnsw/portfile.cmake
@@ -0,0 +1,27 @@
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO knncolle/knncolle_hnsw
+ REF "v${VERSION}"
+ SHA512 efedafc580aed0d0d33533aefa0183b1442e3496b18c7cfbdebce22555c3bbf8c4fdb83fc2db2a0ce50055a50ff402c41f93482121f06c04f09a03365b0cda31
+ HEAD_REF master
+)
+
+set(VCPKG_BUILD_TYPE "release") # header-only port
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ OPTIONS
+ -DKNNCOLLE_HNSW_FETCH_EXTERN=OFF
+ -DKNNCOLLE_HNSW_TESTS=OFF
+)
+
+vcpkg_cmake_install()
+vcpkg_cmake_config_fixup(
+ PACKAGE_NAME knncolle_hnsw
+ CONFIG_PATH lib/cmake/knncolle_hnsw
+)
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib")
+
+vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
+file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
diff --git a/vcpkg/ports/knncolle-hnsw/usage b/vcpkg/ports/knncolle-hnsw/usage
new file mode 100644
index 0000000..a6383d5
--- /dev/null
+++ b/vcpkg/ports/knncolle-hnsw/usage
@@ -0,0 +1,4 @@
+knncolle_hnsw is header-only and can be used from CMake via:
+
+ find_package(knncolle_knncolle_hnsw CONFIG REQUIRED)
+ target_link_libraries(mylib INTERFACE knncolle::knncolle_hnsw)
diff --git a/vcpkg/ports/knncolle-hnsw/vcpkg.json b/vcpkg/ports/knncolle-hnsw/vcpkg.json
new file mode 100644
index 0000000..b89c2ab
--- /dev/null
+++ b/vcpkg/ports/knncolle-hnsw/vcpkg.json
@@ -0,0 +1,19 @@
+{
+ "name": "knncolle-hnsw",
+ "version": "0.2.1",
+ "description": "knncolle bindings for HNSW search ",
+ "homepage": "https://github.com/knncolle/knncolle_hnsw",
+ "license": "MIT",
+ "dependencies": [
+ "hnswlib",
+ "knncolle",
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ },
+ {
+ "name": "vcpkg-cmake-config",
+ "host": true
+ }
+ ]
+}