Skip to content

Commit 6e0e53a

Browse files
authored
Fix GDTCCT build (#5935)
1 parent 01bf549 commit 6e0e53a

File tree

4 files changed

+13
-1
lines changed

4 files changed

+13
-1
lines changed

GoogleDataTransport/GDTCCTLibrary/GDTCCTNanopbHelpers.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,13 @@
2727
#import "GoogleDataTransport/GDTCORLibrary/Public/GDTCOREvent.h"
2828
#import "GoogleDataTransport/GDTCORLibrary/Public/GDTCORPlatform.h"
2929

30+
#if SWIFT_PACKAGE
31+
#import "nanopb.h"
32+
#else
3033
#import <nanopb/pb.h>
3134
#import <nanopb/pb_decode.h>
3235
#import <nanopb/pb_encode.h>
36+
#endif
3337

3438
#import "GoogleDataTransport/GDTCCTLibrary/Public/GDTCOREvent+GDTCCTSupport.h"
3539

GoogleDataTransport/GDTCCTLibrary/GDTCCTUploader.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,13 @@
2222
#import "GoogleDataTransport/GDTCORLibrary/Public/GDTCORRegistrar.h"
2323
#import "GoogleDataTransport/GDTCORLibrary/Public/GDTCORStorageProtocol.h"
2424

25+
#if SWIFT_PACKAGE
26+
#import "nanopb.h"
27+
#else
2528
#import <nanopb/pb.h>
2629
#import <nanopb/pb_decode.h>
2730
#import <nanopb/pb_encode.h>
31+
#endif
2832

2933
#import "GoogleDataTransport/GDTCCTLibrary/Private/GDTCCTCompressionHelper.h"
3034
#import "GoogleDataTransport/GDTCCTLibrary/Private/GDTCCTNanopbHelpers.h"

GoogleDataTransport/GDTCCTLibrary/Protogen/nanopb/cct.nanopb.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@
1919

2020
#ifndef PB_GDT_CCT_CCT_NANOPB_H_INCLUDED
2121
#define PB_GDT_CCT_CCT_NANOPB_H_INCLUDED
22+
#if SWIFT_PACKAGE
23+
#include "nanopb.h"
24+
#else
2225
#include <nanopb/pb.h>
26+
#endif
2327

2428
/* @@protoc_insertion_point(includes) */
2529
#if PB_PROTO_HEADER_VERSION != 30

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ let package = Package(
268268
path: ".",
269269
sources: [
270270
"GoogleDataTransport/GDTCORLibrary",
271-
"GoogleDataTransportCCTSupport/GDTCCTLibrary",
271+
"GoogleDataTransport/GDTCCTLibrary",
272272
],
273273
publicHeadersPath: "GoogleDataTransport/GDTCORLibrary/Public",
274274
cSettings: [

0 commit comments

Comments
 (0)