spine-runtimes/Package.swift
Mario Zechner ecbd700af4 Restructure spine-ios modules: SpineC, SpineSwift, SpineiOS
- Created clean module separation:
  - SpineC: C/C++ compilation only (working)
  - SpineSwift: Generated Swift bindings + platform-agnostic API
  - SpineiOS: iOS-specific UI components only
- Updated Package.swift with proper target structure
- Moved generated Swift files to SpineSwift/Generated
- Removed redundant SpineModule
- Created test with skeleton_drawable_test.swift ported from Dart
- Test successfully runs using SpineC module directly
- Note: SpineSwift has Objective-C selector conflicts to be fixed
2025-08-11 19:07:29 +02:00

76 lines
2.1 KiB
Swift

// swift-tools-version: 5.9
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "spine-ios",
platforms: [
.iOS(.v13),
.tvOS(.v13),
.macCatalyst(.v13),
.visionOS(.v1),
.macOS(.v10_15),
.watchOS(.v6),
],
products: [
// Products define the executables and libraries a package produces, making them visible to other packages.
.library(
name: "SpineC",
targets: ["SpineC"]
),
.library(
name: "SpineSwift",
targets: ["SpineSwift"]
),
.library(
name: "SpineiOS",
targets: ["SpineiOS"]
)
],
targets: [
.target(
name: "SpineiOS",
dependencies: [
"SpineSwift",
"SpineShadersStructs",
],
path: "spine-ios/Sources/SpineiOS"
),
.target(
name: "SpineC",
path: "spine-ios/Sources/SpineC",
sources: [
"spine-c/src/extensions.cpp",
"spine-c/src/generated",
"spine-cpp/src/spine"
],
publicHeadersPath: "spine-c/include",
cxxSettings: [
.headerSearchPath("spine-c/include"),
.headerSearchPath("spine-c/src"),
.headerSearchPath("spine-c/src/generated"),
.headerSearchPath("spine-cpp/include"),
.headerSearchPath("spine-cpp/src"),
],
linkerSettings: [
.linkedLibrary("c++")
]
),
.target(
name: "SpineSwift",
dependencies: ["SpineC"],
path: "spine-ios/Sources/SpineSwift",
sources: [
"Generated",
"Extensions"
]
),
.systemLibrary(
name: "SpineShadersStructs",
path: "spine-ios/Sources/SpineShadersStructs"
),
],
cxxLanguageStandard: .cxx11
)