Skip to content

Commit 61bcc0a

Browse files
committed
SPM - Added Swift Package Manager Support - run via swift build or swift test on command line
1 parent 96b89c7 commit 61bcc0a

File tree

5 files changed

+46
-18
lines changed

5 files changed

+46
-18
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ Pods
55
xcuserdata/
66
*.swp
77
Carthage/
8+
.build/

Package.swift

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
// swift-tools-version:5.10
2+
import PackageDescription
3+
4+
let package = Package(
5+
name: "sf-ios",
6+
platforms: [.macOS(.v11), .iOS(.v12)],
7+
products: [
8+
.library(
9+
name: "sf-ios",
10+
targets: ["sf-ios"]),
11+
],
12+
targets: [
13+
.target(
14+
name: "sf-ios",
15+
path: "sf-ios",
16+
exclude: [
17+
"sf_ios.swift",
18+
// "sf_ios.h",
19+
"Info.plist", "sf-ios-Bridging-Header.h", "sf-ios-Prefix.pch"
20+
],
21+
publicHeadersPath: ".",
22+
cSettings: [
23+
.headerSearchPath("extended"),
24+
.headerSearchPath("util"),
25+
.headerSearchPath("util/centroid"),
26+
.headerSearchPath("util/filter"),
27+
.headerSearchPath("util/sweep"),
28+
]),
29+
.testTarget(
30+
name: "sf-iosTests",
31+
dependencies: ["sf-ios"],
32+
path: "sf-iosTests",
33+
exclude: ["Info.plist"],
34+
cSettings: [
35+
.headerSearchPath(""),
36+
.headerSearchPath("sweep"),
37+
.headerSearchPath("../sf-ios/extended"),
38+
.headerSearchPath("../sf-ios/util"),
39+
.headerSearchPath("../sf-ios/util/centroid"),
40+
.headerSearchPath("../sf-ios/util/filter"),
41+
.headerSearchPath("../sf-ios/util/sweep"),
42+
]),
43+
]
44+
)

sf-ios.xcodeproj/project.pbxproj

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@
6262
042FC6D11B96421E00549A4B /* SFGeometryPrinter.h in Headers */ = {isa = PBXBuildFile; fileRef = 042FC69C1B96421E00549A4B /* SFGeometryPrinter.h */; };
6363
042FC6D21B96421E00549A4B /* SFGeometryPrinter.m in Sources */ = {isa = PBXBuildFile; fileRef = 042FC69D1B96421E00549A4B /* SFGeometryPrinter.m */; };
6464
042FC6D31B96421E00549A4B /* sf-ios-Prefix.pch in Headers */ = {isa = PBXBuildFile; fileRef = 042FC69E1B96421E00549A4B /* sf-ios-Prefix.pch */; };
65-
042FC6D51B96453E00549A4B /* sf_ios.h in Headers */ = {isa = PBXBuildFile; fileRef = 042FC6D41B96453E00549A4B /* sf_ios.h */; };
6665
0445CB271EA1335B008DC0D7 /* SFGeometryUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 0445CB251EA1335B008DC0D7 /* SFGeometryUtils.h */; };
6766
0445CB281EA1335B008DC0D7 /* SFGeometryUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 0445CB261EA1335B008DC0D7 /* SFGeometryUtils.m */; };
6867
0445CB2B1EA1448C008DC0D7 /* SFCentroidPoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 0445CB291EA1448C008DC0D7 /* SFCentroidPoint.h */; };
@@ -175,7 +174,6 @@
175174
042FC69C1B96421E00549A4B /* SFGeometryPrinter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SFGeometryPrinter.h; sourceTree = "<group>"; };
176175
042FC69D1B96421E00549A4B /* SFGeometryPrinter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SFGeometryPrinter.m; sourceTree = "<group>"; };
177176
042FC69E1B96421E00549A4B /* sf-ios-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "sf-ios-Prefix.pch"; sourceTree = "<group>"; };
178-
042FC6D41B96453E00549A4B /* sf_ios.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sf_ios.h; sourceTree = "<group>"; };
179177
0445CB251EA1335B008DC0D7 /* SFGeometryUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SFGeometryUtils.h; sourceTree = "<group>"; };
180178
0445CB261EA1335B008DC0D7 /* SFGeometryUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SFGeometryUtils.m; sourceTree = "<group>"; };
181179
0445CB291EA1448C008DC0D7 /* SFCentroidPoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SFCentroidPoint.h; sourceTree = "<group>"; };
@@ -278,7 +276,6 @@
278276
042FC64D1B963FE500549A4B /* sf-ios */ = {
279277
isa = PBXGroup;
280278
children = (
281-
042FC6D41B96453E00549A4B /* sf_ios.h */,
282279
0493A58F2AE813B9000B75E6 /* sf_ios.swift */,
283280
042FC6681B96421E00549A4B /* SFCircularString.h */,
284281
042FC6691B96421E00549A4B /* SFCircularString.m */,
@@ -479,7 +476,6 @@
479476
042FC6BF1B96421E00549A4B /* SFPolyhedralSurface.h in Headers */,
480477
049D955D27B4479B003C8046 /* SFDegreesCentroid.h in Headers */,
481478
042FC6C51B96421E00549A4B /* SFTriangle.h in Headers */,
482-
042FC6D51B96453E00549A4B /* sf_ios.h in Headers */,
483479
0445CB271EA1335B008DC0D7 /* SFGeometryUtils.h in Headers */,
484480
0445CB2F1EA150D1008DC0D7 /* SFCentroidCurve.h in Headers */,
485481
041F18D324C75D53001311E4 /* SFGeometryFilter.h in Headers */,

sf-ios/sf-ios-Bridging-Header.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#ifndef sf_ios_Bridging_Header_h
1010
#define sf_ios_Bridging_Header_h
1111

12-
#import "sf_ios.h"
12+
// #import "sf_ios.h"
1313
#import "SFCircularString.h"
1414
#import "SFCompoundCurve.h"
1515
#import "SFCurve.h"

sf-ios/sf_ios.h

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)