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:
Victor Pavlychko
2019-09-11 16:35:57 +03:00
parent 63cc9b455c
commit 57b6c4814f
9 changed files with 52 additions and 6 deletions
+3
View File
@@ -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/
+35
View File
@@ -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"),
]
)
]
)
+2 -2
View File
@@ -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
View File
View File
+1 -1
View File
@@ -15,7 +15,7 @@
#define MZ_COMPAT_H
#include "mz.h"
#include "../SSZipCommon.h"
#include "../include/SSZipCommon.h"
#ifdef __cplusplus
extern "C" {
+11 -3
View File
@@ -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>";