Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update for Xcode 12 & SPM #9

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 47 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,48 @@
xcuserdata/
# Created by https://www.toptal.com/developers/gitignore/api/xcode,swiftpackagemanager
# Edit at https://www.toptal.com/developers/gitignore?templates=xcode,swiftpackagemanager

.DS_STORE

### SwiftPackageManager ###
Packages
.build/
xcuserdata
DerivedData/
.DS_Store
*.xcodeproj


### Xcode ###
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore

## User settings
xcuserdata/

## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9)
*.xcscmblueprint
*.xccheckout

## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4)
build/
*.moved-aside
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3

## Gcc Patch
/*.gcno

### Xcode Patch ###
*.xcodeproj/*
!*.xcodeproj/project.pbxproj
!*.xcodeproj/xcshareddata/
!*.xcworkspace/contents.xcworkspacedata
**/xcshareddata/WorkspaceSettings.xcsettings

# End of https://www.toptal.com/developers/gitignore/api/xcode,swiftpackagemanager
38 changes: 38 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// swift-tools-version:5.3
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "SwiftZSTD",
products: [
.library(
name: "SwiftZSTD",
targets: ["SwiftZSTD", "SwiftZSTDC", "zstdlib"]),
],
dependencies: [],
targets: [
.target(
name: "SwiftZSTD",
dependencies: ["SwiftZSTDC", "zstdlib"]),
.target(
name: "SwiftZSTDC",
dependencies: ["zstdlib"],
publicHeadersPath: "include"),
.target(
name: "zstdlib",
dependencies: [],
exclude: ["LICENSE"],
publicHeadersPath: "include",
cSettings: [
.headerSearchPath("common"),
.headerSearchPath("compress"),
.headerSearchPath("decompress"),
.headerSearchPath("dictBuilder"),
.headerSearchPath("include/zstdlib")
]),
.testTarget(
name: "SwiftZSTDTests",
dependencies: ["SwiftZSTD"]),
]
)
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
//

import Foundation
import zstdlib

/**
* A class to compress a buffer into a frame or to decompress a frame using a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
//

import Foundation
import zstdlib
import SwiftZSTDC

/**
* Exceptions thrown by the dictionary builder.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
//

import Foundation
import zstdlib

/**
* Class that supports compression/decompression of an in-memory buffer without using
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
//

import Foundation
import zstdlib

/**
* Types of exceptions thrown by the wrapper.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//

import Foundation
import SwiftZSTDC

/**
* Types of exceptions that can be thrown when using stream operations.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//
//

#import "zstd.h"
#import <zstdlib/zstd.h>

@interface CompressionOC : NSObject

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//

#import <Foundation/Foundation.h>
#import <StreamHelpers.h>
#import "StreamHelpers.h"

@implementation CompressionOC {
ZSTD_CStream * cStream;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@
//
//

#import <Cocoa/Cocoa.h>
#if __has_include(<UIKit/UIKit.h>)
#import <UIKit/UIKit.h>
#else
#import <Cocoa/Cocoa.h>
#endif

//! Project version number for SwiftZSTD_macOS.
FOUNDATION_EXPORT double SwiftZSTDVersionNumber;
Expand All @@ -16,9 +20,9 @@ FOUNDATION_EXPORT const unsigned char SwiftZSTDVersionString[];

// In this header, you should import all the public headers of your framework using statements like #import <SwiftZSTD_macOS/PublicHeader.h>

//#import "zstd.h"
#import "zdict.h"
#import <zstdlib/zstd.h>
#import <zstdlib/zdict.h>

#import "StreamHelpers.h"
#import "../../StreamHelpers.h"


File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading