Using module.modulemap replace symbol link for public header

This commit is contained in:
Lvv.me 2021-11-15 13:23:50 +08:00
parent 27455638aa
commit 81b96205af
No known key found for this signature in database
GPG Key ID: 8843A4C0FE54B152
3 changed files with 8 additions and 5 deletions

View File

@ -11,8 +11,8 @@ let package = Package(
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
.library(
name: "zstd",
targets: [ "zstd" ])
name: "libzstd",
targets: [ "libzstd" ])
],
dependencies: [
// Dependencies declare other packages that this package depends on.
@ -22,10 +22,10 @@ let package = Package(
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages this package depends on.
.target(
name: "zstd",
name: "libzstd",
path: "lib",
sources: [ "common", "compress", "decompress", "dictBuilder" ],
publicHeadersPath: "include",
publicHeadersPath: "modulemap",
cSettings: [
.headerSearchPath(".")
])

View File

@ -1 +0,0 @@
../zstd.h

View File

@ -0,0 +1,4 @@
module libzstd {
umbrella header "../zstd.h"
export *
}