aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/knncolle
diff options
context:
space:
mode:
Diffstat (limited to 'vcpkg/ports/knncolle')
-rw-r--r--vcpkg/ports/knncolle/portfile.cmake27
-rw-r--r--vcpkg/ports/knncolle/usage5
-rw-r--r--vcpkg/ports/knncolle/vcpkg.json18
3 files changed, 50 insertions, 0 deletions
diff --git a/vcpkg/ports/knncolle/portfile.cmake b/vcpkg/ports/knncolle/portfile.cmake
new file mode 100644
index 0000000..d09fde5
--- /dev/null
+++ b/vcpkg/ports/knncolle/portfile.cmake
@@ -0,0 +1,27 @@
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO knncolle/knncolle
+ REF "v${VERSION}"
+ SHA512 778f3b71cbc8dbbeddf26e24531e8f9b5f79927af8e89aa9782cc942fcd74fc65bf73141eb8fb0320394c07d19834068c653d8565b56af487bb5ea72b07ce875
+ HEAD_REF master
+)
+
+set(VCPKG_BUILD_TYPE "release") # header-only port
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ OPTIONS
+ -DKNNCOLLE_FETCH_EXTERN=OFF
+ -DKNNCOLLE_TESTS=OFF
+)
+
+vcpkg_cmake_install()
+vcpkg_cmake_config_fixup(
+ PACKAGE_NAME knncolle_knncolle
+ CONFIG_PATH lib/cmake/knncolle_knncolle
+)
+
+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/usage b/vcpkg/ports/knncolle/usage
new file mode 100644
index 0000000..bbd93e5
--- /dev/null
+++ b/vcpkg/ports/knncolle/usage
@@ -0,0 +1,5 @@
+knncolle is header-only and can be used from CMake via:
+
+ find_package(knncolle_knncolle CONFIG REQUIRED)
+ target_link_libraries(mylib INTERFACE knncolle::knncolle)
+ \ No newline at end of file
diff --git a/vcpkg/ports/knncolle/vcpkg.json b/vcpkg/ports/knncolle/vcpkg.json
new file mode 100644
index 0000000..93d6ca0
--- /dev/null
+++ b/vcpkg/ports/knncolle/vcpkg.json
@@ -0,0 +1,18 @@
+{
+ "name": "knncolle",
+ "version": "3.0.1",
+ "description": "Collection of KNN algorithms in C++ ",
+ "homepage": "https://github.com/knncolle/knncolle",
+ "license": "MIT",
+ "dependencies": [
+ "ltla-subpar",
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ },
+ {
+ "name": "vcpkg-cmake-config",
+ "host": true
+ }
+ ]
+}