diff --git a/Package.swift b/Package.swift index 9ad40c6..70e455e 100644 --- a/Package.swift +++ b/Package.swift @@ -2,6 +2,13 @@ // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription +// Starting with Xcode 12, we don't need to depend on our own libxml2 target +#if swift(>=5.3) && !os(Linux) +let dependencies: [Target.Dependency] = [] +#else +let dependencies: [Target.Dependency] = ["libxml2"] +#endif + #if swift(>=5.2) && !os(Linux) let pkgConfig: String? = nil #else @@ -33,7 +40,7 @@ let package = Package( ), .target( name: "Kanna", - dependencies: ["libxml2"], + dependencies: dependencies, path: "Sources", exclude: [ "Sources/Info.plist",