Adjusted the naming of the library in the Package file.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Cross-compiles the PlayDate target for Playdate hardware (Embedded Swift,
|
||||
# Cross-compiles the PlaydateKit target for Playdate hardware (Embedded Swift,
|
||||
# ARM Cortex-M7) as a compile-only check that the bindings stay within the
|
||||
# Embedded Swift subset. Linking is left to game projects.
|
||||
#
|
||||
@@ -46,7 +46,7 @@ echo "Using arm-none-eabi headers: $include_dir"
|
||||
# bare-metal ELF objects.
|
||||
exec "$swift_bin" build \
|
||||
--build-system native \
|
||||
--target PlayDate \
|
||||
--target PlaydateKit \
|
||||
--triple armv7em-none-none-eabi \
|
||||
-Xswiftc -enable-experimental-feature -Xswiftc Embedded \
|
||||
-Xswiftc -wmo \
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Verifies the package works as a SwiftPM dependency: generates a scratch
|
||||
# executable package that depends on play-date, imports both modules, and
|
||||
# executable package that depends on playdate-kit, imports both modules, and
|
||||
# runs it. This guards the pkg-config setup — target settings that don't
|
||||
# propagate to consumers (or manifest validation failures) surface here,
|
||||
# not on this package's own build.
|
||||
@@ -21,12 +21,14 @@ import PackageDescription
|
||||
let package = Package(
|
||||
name: "consumer",
|
||||
dependencies: [
|
||||
.package(path: "$package_dir"),
|
||||
// The explicit name overrides the identity a path dependency
|
||||
// otherwise derives from the checkout directory's name.
|
||||
.package(name: "playdate-kit", path: "$package_dir"),
|
||||
],
|
||||
targets: [
|
||||
.executableTarget(
|
||||
name: "consumer",
|
||||
dependencies: [.product(name: "PlayDate", package: "play-date")]
|
||||
dependencies: [.product(name: "PlaydateKit", package: "playdate-kit")]
|
||||
),
|
||||
]
|
||||
)
|
||||
@@ -34,7 +36,7 @@ EOF
|
||||
|
||||
cat > "$scratch_dir/Sources/consumer/main.swift" <<'EOF'
|
||||
import CPlaydate
|
||||
import PlayDate
|
||||
import PlaydateKit
|
||||
|
||||
// Touch a type from each module to prove both import and link.
|
||||
let event = SystemEvent(event: kEventInit, argument: 0)
|
||||
|
||||
Reference in New Issue
Block a user