Can't find any info about it in documentation or on public forums, I've created a simple project that looks like this:
// swift-tools-version:5.3
import PackageDescription
let package = Package(
name: "foo_swift",
products: [
.library(
name: "foo",
targets: ["FooStatic"]),
],
targets: [
.target(
name: "FooStatic",
dependencies: [],
path: "Sources/",
publicHeadersPath: "include",
cSettings: [
.headerSearchPath("include")
],
cxxSettings: [
.headerSearchPath("include")
],
linkerSettings: [
.unsafeFlags(["-Llib", "-lfoo.a"])
]
)
],
cxxLanguageStandard: .cxx11
)
I've created a lib
folder in the root and put libfoo.a
there, when I do swift build
it passes but when I connect this library as a dependency in Xcode, I get an error that neither Library Search Path nor the library could be found. What am I missing?