Skip to content

Commit 0e0df6f

Browse files
authored
Clarify what's really needed for SPM (#91)
1 parent afc8c4f commit 0e0df6f

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

README.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,21 @@ For more examples, see
6767
Add this library as a SwiftPM dependency:
6868

6969
```swift
70-
dependencies: [
71-
.package(url: "https://github.com/google/swift-benchmark", from: "0.1.0"),
72-
]
70+
let package = Package(
71+
name: ... ,
72+
products: [
73+
.executable(name: "Benchmarks", targets: ["Benchmarks"])
74+
],
75+
dependencies: [
76+
.package(url: "https://github.com/google/swift-benchmark", from: "0.1.0")
77+
],
78+
targets: [
79+
.target(
80+
name: "Benchmarks",
81+
dependencies: [.product(name: "Benchmark", package: "swift-benchmark")]
82+
)
83+
]
84+
)
7385
```
7486

7587
## Roadmap

0 commit comments

Comments
 (0)