From 5686637364c190f647cc0732cbb61f1e4220ee04 Mon Sep 17 00:00:00 2001 From: Fredrik Karlsson Date: Fri, 12 Jan 2018 17:06:39 +0100 Subject: [PATCH 1/3] SPM support --- Package.swift | 30 +++++++++++++++++++ {Turf => Sources}/CoreLocation.swift | 0 {Turf => Sources}/Info.plist | 0 {Turf => Sources}/Turf.h | 0 {Turf => Sources}/Turf.swift | 0 {TurfTests => Tests}/Fixture.swift | 0 {TurfTests => Tests}/Fixtures/dc-line.geojson | 0 {TurfTests => Tests}/Info.plist | 0 {TurfTests => Tests}/TurfTests.swift | 0 Turf.podspec | 2 +- Turf.xcodeproj/project.pbxproj | 12 ++++---- 11 files changed, 37 insertions(+), 7 deletions(-) create mode 100644 Package.swift rename {Turf => Sources}/CoreLocation.swift (100%) rename {Turf => Sources}/Info.plist (100%) rename {Turf => Sources}/Turf.h (100%) rename {Turf => Sources}/Turf.swift (100%) rename {TurfTests => Tests}/Fixture.swift (100%) rename {TurfTests => Tests}/Fixtures/dc-line.geojson (100%) rename {TurfTests => Tests}/Info.plist (100%) rename {TurfTests => Tests}/TurfTests.swift (100%) diff --git a/Package.swift b/Package.swift new file mode 100644 index 00000000..a736b6b8 --- /dev/null +++ b/Package.swift @@ -0,0 +1,30 @@ +// swift-tools-version:4.0 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "Turf", + products: [ + // Products define the executables and libraries produced by a package, and make them visible to other packages. + .library( + name: "Turf", + targets: ["Turf"]), + ], + dependencies: [ + // Dependencies declare other packages that this package depends on. + // .package(url: /* package url */, from: "1.0.0"), + ], + targets: [ + // Targets are the basic building blocks of a package. A target can define a module or a test suite. + // Targets can depend on other targets in this package, and on products in packages which this package depends on. + .target( + name: "Turf", + dependencies: [], + path: "Sources"), + .testTarget( + name: "Tests", + dependencies: ["Turf"], + path: "Tests"), + ] +) diff --git a/Turf/CoreLocation.swift b/Sources/CoreLocation.swift similarity index 100% rename from Turf/CoreLocation.swift rename to Sources/CoreLocation.swift diff --git a/Turf/Info.plist b/Sources/Info.plist similarity index 100% rename from Turf/Info.plist rename to Sources/Info.plist diff --git a/Turf/Turf.h b/Sources/Turf.h similarity index 100% rename from Turf/Turf.h rename to Sources/Turf.h diff --git a/Turf/Turf.swift b/Sources/Turf.swift similarity index 100% rename from Turf/Turf.swift rename to Sources/Turf.swift diff --git a/TurfTests/Fixture.swift b/Tests/Fixture.swift similarity index 100% rename from TurfTests/Fixture.swift rename to Tests/Fixture.swift diff --git a/TurfTests/Fixtures/dc-line.geojson b/Tests/Fixtures/dc-line.geojson similarity index 100% rename from TurfTests/Fixtures/dc-line.geojson rename to Tests/Fixtures/dc-line.geojson diff --git a/TurfTests/Info.plist b/Tests/Info.plist similarity index 100% rename from TurfTests/Info.plist rename to Tests/Info.plist diff --git a/TurfTests/TurfTests.swift b/Tests/TurfTests.swift similarity index 100% rename from TurfTests/TurfTests.swift rename to Tests/TurfTests.swift diff --git a/Turf.podspec b/Turf.podspec index 6fb0574b..a29db0a8 100644 --- a/Turf.podspec +++ b/Turf.podspec @@ -29,7 +29,7 @@ Pod::Spec.new do |s| # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # - s.source_files = "Turf/**/*" + s.source_files = "Sources/**/*" # ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # diff --git a/Turf.xcodeproj/project.pbxproj b/Turf.xcodeproj/project.pbxproj index 2edc2264..6037b27a 100644 --- a/Turf.xcodeproj/project.pbxproj +++ b/Turf.xcodeproj/project.pbxproj @@ -95,8 +95,8 @@ 35650AE61F150DC500B5C158 = { isa = PBXGroup; children = ( - 35650AF21F150DC500B5C158 /* Turf */, - 35650AFD1F150DC500B5C158 /* TurfTests */, + 35650AF21F150DC500B5C158 /* Sources */, + 35650AFD1F150DC500B5C158 /* Tests */, 35650AF11F150DC500B5C158 /* Products */, ); sourceTree = ""; @@ -112,7 +112,7 @@ name = Products; sourceTree = ""; }; - 35650AF21F150DC500B5C158 /* Turf */ = { + 35650AF21F150DC500B5C158 /* Sources */ = { isa = PBXGroup; children = ( 35650AF31F150DC500B5C158 /* Turf.h */, @@ -120,10 +120,10 @@ 35650AF41F150DC500B5C158 /* Info.plist */, 356D24531F17948C003BBB9D /* CoreLocation.swift */, ); - path = Turf; + path = Sources; sourceTree = ""; }; - 35650AFD1F150DC500B5C158 /* TurfTests */ = { + 35650AFD1F150DC500B5C158 /* Tests */ = { isa = PBXGroup; children = ( 356D24571F179B4A003BBB9D /* Fixtures */, @@ -131,7 +131,7 @@ 35650B001F150DC500B5C158 /* Info.plist */, 356D24551F179B32003BBB9D /* Fixture.swift */, ); - path = TurfTests; + path = Tests; sourceTree = ""; }; 356D24571F179B4A003BBB9D /* Fixtures */ = { From e4c262d51a700bad79074f5d0fdb004822d090e1 Mon Sep 17 00:00:00 2001 From: Fredrik Karlsson Date: Sun, 14 Jan 2018 18:07:44 +0100 Subject: [PATCH 2/3] Fix SPM tests --- Makefile | 21 +++++++++++++++++++ {TurfTests => Tests}/Fixtures/polygon.geojson | 0 Turf.xcodeproj/project.pbxproj | 16 +++++++------- 3 files changed, 29 insertions(+), 8 deletions(-) create mode 100644 Makefile rename {TurfTests => Tests}/Fixtures/polygon.geojson (100%) diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..25d83864 --- /dev/null +++ b/Makefile @@ -0,0 +1,21 @@ +UNAME = ${shell uname} + +ifeq ($(UNAME), Darwin) +PLATFORM = x86_64-apple-macosx10.10 +EXECUTABLE_DIRECTORY = ./.build/${PLATFORM}/debug +TEST_RESOURCES_DIRECTORY = ./.build/${PLATFORM}/debug/TurfPackageTests.xctest/Contents/Resources + +else ifeq ($(UNAME), Linux) +PLATFORM = x86_64-unknown-linux +EXECUTABLE_DIRECTORY = ./.build/${PLATFORM}/debug +TEST_RESOURCES_DIRECTORY = ${EXECUTABLE_DIRECTORY} +endif + +RUN_RESOURCES_DIRECTORY = ${EXECUTABLE_DIRECTORY} + +copyTestResources: + mkdir -p ${TEST_RESOURCES_DIRECTORY} + cp Tests/Fixtures/* ${TEST_RESOURCES_DIRECTORY} + +test: copyTestResources + swift test diff --git a/TurfTests/Fixtures/polygon.geojson b/Tests/Fixtures/polygon.geojson similarity index 100% rename from TurfTests/Fixtures/polygon.geojson rename to Tests/Fixtures/polygon.geojson diff --git a/Turf.xcodeproj/project.pbxproj b/Turf.xcodeproj/project.pbxproj index 6037b27a..c0436545 100644 --- a/Turf.xcodeproj/project.pbxproj +++ b/Turf.xcodeproj/project.pbxproj @@ -383,7 +383,7 @@ DYLIB_CURRENT_VERSION = 3; DYLIB_INSTALL_NAME_BASE = "@rpath"; FRAMEWORK_VERSION = A; - INFOPLIST_FILE = "$(SRCROOT)/Turf/Info.plist"; + INFOPLIST_FILE = "$(SRCROOT)/Sources/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; MACOSX_DEPLOYMENT_TARGET = 10.11; @@ -407,7 +407,7 @@ DYLIB_CURRENT_VERSION = 3; DYLIB_INSTALL_NAME_BASE = "@rpath"; FRAMEWORK_VERSION = A; - INFOPLIST_FILE = "$(SRCROOT)/Turf/Info.plist"; + INFOPLIST_FILE = "$(SRCROOT)/Sources/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; MACOSX_DEPLOYMENT_TARGET = 10.11; @@ -427,7 +427,7 @@ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CODE_SIGN_IDENTITY = "-"; COMBINE_HIDPI_IMAGES = YES; - INFOPLIST_FILE = TurfTests/Info.plist; + INFOPLIST_FILE = Tests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; MACOSX_DEPLOYMENT_TARGET = 10.13; PRODUCT_BUNDLE_IDENTIFIER = com.mapbox.TurfMacTests; @@ -445,7 +445,7 @@ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CODE_SIGN_IDENTITY = "-"; COMBINE_HIDPI_IMAGES = YES; - INFOPLIST_FILE = TurfTests/Info.plist; + INFOPLIST_FILE = Tests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; MACOSX_DEPLOYMENT_TARGET = 10.13; PRODUCT_BUNDLE_IDENTIFIER = com.mapbox.TurfMacTests; @@ -581,7 +581,7 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 3; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "$(SRCROOT)/Turf/Info.plist"; + INFOPLIST_FILE = "$(SRCROOT)/Sources/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; @@ -604,7 +604,7 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 3; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "$(SRCROOT)/Turf/Info.plist"; + INFOPLIST_FILE = "$(SRCROOT)/Sources/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; @@ -621,7 +621,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - INFOPLIST_FILE = TurfTests/Info.plist; + INFOPLIST_FILE = Tests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.mapbox.TurfTests; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -635,7 +635,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - INFOPLIST_FILE = TurfTests/Info.plist; + INFOPLIST_FILE = Tests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.mapbox.TurfTests; PRODUCT_NAME = "$(TARGET_NAME)"; From a425fd5921342840e01852d2b958e6f45a07f76c Mon Sep 17 00:00:00 2001 From: Fredrik Karlsson Date: Mon, 15 Jan 2018 02:26:33 +0100 Subject: [PATCH 3/3] Linux support --- Makefile | 21 --- Package.swift | 8 +- Sources/{ => Turf}/CoreLocation.swift | 13 +- Sources/{ => Turf}/Info.plist | 0 Sources/{ => Turf}/Turf.h | 0 Sources/{ => Turf}/Turf.swift | 9 +- Tests/LinuxMain.swift | 6 + Tests/{ => TurfTests}/Fixture.swift | 0 .../{ => TurfTests}/Fixtures/dc-line.geojson | 0 .../{ => TurfTests}/Fixtures/polygon.geojson | 0 Tests/{ => TurfTests}/Info.plist | 0 Tests/{ => TurfTests}/TurfTests.swift | 0 Turf.xcodeproj/project.pbxproj | 144 ++++++++++-------- 13 files changed, 107 insertions(+), 94 deletions(-) delete mode 100644 Makefile rename Sources/{ => Turf}/CoreLocation.swift (90%) rename Sources/{ => Turf}/Info.plist (100%) rename Sources/{ => Turf}/Turf.h (100%) rename Sources/{ => Turf}/Turf.swift (98%) create mode 100644 Tests/LinuxMain.swift rename Tests/{ => TurfTests}/Fixture.swift (100%) rename Tests/{ => TurfTests}/Fixtures/dc-line.geojson (100%) rename Tests/{ => TurfTests}/Fixtures/polygon.geojson (100%) rename Tests/{ => TurfTests}/Info.plist (100%) rename Tests/{ => TurfTests}/TurfTests.swift (100%) diff --git a/Makefile b/Makefile deleted file mode 100644 index 25d83864..00000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -UNAME = ${shell uname} - -ifeq ($(UNAME), Darwin) -PLATFORM = x86_64-apple-macosx10.10 -EXECUTABLE_DIRECTORY = ./.build/${PLATFORM}/debug -TEST_RESOURCES_DIRECTORY = ./.build/${PLATFORM}/debug/TurfPackageTests.xctest/Contents/Resources - -else ifeq ($(UNAME), Linux) -PLATFORM = x86_64-unknown-linux -EXECUTABLE_DIRECTORY = ./.build/${PLATFORM}/debug -TEST_RESOURCES_DIRECTORY = ${EXECUTABLE_DIRECTORY} -endif - -RUN_RESOURCES_DIRECTORY = ${EXECUTABLE_DIRECTORY} - -copyTestResources: - mkdir -p ${TEST_RESOURCES_DIRECTORY} - cp Tests/Fixtures/* ${TEST_RESOURCES_DIRECTORY} - -test: copyTestResources - swift test diff --git a/Package.swift b/Package.swift index a736b6b8..e92db734 100644 --- a/Package.swift +++ b/Package.swift @@ -20,11 +20,9 @@ let package = Package( // Targets can depend on other targets in this package, and on products in packages which this package depends on. .target( name: "Turf", - dependencies: [], - path: "Sources"), + dependencies: []), .testTarget( - name: "Tests", - dependencies: ["Turf"], - path: "Tests"), + name: "TurfTests", + dependencies: ["Turf"]), ] ) diff --git a/Sources/CoreLocation.swift b/Sources/Turf/CoreLocation.swift similarity index 90% rename from Sources/CoreLocation.swift rename to Sources/Turf/CoreLocation.swift index 771128b3..804b35fe 100644 --- a/Sources/CoreLocation.swift +++ b/Sources/Turf/CoreLocation.swift @@ -1,7 +1,14 @@ +import Foundation +#if os(Linux) +public struct CLLocationCoordinate2D { + let latitude: Double + let longitude: Double +} +public typealias CLLocationDirection = Double +public typealias CLLocationDistance = Double +public typealias CLLocationDegrees = Double +#else import CoreLocation - -#if os(OSX) -let CLLocationDistanceMax: CLLocationDistance = .greatestFiniteMagnitude #endif extension CLLocationDirection { diff --git a/Sources/Info.plist b/Sources/Turf/Info.plist similarity index 100% rename from Sources/Info.plist rename to Sources/Turf/Info.plist diff --git a/Sources/Turf.h b/Sources/Turf/Turf.h similarity index 100% rename from Sources/Turf.h rename to Sources/Turf/Turf.h diff --git a/Sources/Turf.swift b/Sources/Turf/Turf.swift similarity index 98% rename from Sources/Turf.swift rename to Sources/Turf/Turf.swift index e1666fc8..b8de7144 100644 --- a/Sources/Turf.swift +++ b/Sources/Turf/Turf.swift @@ -1,4 +1,7 @@ +import Foundation +#if !os(Linux) import CoreLocation +#endif public typealias LocationRadians = Double public typealias RadianDistance = Double @@ -274,13 +277,13 @@ public struct Polyline { let intersectionPoint = Turf.intersection((perpendicularPoint1, perpendicularPoint2), segment) let intersectionDistance: CLLocationDistance? = intersectionPoint != nil ? coordinate.distance(to: intersectionPoint!) : nil - if distances.0 < closestCoordinate?.distance ?? CLLocationDistanceMax { + if distances.0 < closestCoordinate?.distance ?? .greatestFiniteMagnitude { closestCoordinate = IndexedCoordinate(coordinate: segment.0, index: index, distance: distances.0) } - if distances.1 < closestCoordinate?.distance ?? CLLocationDistanceMax { + if distances.1 < closestCoordinate?.distance ?? .greatestFiniteMagnitude { closestCoordinate = IndexedCoordinate(coordinate: segment.1, index: index+1, distance: distances.1) } - if intersectionDistance != nil && intersectionDistance! < closestCoordinate?.distance ?? CLLocationDistanceMax { + if intersectionDistance != nil && intersectionDistance! < closestCoordinate?.distance ?? .greatestFiniteMagnitude { closestCoordinate = IndexedCoordinate(coordinate: intersectionPoint!, index: (distances.0 < distances.1 ? index : index+1), distance: intersectionDistance!) } } diff --git a/Tests/LinuxMain.swift b/Tests/LinuxMain.swift new file mode 100644 index 00000000..f29700f5 --- /dev/null +++ b/Tests/LinuxMain.swift @@ -0,0 +1,6 @@ +import XCTest +@testable import Turf + +XCTMain([ + testCase(TurfTests.allTests) +]) diff --git a/Tests/Fixture.swift b/Tests/TurfTests/Fixture.swift similarity index 100% rename from Tests/Fixture.swift rename to Tests/TurfTests/Fixture.swift diff --git a/Tests/Fixtures/dc-line.geojson b/Tests/TurfTests/Fixtures/dc-line.geojson similarity index 100% rename from Tests/Fixtures/dc-line.geojson rename to Tests/TurfTests/Fixtures/dc-line.geojson diff --git a/Tests/Fixtures/polygon.geojson b/Tests/TurfTests/Fixtures/polygon.geojson similarity index 100% rename from Tests/Fixtures/polygon.geojson rename to Tests/TurfTests/Fixtures/polygon.geojson diff --git a/Tests/Info.plist b/Tests/TurfTests/Info.plist similarity index 100% rename from Tests/Info.plist rename to Tests/TurfTests/Info.plist diff --git a/Tests/TurfTests.swift b/Tests/TurfTests/TurfTests.swift similarity index 100% rename from Tests/TurfTests.swift rename to Tests/TurfTests/TurfTests.swift diff --git a/Turf.xcodeproj/project.pbxproj b/Turf.xcodeproj/project.pbxproj index c0436545..b7ec6feb 100644 --- a/Turf.xcodeproj/project.pbxproj +++ b/Turf.xcodeproj/project.pbxproj @@ -7,22 +7,23 @@ objects = { /* Begin PBXBuildFile section */ - 052521D81FC47A1300DD266A /* polygon.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 052521D71FC47A0300DD266A /* polygon.geojson */; }; - 052521D91FC47A1900DD266A /* polygon.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 052521D71FC47A0300DD266A /* polygon.geojson */; }; + 3534C3B8200C419100F93581 /* dc-line.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 3547ECFB200C3C82009DA062 /* dc-line.geojson */; }; + 3534C3B9200C419100F93581 /* polygon.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 3547ECFC200C3C82009DA062 /* polygon.geojson */; }; + 3534C3BA200C419200F93581 /* dc-line.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 3547ECFB200C3C82009DA062 /* dc-line.geojson */; }; + 3534C3BB200C419200F93581 /* polygon.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 3547ECFC200C3C82009DA062 /* polygon.geojson */; }; + 3534C3BC200C442700F93581 /* CoreLocation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3547ECF0200C3C78009DA062 /* CoreLocation.swift */; }; + 3534C3BD200C442A00F93581 /* Turf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3547ECF1200C3C78009DA062 /* Turf.swift */; }; 353E9B101F3E093A007CFA23 /* Turf.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 353E9B071F3E093A007CFA23 /* Turf.framework */; }; - 353E9B1E1F3E09D3007CFA23 /* CoreLocation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 356D24531F17948C003BBB9D /* CoreLocation.swift */; }; - 353E9B1F1F3E09D8007CFA23 /* Turf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35650B0A1F150DDB00B5C158 /* Turf.swift */; }; - 353E9B201F3E09DA007CFA23 /* Turf.h in Headers */ = {isa = PBXBuildFile; fileRef = 35650AF31F150DC500B5C158 /* Turf.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 3547ECF4200C3C78009DA062 /* Turf.h in Headers */ = {isa = PBXBuildFile; fileRef = 3547ECEF200C3C78009DA062 /* Turf.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 3547ECF5200C3C78009DA062 /* CoreLocation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3547ECF0200C3C78009DA062 /* CoreLocation.swift */; }; + 3547ECF6200C3C78009DA062 /* Turf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3547ECF1200C3C78009DA062 /* Turf.swift */; }; + 3547ED08200C3C83009DA062 /* Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3547ECFE200C3C82009DA062 /* Info.plist */; }; + 3547ED0E200C3E00009DA062 /* TurfTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3547ECF9200C3C82009DA062 /* TurfTests.swift */; }; + 3547ED0F200C3E01009DA062 /* TurfTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3547ECF9200C3C82009DA062 /* TurfTests.swift */; }; + 3547ED10200C3E0B009DA062 /* Fixture.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3547ECFD200C3C82009DA062 /* Fixture.swift */; }; + 3547ED11200C3E0C009DA062 /* Fixture.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3547ECFD200C3C82009DA062 /* Fixture.swift */; }; + 3547ED12200C3E49009DA062 /* Turf.h in Headers */ = {isa = PBXBuildFile; fileRef = 3547ECEF200C3C78009DA062 /* Turf.h */; settings = {ATTRIBUTES = (Public, ); }; }; 35650AFA1F150DC500B5C158 /* Turf.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 35650AF01F150DC500B5C158 /* Turf.framework */; }; - 35650AFF1F150DC500B5C158 /* TurfTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35650AFE1F150DC500B5C158 /* TurfTests.swift */; }; - 35650B011F150DC500B5C158 /* Turf.h in Headers */ = {isa = PBXBuildFile; fileRef = 35650AF31F150DC500B5C158 /* Turf.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 35650B0B1F150DDB00B5C158 /* Turf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35650B0A1F150DDB00B5C158 /* Turf.swift */; }; - 356D24541F17948C003BBB9D /* CoreLocation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 356D24531F17948C003BBB9D /* CoreLocation.swift */; }; - 356D24561F179B32003BBB9D /* Fixture.swift in Sources */ = {isa = PBXBuildFile; fileRef = 356D24551F179B32003BBB9D /* Fixture.swift */; }; - 356D24591F179B72003BBB9D /* dc-line.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 356D24581F179B72003BBB9D /* dc-line.geojson */; }; - 35CB7F6D1F79899C008A18C8 /* TurfTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35650AFE1F150DC500B5C158 /* TurfTests.swift */; }; - 35CB7F6E1F798A4B008A18C8 /* Fixture.swift in Sources */ = {isa = PBXBuildFile; fileRef = 356D24551F179B32003BBB9D /* Fixture.swift */; }; - 35CB7F6F1F798A51008A18C8 /* dc-line.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 356D24581F179B72003BBB9D /* dc-line.geojson */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -43,19 +44,20 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 052521D71FC47A0300DD266A /* polygon.geojson */ = {isa = PBXFileReference; lastKnownFileType = text; path = polygon.geojson; sourceTree = ""; }; 353E9B071F3E093A007CFA23 /* Turf.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Turf.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 353E9B0F1F3E093A007CFA23 /* TurfMacTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TurfMacTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 3547ECEF200C3C78009DA062 /* Turf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Turf.h; sourceTree = ""; }; + 3547ECF0200C3C78009DA062 /* CoreLocation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CoreLocation.swift; sourceTree = ""; }; + 3547ECF1200C3C78009DA062 /* Turf.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Turf.swift; sourceTree = ""; }; + 3547ECF2200C3C78009DA062 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 3547ECF9200C3C82009DA062 /* TurfTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TurfTests.swift; sourceTree = ""; }; + 3547ECFB200C3C82009DA062 /* dc-line.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "dc-line.geojson"; sourceTree = ""; }; + 3547ECFC200C3C82009DA062 /* polygon.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = polygon.geojson; sourceTree = ""; }; + 3547ECFD200C3C82009DA062 /* Fixture.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Fixture.swift; sourceTree = ""; }; + 3547ECFE200C3C82009DA062 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 3547ED09200C3C8A009DA062 /* LinuxMain.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LinuxMain.swift; sourceTree = ""; }; 35650AF01F150DC500B5C158 /* Turf.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Turf.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 35650AF31F150DC500B5C158 /* Turf.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Turf.h; sourceTree = ""; }; - 35650AF41F150DC500B5C158 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 35650AF91F150DC500B5C158 /* TurfTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TurfTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 35650AFE1F150DC500B5C158 /* TurfTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TurfTests.swift; sourceTree = ""; }; - 35650B001F150DC500B5C158 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 35650B0A1F150DDB00B5C158 /* Turf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Turf.swift; sourceTree = ""; }; - 356D24531F17948C003BBB9D /* CoreLocation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CoreLocation.swift; sourceTree = ""; }; - 356D24551F179B32003BBB9D /* Fixture.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Fixture.swift; sourceTree = ""; }; - 356D24581F179B72003BBB9D /* dc-line.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "dc-line.geojson"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -92,6 +94,37 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 3547ECED200C3C78009DA062 /* Turf */ = { + isa = PBXGroup; + children = ( + 3547ECEF200C3C78009DA062 /* Turf.h */, + 3547ECF0200C3C78009DA062 /* CoreLocation.swift */, + 3547ECF1200C3C78009DA062 /* Turf.swift */, + 3547ECF2200C3C78009DA062 /* Info.plist */, + ); + path = Turf; + sourceTree = ""; + }; + 3547ECF8200C3C82009DA062 /* TurfTests */ = { + isa = PBXGroup; + children = ( + 3547ECF9200C3C82009DA062 /* TurfTests.swift */, + 3547ECFA200C3C82009DA062 /* Fixtures */, + 3547ECFD200C3C82009DA062 /* Fixture.swift */, + 3547ECFE200C3C82009DA062 /* Info.plist */, + ); + path = TurfTests; + sourceTree = ""; + }; + 3547ECFA200C3C82009DA062 /* Fixtures */ = { + isa = PBXGroup; + children = ( + 3547ECFB200C3C82009DA062 /* dc-line.geojson */, + 3547ECFC200C3C82009DA062 /* polygon.geojson */, + ); + path = Fixtures; + sourceTree = ""; + }; 35650AE61F150DC500B5C158 = { isa = PBXGroup; children = ( @@ -115,10 +148,7 @@ 35650AF21F150DC500B5C158 /* Sources */ = { isa = PBXGroup; children = ( - 35650AF31F150DC500B5C158 /* Turf.h */, - 35650B0A1F150DDB00B5C158 /* Turf.swift */, - 35650AF41F150DC500B5C158 /* Info.plist */, - 356D24531F17948C003BBB9D /* CoreLocation.swift */, + 3547ECED200C3C78009DA062 /* Turf */, ); path = Sources; sourceTree = ""; @@ -126,23 +156,12 @@ 35650AFD1F150DC500B5C158 /* Tests */ = { isa = PBXGroup; children = ( - 356D24571F179B4A003BBB9D /* Fixtures */, - 35650AFE1F150DC500B5C158 /* TurfTests.swift */, - 35650B001F150DC500B5C158 /* Info.plist */, - 356D24551F179B32003BBB9D /* Fixture.swift */, + 3547ED09200C3C8A009DA062 /* LinuxMain.swift */, + 3547ECF8200C3C82009DA062 /* TurfTests */, ); path = Tests; sourceTree = ""; }; - 356D24571F179B4A003BBB9D /* Fixtures */ = { - isa = PBXGroup; - children = ( - 356D24581F179B72003BBB9D /* dc-line.geojson */, - 052521D71FC47A0300DD266A /* polygon.geojson */, - ); - path = Fixtures; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ @@ -150,7 +169,7 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 353E9B201F3E09DA007CFA23 /* Turf.h in Headers */, + 3547ED12200C3E49009DA062 /* Turf.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -158,7 +177,7 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 35650B011F150DC500B5C158 /* Turf.h in Headers */, + 3547ECF4200C3C78009DA062 /* Turf.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -288,6 +307,7 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 3547ED08200C3C83009DA062 /* Info.plist in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -295,8 +315,8 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 35CB7F6F1F798A51008A18C8 /* dc-line.geojson in Resources */, - 052521D91FC47A1900DD266A /* polygon.geojson in Resources */, + 3534C3BB200C419200F93581 /* polygon.geojson in Resources */, + 3534C3BA200C419200F93581 /* dc-line.geojson in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -311,8 +331,8 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 356D24591F179B72003BBB9D /* dc-line.geojson in Resources */, - 052521D81FC47A1300DD266A /* polygon.geojson in Resources */, + 3534C3B9200C419100F93581 /* polygon.geojson in Resources */, + 3534C3B8200C419100F93581 /* dc-line.geojson in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -323,8 +343,8 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 353E9B1F1F3E09D8007CFA23 /* Turf.swift in Sources */, - 353E9B1E1F3E09D3007CFA23 /* CoreLocation.swift in Sources */, + 3534C3BD200C442A00F93581 /* Turf.swift in Sources */, + 3534C3BC200C442700F93581 /* CoreLocation.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -332,8 +352,8 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 35CB7F6D1F79899C008A18C8 /* TurfTests.swift in Sources */, - 35CB7F6E1F798A4B008A18C8 /* Fixture.swift in Sources */, + 3547ED0F200C3E01009DA062 /* TurfTests.swift in Sources */, + 3547ED11200C3E0C009DA062 /* Fixture.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -341,8 +361,8 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 35650B0B1F150DDB00B5C158 /* Turf.swift in Sources */, - 356D24541F17948C003BBB9D /* CoreLocation.swift in Sources */, + 3547ECF6200C3C78009DA062 /* Turf.swift in Sources */, + 3547ECF5200C3C78009DA062 /* CoreLocation.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -350,8 +370,8 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 35650AFF1F150DC500B5C158 /* TurfTests.swift in Sources */, - 356D24561F179B32003BBB9D /* Fixture.swift in Sources */, + 3547ED0E200C3E00009DA062 /* TurfTests.swift in Sources */, + 3547ED10200C3E0B009DA062 /* Fixture.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -383,7 +403,7 @@ DYLIB_CURRENT_VERSION = 3; DYLIB_INSTALL_NAME_BASE = "@rpath"; FRAMEWORK_VERSION = A; - INFOPLIST_FILE = "$(SRCROOT)/Sources/Info.plist"; + INFOPLIST_FILE = "$(SRCROOT)/Sources/Turf/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; MACOSX_DEPLOYMENT_TARGET = 10.11; @@ -407,7 +427,7 @@ DYLIB_CURRENT_VERSION = 3; DYLIB_INSTALL_NAME_BASE = "@rpath"; FRAMEWORK_VERSION = A; - INFOPLIST_FILE = "$(SRCROOT)/Sources/Info.plist"; + INFOPLIST_FILE = "$(SRCROOT)/Sources/Turf/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; MACOSX_DEPLOYMENT_TARGET = 10.11; @@ -427,7 +447,7 @@ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CODE_SIGN_IDENTITY = "-"; COMBINE_HIDPI_IMAGES = YES; - INFOPLIST_FILE = Tests/Info.plist; + INFOPLIST_FILE = Tests/TurfTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; MACOSX_DEPLOYMENT_TARGET = 10.13; PRODUCT_BUNDLE_IDENTIFIER = com.mapbox.TurfMacTests; @@ -445,7 +465,7 @@ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CODE_SIGN_IDENTITY = "-"; COMBINE_HIDPI_IMAGES = YES; - INFOPLIST_FILE = Tests/Info.plist; + INFOPLIST_FILE = Tests/TurfTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; MACOSX_DEPLOYMENT_TARGET = 10.13; PRODUCT_BUNDLE_IDENTIFIER = com.mapbox.TurfMacTests; @@ -581,7 +601,7 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 3; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "$(SRCROOT)/Sources/Info.plist"; + INFOPLIST_FILE = "$(SRCROOT)/Sources/Turf/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; @@ -604,7 +624,7 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 3; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "$(SRCROOT)/Sources/Info.plist"; + INFOPLIST_FILE = "$(SRCROOT)/Sources/Turf/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; @@ -621,7 +641,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - INFOPLIST_FILE = Tests/Info.plist; + INFOPLIST_FILE = Tests/TurfTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.mapbox.TurfTests; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -635,7 +655,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - INFOPLIST_FILE = Tests/Info.plist; + INFOPLIST_FILE = Tests/TurfTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.mapbox.TurfTests; PRODUCT_NAME = "$(TARGET_NAME)";