mirror of
https://github.com/ZipArchive/ZipArchive.git
synced 2026-05-01 10:22:26 +00:00
Adding support for Swift Package Manager
- moved public headers to `include/` - added `Package.swift` matching configuration specified in `SSZipArchive.podspec` - updated original project to reflect new folder structure - updated `SSZipArchive.podspec` to reflect new folder structure - added `.build/` to the ignore list - removed eXecute permission flag from source files
This commit is contained in:
@@ -21,3 +21,6 @@ Pods/
|
||||
# Add this line if you want to avoid checking in source code from Carthage dependencies.
|
||||
**/Carthage/Checkouts
|
||||
**/Carthage/Build
|
||||
|
||||
# Swift Package Manager
|
||||
.build/
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
// swift-tools-version:5.0
|
||||
// The swift-tools-version declares the minimum version of Swift required to build this package.
|
||||
|
||||
import PackageDescription
|
||||
|
||||
let package = Package(
|
||||
name: "ZipArchive",
|
||||
platforms: [
|
||||
.iOS(.v9),
|
||||
.tvOS(.v9),
|
||||
.macOS(.v10_10),
|
||||
.watchOS(.v2),
|
||||
],
|
||||
products: [
|
||||
.library(name: "ZipArchive", targets: ["ZipArchive"]),
|
||||
],
|
||||
targets: [
|
||||
.target(
|
||||
name: "ZipArchive",
|
||||
path: "SSZipArchive",
|
||||
cSettings: [
|
||||
.define("HAVE_INTTYPES_H"),
|
||||
.define("HAVE_PKCRYPT"),
|
||||
.define("HAVE_STDINT_H"),
|
||||
.define("HAVE_WZAES"),
|
||||
.define("HAVE_ZLIB"),
|
||||
],
|
||||
linkerSettings: [
|
||||
.linkedLibrary("z"),
|
||||
.linkedLibrary("iconv"),
|
||||
.linkedFramework("Security"),
|
||||
]
|
||||
)
|
||||
]
|
||||
)
|
||||
@@ -11,8 +11,8 @@ Pod::Spec.new do |s|
|
||||
s.tvos.deployment_target = '9.0'
|
||||
s.osx.deployment_target = '10.8'
|
||||
s.watchos.deployment_target = '2.0'
|
||||
s.source_files = 'SSZipArchive/*.{m,h}', 'SSZipArchive/minizip/*.{c,h}'
|
||||
s.public_header_files = 'SSZipArchive/*.h'
|
||||
s.source_files = 'SSZipArchive/*.{m,h}', 'SSZipArchive/include/*.{m,h}', 'SSZipArchive/minizip/*.{c,h}'
|
||||
s.public_header_files = 'SSZipArchive/include/*.h'
|
||||
s.libraries = 'z', 'iconv'
|
||||
s.framework = 'Security'
|
||||
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES',
|
||||
|
||||
Executable → Regular
Executable → Regular
@@ -15,7 +15,7 @@
|
||||
#define MZ_COMPAT_H
|
||||
|
||||
#include "mz.h"
|
||||
#include "../SSZipCommon.h"
|
||||
#include "../include/SSZipCommon.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
@@ -269,6 +269,16 @@
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
579FC27523292ABA007FEA3C /* include */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
B423AE481C0DF7950004A2F1 /* SSZipArchive.h */,
|
||||
93CE5D5D227FE5C50003464F /* SSZipCommon.h */,
|
||||
B423AE4A1C0DF7950004A2F1 /* ZipArchive.h */,
|
||||
);
|
||||
path = include;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
B423AE101C0DF76A0004A2F1 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -293,11 +303,9 @@
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
B423AE3D1C0DF7950004A2F1 /* Info.plist */,
|
||||
579FC27523292ABA007FEA3C /* include */,
|
||||
B423AE3E1C0DF7950004A2F1 /* minizip */,
|
||||
B423AE481C0DF7950004A2F1 /* SSZipArchive.h */,
|
||||
B423AE491C0DF7950004A2F1 /* SSZipArchive.m */,
|
||||
93CE5D5D227FE5C50003464F /* SSZipCommon.h */,
|
||||
B423AE4A1C0DF7950004A2F1 /* ZipArchive.h */,
|
||||
);
|
||||
path = SSZipArchive;
|
||||
sourceTree = "<group>";
|
||||
|
||||
Reference in New Issue
Block a user