Conversation
lib/include/zstd.h
Outdated
| @@ -0,0 +1 @@ | |||
| ../zstd.h No newline at end of file | |||
There was a problem hiding this comment.
?
This seems a strange content for a *.h header file ?
There was a problem hiding this comment.
Because SPM needs a separated publicHeadersPath, so I create a symbol link to ../zstd.h
There was a problem hiding this comment.
What do you call a "symbol link" ?
Is that a specific SPM concept, or is it the standard unix' ln -s link ?
There was a problem hiding this comment.
Yes, It is a symbol link created by ln -s ../zstd.h zstd.h
Package.swift
Outdated
| name: "zstd", | ||
| path: "lib", | ||
| sources: [ "common", "compress", "decompress", "dictBuilder" ], | ||
| publicHeadersPath: "include", |
There was a problem hiding this comment.
What about publicHeadersPath: "." (or equivalent) ?
Is that forbidden or meaningless ?
There was a problem hiding this comment.
I tried, it can't work
$ swift build
'zstd' ./zstd: error: target 'zstd' has invalid header layout: umbrella header found at './zstd/lib/zstd.h', but directories exist next to it: ./zstd/lib/common, ./zstd/lib/compress, ./zstd/lib/decompress, ./zstd/lib/deprecated, ./zstd/lib/dictBuilder, ./zstd/lib/dll, ./zstd/lib/include, ./zstd/lib/legacy; consider removing them
And finally, I figure it out. Using a module.modulemap replace symbol link for public header.
And renamed lib name zstd to libzstd
|
Thanks for adding this Swift Package support ! |
No description provided.