[hnswlib] update to 0.8.0 (#35475)

This commit is contained in:
moritz-h 2023-12-05 02:31:53 +01:00 committed by GitHub
parent b6e73bd3dc
commit ee3d0e9941
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 51 deletions

View File

@ -1,44 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7cebe60..b2aecc8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,11 +1,36 @@
-cmake_minimum_required (VERSION 2.6)
-project(hnsw_lib
+cmake_minimum_required(VERSION 3.0...3.26)
+
+project(hnswlib
LANGUAGES CXX)
+include(GNUInstallDirs)
+
add_library(hnswlib INTERFACE)
-target_include_directories(hnswlib INTERFACE .)
+add_library(hnswlib::hnswlib ALIAS hnswlib)
+
+target_include_directories(hnswlib INTERFACE
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
+ $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
+
+# Install
+install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/hnswlib
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
+install(TARGETS hnswlib
+ EXPORT hnswlibTargets)
+
+install(EXPORT hnswlibTargets
+ FILE hnswlibConfig.cmake
+ NAMESPACE hnswlib::
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/hnswlib)
+
+# Examples and tests
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
+ option(HNSWLIB_EXAMPLES "Build examples and tests." ON)
+else()
+ option(HNSWLIB_EXAMPLES "Build examples and tests." OFF)
+endif()
+if(HNSWLIB_EXAMPLES)
set(CMAKE_CXX_STANDARD 11)
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")

View File

@ -2,10 +2,8 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO nmslib/hnswlib
REF "v${VERSION}"
SHA512 fd74c23040598973d7e0b5a6af73eb884ee2d30703187d1702fdd48eaf8f7f96d8fbb125d3763f90111d9fb7c5ab3434ebdb818da8717d35c5571e99083c812b
SHA512 2bac86547374ef762083f33b5209c7c02c89b3270442dda2bc80fbc7b6a33766cb81248841deddc2ca1f7c49e3e19889955f45c91d0b601d1c883a5e1c930794
HEAD_REF master
PATCHES
cmake.patch # Backport CMake targets from nmslib/hnswlib #446 to 0.7.0 release.
)
set(VCPKG_BUILD_TYPE "release") # header-only port

View File

@ -1,7 +1,6 @@
{
"name": "hnswlib",
"version": "0.7.0",
"port-version": 1,
"version": "0.8.0",
"description": "Header-only library for fast approximate nearest neighbors",
"homepage": "https://github.com/nmslib/hnswlib",
"license": "Apache-2.0",

View File

@ -3341,8 +3341,8 @@
"port-version": 0
},
"hnswlib": {
"baseline": "0.7.0",
"port-version": 1
"baseline": "0.8.0",
"port-version": 0
},
"hps": {
"baseline": "2022-01-18",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "e476d41813814f2180e5a898c81ca394339c4cf3",
"version": "0.8.0",
"port-version": 0
},
{
"git-tree": "497030f03d37d63ff86c9e99d24d9e8f048ea067",
"version": "0.7.0",