I'm trying to write a wrapper over lexbor C library. But there are some difficulties with it, it has no include folder, and all header files are scattered around the project as follows:
Simply creating soft links to header files inside the include folder does not produce results:
ln -s ../lexbor/source/lexbor/utils/utils.h
ln -s ../lexbor/source/lexbor/html/html.h
...
What should be done in this situation?
At the moment the Package.swift file looks like this:
let lexborExclude: [String] = [
"./lexbor/examples",
"./lexbor/packaging",
"./lexbor/test",
"./lexbor/utils",
"./lexbor/CHANGELOG.md",
"./lexbor/CMakeLists.txt",
"./lexbor/config.cmake",
"./lexbor/feature.cmake",
"./lexbor/INSTALL.md",
"./lexbor/LICENSE",
"./lexbor/NOTICE",
"./lexbor/pvs_studio.sh",
"./lexbor/README.md",
"./lexbor/version",
"./lexbor/source/lexbor/core/config.cmake",
"./lexbor/source/lexbor/css/config.cmake",
"./lexbor/source/lexbor/dom/config.cmake",
"./lexbor/source/lexbor/encoding/config.cmake",
"./lexbor/source/lexbor/html/config.cmake",
"./lexbor/source/lexbor/ns/config.cmake",
"./lexbor/source/lexbor/ports/posix/config.cmake",
"./lexbor/source/lexbor/ports/windows_nt",
"./lexbor/source/lexbor/punycode/config.cmake",
"./lexbor/source/lexbor/selectors/config.cmake",
"./lexbor/source/lexbor/tag/config.cmake",
"./lexbor/source/lexbor/unicode/config.cmake",
"./lexbor/source/lexbor/url/config.cmake",
"./lexbor/source/lexbor/utils/config.cmake",
]
let package = Package(
name: "Lexbor",
platforms: [
.iOS(.v17),
],
products: [
.library(name: "Lexbor", targets: ["Lexbor"]),
],
targets: [
.target(name: "Lexbor", dependencies: ["CLexbor"]),
.target(
name: "CLexbor",
exclude: lexborExclude,
sources: ["./lexbor/source"],
cSettings: [
.headerSearchPath("./lexbor/source/**"),
// .headerSearchPath("./lexbor/source/lexbor/core"),
// .headerSearchPath("./lexbor/source/lexbor/css"),
// .headerSearchPath("./lexbor/source/lexbor/dom"),
// .headerSearchPath("./lexbor/source/lexbor/encoding"),
// .headerSearchPath("./lexbor/source/lexbor/html"),
// .headerSearchPath("./lexbor/source/lexbor/ports/posix"),
// .headerSearchPath("./lexbor/source/lexbor/punycode"),
// .headerSearchPath("./lexbor/source/lexbor/selectors"),
// .headerSearchPath("./lexbor/source/lexbor/tag"),
// .headerSearchPath("./lexbor/source/lexbor/unicode"),
// .headerSearchPath("./lexbor/source/lexbor/url"),
// .headerSearchPath("./lexbor/source/lexbor/utils"),
]
),
.testTarget(name: "LexborTests", dependencies: ["Lexbor"]),
],
cLanguageStandard: .gnu17
)