mirror of
https://github.com/firebase/nanopb
synced 2026-11-09 22:25:59 +05:45
More seamless SwiftPM implementation (#567)
This update allows clients to share common syntax for nanopb imports/includes between CocoaPods and Swift Package Manager. See example at firebase/firebase-ios-sdk#6165
This commit is contained in:
1 parent
4502555fd3
commit
3cfa21200e
14 files changed
+25
-12
No files matched your search
+8
-1
@@ -12,6 +12,13 @@ let package = Package(
|
||||
.watchOS(.v2)
|
||||
],
|
||||
|
||||
products: [
|
||||
.library(
|
||||
name: "nanopb",
|
||||
targets: ["nanopb"]
|
||||
)
|
||||
],
|
||||
|
||||
targets: [
|
||||
.target(
|
||||
name: "nanopb",
|
||||
@@ -25,7 +32,7 @@ let package = Package(
|
||||
"pb_encode.h",
|
||||
"pb_encode.c"
|
||||
],
|
||||
publicHeadersPath: "SwiftPackage",
|
||||
publicHeadersPath: "spm_headers",
|
||||
cSettings: [
|
||||
.define("PB_FIELD_32BIT", to: "1"),
|
||||
.define("PB_NO_PACKED_STRUCTS", to: "1"),
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
module nanopb {
|
||||
umbrella header "nanopb.h"
|
||||
|
||||
export *
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
#import "../pb.h"
|
||||
#import "../pb_common.h"
|
||||
#import "../pb_decode.h"
|
||||
#import "../pb_encode.h"
|
||||
@@ -1 +1,3 @@
|
||||
#include "nanopb.h"
|
||||
#include "pb.h"
|
||||
#include "pb_common.h"
|
||||
#include "pb_decode.h"
|
||||
@@ -1 +1,3 @@
|
||||
#import "nanopb.h"
|
||||
#import "pb.h"
|
||||
#import <pb_common.h>
|
||||
#include "pb_decode.h"
|
||||
@@ -0,0 +1,3 @@
|
||||
#import "nanopb/pb.h"
|
||||
#import <nanopb/pb_common.h>
|
||||
#include "nanopb/pb_decode.h"
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
../../pb.h
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
../../pb_common.h
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
../../pb_decode.h
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
../../pb_encode.h
|
||||
@@ -0,0 +1 @@
|
||||
#include "nanopb/pb.h"
|
||||
@@ -0,0 +1 @@
|
||||
#include "nanopb/pb_common.h"
|
||||
@@ -0,0 +1 @@
|
||||
#include "nanopb/pb_decode.h"
|
||||
@@ -0,0 +1 @@
|
||||
#include "nanopb/pb_encode.h"
|
||||
Reference in new issue
Block a user