-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Support Swift Package Manager #2858
Conversation
lib/include/zstd.h
Outdated
@@ -0,0 +1 @@ | |||
../zstd.h |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
This seems a strange content for a *.h
header file ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because SPM needs a separated publicHeadersPath
, so I create a symbol link to ../zstd.h
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about publicHeadersPath: "."
(or equivalent) ?
Is that forbidden or meaningless ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.