From 2051a137b52995d7795c0dc9c08cd2ea2a2b570c Mon Sep 17 00:00:00 2001 From: fwcd Date: Sat, 30 Mar 2019 20:21:26 +0100 Subject: [PATCH] Migrate Package.swift to 4.2, use new module structure and add gitignore --- .gitignore | 3 +++ Package.swift | 14 +++++++++++--- .../CCairo/module.modulemap | 0 shim.h => Sources/CCairo/shim.h | 0 4 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 .gitignore rename module.modulemap => Sources/CCairo/module.modulemap (100%) rename shim.h => Sources/CCairo/shim.h (100%) diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..be9db84 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.build +.vscode +.DS_Store diff --git a/Package.swift b/Package.swift index 51d59e1..4e950f8 100644 --- a/Package.swift +++ b/Package.swift @@ -1,10 +1,18 @@ -// swift-tools-version:3.0.2 +// swift-tools-version:4.2 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription let package = Package( name: "CCairo", - pkgConfig: "cairo", - providers: [.Brew("cairo"), .Apt("libcairo-dev")] + products: [ + .library(name: "CCairo", targets: ["CCairo"]) + ], + targets: [ + .systemLibrary( + name: "CCairo", + pkgConfig: "cairo", + providers: [.brew(["cairo"]), .apt(["libcairo2-dev"])] + ) + ] ) diff --git a/module.modulemap b/Sources/CCairo/module.modulemap similarity index 100% rename from module.modulemap rename to Sources/CCairo/module.modulemap diff --git a/shim.h b/Sources/CCairo/shim.h similarity index 100% rename from shim.h rename to Sources/CCairo/shim.h