diff --git a/.gitignore b/.gitignore index 8a0fe86..5df6caa 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,5 @@ Xcode/SwiftFoundation.xcodeproj/xcuserdata Xcode/SwiftFoundation.xcodeproj/project.xcworkspace/xcuserdata .DS_Store + +.swiftpm diff --git a/Package.pins b/Package.pins deleted file mode 100644 index 520f3e0..0000000 --- a/Package.pins +++ /dev/null @@ -1,18 +0,0 @@ -{ - "autoPin": true, - "pins": [ - { - "package": "CJSONC", - "reason": null, - "repositoryURL": "https://github.com/PureSwift/CJSONC.git", - "version": "1.0.0" - }, - { - "package": "CStatfs", - "reason": null, - "repositoryURL": "https://github.com/PureSwift/CStatfs.git", - "version": "1.0.0" - } - ], - "version": 1 -} \ No newline at end of file diff --git a/Package.swift b/Package.swift index 4194a4e..095f104 100644 --- a/Package.swift +++ b/Package.swift @@ -1,10 +1,24 @@ +// swift-tools-version:5.1 import PackageDescription +let libraryType: PackageDescription.Product.Library.LibraryType +#if os(Linux) +libraryType = .dynamic +#else +libraryType = .static +#endif + let package = Package( name: "SwiftFoundation", - dependencies: [ - .Package(url: "https://github.com/PureSwift/CStatfs.git", majorVersion: 1), - .Package(url: "https://github.com/PureSwift/CJSONC.git", majorVersion: 1) + products: [ + .library( + name: "SwiftFoundation", + type: libraryType, + targets: ["SwiftFoundation"] + ) ], - exclude: ["Xcode", "Carthage"] + targets: [ + .target(name: "SwiftFoundation"), + .testTarget(name: "SwiftFoundationTests", dependencies: ["SwiftFoundation"]) + ] )