Avatar
norio_nomura 7/22/2019 3:50 AM
こんな感じ。 // swift-tools-version:5.0 import PackageDescription import Foundation let package = Package( name: "Foo", products: [ .library(name: "Foo", targets: ["Foo"]), .library(name: "CFoo", targets: ["CFoo"]) ], targets: [ .target(name: "Foo", swiftSettings: { ProcessInfo.processInfo.environment["UPDATE_SWIFT_HEADER"] != nil ? [.unsafeFlags(["-emit-objc-header-path", "Sources/CFoo/include/Foo-swift.h"])] : [] }()), .target(name: "CFoo", dependencies: ["Foo"]) ] ) (edited)