Skip to content

Commit

Permalink
setup project
Browse files Browse the repository at this point in the history
  • Loading branch information
1yefuwang1 committed Oct 7, 2023
1 parent b4bb10f commit 74cb70e
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,7 @@
*.exe
*.out
*.app

build/*
vcpkg/*
vcpkg_installed/*
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "vcpkg"]
path = vcpkg
url = https://github.com/Microsoft/vcpkg.git
13 changes: 13 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
cmake_minimum_required(VERSION 3.16 FATAL_ERROR)

project(sqlite-hnsw VERSION 0.1.0 LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

find_library(RapidJSON REQUIRED)
find_package(unofficial-sqlite3 CONFIG REQUIRED)
find_library(hnswlib CONFIG REQUIRED)

add_library(sqlite-hnsw SHARED src/sqlite_hnsw.cpp)
target_link_libraries(sqlite-hnsw PRIVATE unofficial::sqlite3::sqlite3)
1 change: 1 addition & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cmake -B build -S . -DCMAKE_TOOLCHAIN_FILE=./vcpkg/scripts/buildsystems/vcpkg.cmake && cmake --build build
4 changes: 4 additions & 0 deletions src/sqlite_hnsw.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#include "sqlite3ext.h"
#include "rapidjson/document.h"


1 change: 1 addition & 0 deletions vcpkg
Submodule vcpkg added at cc97b4
11 changes: 11 additions & 0 deletions vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "sqlite-hnsw",
"version-string": "0.1.0",
"license": "MIT",
"description": "SQLite extension for HNSW index",
"dependencies": [
"sqlite3",
"rapidjson",
"hnswlib"
]
}

0 comments on commit 74cb70e

Please sign in to comment.