Add Swift Package Manager Support (#49)

* Add test package.swift support
This commit is contained in:
Joel Fischer 2020-10-19 17:42:21 -04:00 committed by GitHub
parent 10747f4631
commit 48b092ec0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 38 additions and 0 deletions

30
Package.swift Normal file
View File

@ -0,0 +1,30 @@
// swift-tools-version:5.3
import PackageDescription
let package = Package(
name: "BiSON",
defaultLocalization: "en",
platforms: [
.iOS(.v9)
],
products: [
.library(name: "BiSON", targets: ["BiSON"])
],
targets: [
.target(
name: "BiSON",
path: "src",
exclude: [
"Makefile.am",
"Makefile.in",
"emhashmap/LICENSE",
"emhashmap/README.mkd",
"emhashmap/Makefile.in",
"emhashmap/Makefile.am",
"emhashmap/runtests.sh",
"emhashmap/tests/tests.c"
],
publicHeadersPath: "./"
)
]
)

8
src/module.modulemap Normal file
View File

@ -0,0 +1,8 @@
module bson {
header "emhashmap/emhashmap.h"
header "bson_object.h"
header "bson_array.h"
header "bson_util.h"
export *
}