Skip to content

Commit

Permalink
use swift-lmdb as a dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewbastien committed Nov 12, 2024
1 parent 54212fc commit 8464623
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 13,729 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ set(CMAKE_POSITION_INDEPENDENT_CODE YES)

find_package(dispatch CONFIG)
find_package(Foundation CONFIG)
find_package(LMDB CONFIG)

include(SwiftSupport)

Expand Down
11 changes: 7 additions & 4 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ let package = Package(
name: "tibs",
targets: ["tibs"])
],
dependencies: [],
dependencies: [
.package(url: "https://github.com/swiftlang/swift-lmdb.git", branch: "main"),
],
targets: [

// MARK: Swift interface
Expand Down Expand Up @@ -81,12 +83,13 @@ let package = Package(
// The lmdb database layer.
.target(
name: "IndexStoreDB_Database",
dependencies: ["IndexStoreDB_Core"],
dependencies: [
"IndexStoreDB_Core",
.product(name: "CLMDB", package: "swift-lmdb"),
],
path: "lib/Database",
exclude: [
"CMakeLists.txt",
"lmdb/LICENSE",
"lmdb/COPYRIGHT",
],
cSettings: [
.define("MDB_USE_POSIX_MUTEX", to: "1",
Expand Down
5 changes: 2 additions & 3 deletions lib/Database/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ add_library(Database STATIC
Database.cpp
DatabaseError.cpp
ImportTransaction.cpp
ReadTransaction.cpp
lmdb/mdb.c
lmdb/midl.c)
ReadTransaction.cpp)
target_compile_definitions(Database PRIVATE
_CRT_NONSTDC_NO_WARNINGS
_CRT_SECURE_NO_WARNINGS)
Expand All @@ -13,6 +11,7 @@ target_compile_options(Database PRIVATE
target_include_directories(Database PRIVATE
include)
target_link_libraries(Database PRIVATE
LMDB::CLMDB
Core
LLVMSupport)
if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
Expand Down
20 changes: 0 additions & 20 deletions lib/Database/lmdb/COPYRIGHT

This file was deleted.

47 changes: 0 additions & 47 deletions lib/Database/lmdb/LICENSE

This file was deleted.

Loading

0 comments on commit 8464623

Please sign in to comment.