// swift-tools-version: 5.8
//
//  Package.swift
//  CodeEditor
//
//  Created by david-swift on 27.11.23.
//

import PackageDescription

/// The CodeEditor package.
let package = Package(
    name: "CodeEditor",
    platforms: [.macOS(.v10_15)],
    products: [
        .library(
            name: "CodeEditor",
            targets: ["CodeEditor"]
        ),
        .library(
            name: "CCodeEditor",
            targets: ["CCodeEditor"]
        )
    ],
    dependencies: [
        .package(url: "https://git.aparoksha.dev/aparoksha/adwaita-swift", branch: "main")
    ],
    targets: [
        .target(
            name: "CodeEditor",
            dependencies: [.product(name: "Adwaita", package: "adwaita-swift"), "CCodeEditor"]
        ),
        .systemLibrary(
            name: "CCodeEditor",
            pkgConfig: "gtksourceview-5"
        ),
        .executableTarget(
            name: "Test",
            dependencies: ["CodeEditor", .product(name: "Adwaita", package: "adwaita-swift")],
            path: "Tests"
        )
    ]
)
