Skip to content

Commit 8464623

Browse files
use swift-lmdb as a dependency
1 parent 54212fc commit 8464623

File tree

9 files changed

+10
-13729
lines changed

9 files changed

+10
-13729
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ set(CMAKE_POSITION_INDEPENDENT_CODE YES)
1313

1414
find_package(dispatch CONFIG)
1515
find_package(Foundation CONFIG)
16+
find_package(LMDB CONFIG)
1617

1718
include(SwiftSupport)
1819

Package.swift

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ let package = Package(
1818
name: "tibs",
1919
targets: ["tibs"])
2020
],
21-
dependencies: [],
21+
dependencies: [
22+
.package(url: "https://github.com/swiftlang/swift-lmdb.git", branch: "main"),
23+
],
2224
targets: [
2325

2426
// MARK: Swift interface
@@ -81,12 +83,13 @@ let package = Package(
8183
// The lmdb database layer.
8284
.target(
8385
name: "IndexStoreDB_Database",
84-
dependencies: ["IndexStoreDB_Core"],
86+
dependencies: [
87+
"IndexStoreDB_Core",
88+
.product(name: "CLMDB", package: "swift-lmdb"),
89+
],
8590
path: "lib/Database",
8691
exclude: [
8792
"CMakeLists.txt",
88-
"lmdb/LICENSE",
89-
"lmdb/COPYRIGHT",
9093
],
9194
cSettings: [
9295
.define("MDB_USE_POSIX_MUTEX", to: "1",

lib/Database/CMakeLists.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@ add_library(Database STATIC
22
Database.cpp
33
DatabaseError.cpp
44
ImportTransaction.cpp
5-
ReadTransaction.cpp
6-
lmdb/mdb.c
7-
lmdb/midl.c)
5+
ReadTransaction.cpp)
86
target_compile_definitions(Database PRIVATE
97
_CRT_NONSTDC_NO_WARNINGS
108
_CRT_SECURE_NO_WARNINGS)
@@ -13,6 +11,7 @@ target_compile_options(Database PRIVATE
1311
target_include_directories(Database PRIVATE
1412
include)
1513
target_link_libraries(Database PRIVATE
14+
LMDB::CLMDB
1615
Core
1716
LLVMSupport)
1817
if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)

lib/Database/lmdb/COPYRIGHT

Lines changed: 0 additions & 20 deletions
This file was deleted.

lib/Database/lmdb/LICENSE

Lines changed: 0 additions & 47 deletions
This file was deleted.

0 commit comments

Comments
 (0)