// swift-tools-version: 6.4 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription let package = Package( name: "NorgUI", defaultLocalization: "en", platforms: [ .iOS(.v18), .macOS(.v15), .visionOS(.v2), ], products: [ // Products define the executables and libraries a package produces, making them visible to other packages. .library( name: "NorgUI", targets: ["NorgUI"] ), ], traits: [ .trait( name: "SwiftMathSupport", description: "Render inline and block math using SwiftMath." ), ], dependencies: [ .package(url: "https://git.sr.ht/~rbdr/norgkit", from: "1.0.0"), .package(url: "https://github.com/mgriebling/SwiftMath", from: "1.7.0"), ], targets: [ // Targets are the basic building blocks of a package, defining a module or a test suite. // Targets can depend on other targets in this package and products from dependencies. .target( name: "NorgUI", dependencies: [ .product(name: "NorgKit", package: "norgkit"), .product( name: "SwiftMath", package: "SwiftMath", condition: .when(traits: ["SwiftMathSupport"])), ], resources: [ .process("Resources"), ], swiftSettings: [ .enableUpcomingFeature("ApproachableConcurrency"), ], ), .testTarget( name: "NorgUITests", dependencies: ["NorgUI"], swiftSettings: [ .enableUpcomingFeature("ApproachableConcurrency"), ], ), ], swiftLanguageModes: [.v6] )