2020-04-10 17:09:15 +02:00
|
|
|
// swift-tools-version:5.2
|
|
|
|
|
|
|
|
import PackageDescription
|
|
|
|
|
|
|
|
let version = ( major: 3, minor: 1, patch: 4 )
|
|
|
|
|
|
|
|
let package = Package(
|
|
|
|
name: "Olm",
|
|
|
|
products: [
|
2020-04-10 17:27:56 +02:00
|
|
|
.library(name: "libolm", targets: ["libolm"]),
|
|
|
|
.library(name: "OLMKit", targets: ["OLMKit"]),
|
2020-04-10 17:09:15 +02:00
|
|
|
],
|
|
|
|
targets: [
|
|
|
|
.target(
|
|
|
|
name: "libolm",
|
|
|
|
path: ".",
|
|
|
|
sources: [ "src" ],
|
|
|
|
publicHeadersPath: "include",
|
|
|
|
cSettings: [
|
|
|
|
.define("OLMLIB_VERSION_MAJOR", to: String(version.major)),
|
|
|
|
.define("OLMLIB_VERSION_MINOR", to: String(version.minor)),
|
|
|
|
.define("OLMLIB_VERSION_PATCH", to: String(version.patch)),
|
|
|
|
.headerSearchPath("lib"),
|
|
|
|
.unsafeFlags([ "-Wall", "-Werror" ])
|
|
|
|
]
|
2020-04-10 17:27:56 +02:00
|
|
|
),
|
|
|
|
.target(
|
|
|
|
name: "OLMKit",
|
|
|
|
dependencies: [ "libolm" ],
|
|
|
|
path: "xcode",
|
|
|
|
sources: [ "OLMKit" ],
|
|
|
|
publicHeadersPath: "OLMKit",
|
|
|
|
cSettings: [
|
|
|
|
.headerSearchPath("."),
|
|
|
|
.unsafeFlags([
|
|
|
|
"-Wno-unused-command-line-argument",
|
|
|
|
"-fmodules", "-fcxx-modules"
|
|
|
|
])
|
|
|
|
]
|
2020-04-10 17:09:15 +02:00
|
|
|
)
|
|
|
|
],
|
|
|
|
cLanguageStandard: .c99,
|
|
|
|
cxxLanguageStandard: .cxx11
|
|
|
|
)
|