From 0b77f5a68fb983ff9a3f6232c6025282ed8a89e8 Mon Sep 17 00:00:00 2001 From: Marek Gilbert Date: Fri, 15 Jun 2018 15:07:08 -0700 Subject: Move -D flags into GCC_PREPROCESSOR_DEFINITIONS --- FirebaseFirestore.podspec | 14 +++++++------- Firestore/Example/ProtobufCpp.podspec | 7 ++++--- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/FirebaseFirestore.podspec b/FirebaseFirestore.podspec index f97cfe7..892b136 100644 --- a/FirebaseFirestore.podspec +++ b/FirebaseFirestore.podspec @@ -56,18 +56,18 @@ Google Cloud Firestore is a NoSQL document database built for automatic scaling, s.frameworks = 'MobileCoreServices' s.library = 'c++' s.pod_target_xcconfig = { - 'GCC_PREPROCESSOR_DEFINITIONS' => 'GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1 ' + - 'FIRFirestore_VERSION=' + s.version.to_s + ' PB_FIELD_16BIT', + 'GCC_PREPROCESSOR_DEFINITIONS' => + "FIRFirestore_VERSION=#{s.version} " + + 'GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1 ' + + # The nanopb pod sets these defs, so we must too. (We *do* require 16bit + # (or larger) fields, so we'd have to set at least PB_FIELD_16BIT + # anyways.) + 'PB_FIELD_16BIT=1 PB_FIELD_32BIT=1 PB_NO_PACKED_STRUCTS=1', 'HEADER_SEARCH_PATHS' => '"${PODS_TARGET_SRCROOT}" ' + '"${PODS_TARGET_SRCROOT}/Firestore/third_party/abseil-cpp" ' + '"${PODS_ROOT}/nanopb" ' + '"${PODS_TARGET_SRCROOT}/Firestore/Protos/nanopb"', - - # The nanopb pod (which is pulled in indirectly) sets these defs, so we - # must too. (We *do* require 16bit (or larger) fields, so we'd have to set - # at least PB_FIELD_16BIT anyways.) - 'OTHER_CFLAGS' => '-DPB_FIELD_32BIT -DPB_NO_PACKED_STRUCTS=1' } s.prepare_command = <<-CMD diff --git a/Firestore/Example/ProtobufCpp.podspec b/Firestore/Example/ProtobufCpp.podspec index 8090b1e..eb90ca6 100644 --- a/Firestore/Example/ProtobufCpp.podspec +++ b/Firestore/Example/ProtobufCpp.podspec @@ -51,7 +51,10 @@ Pod::Spec.new do |s| # Set a CPP symbol so the code knows to use framework imports. s.pod_target_xcconfig = { - 'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1', + 'GCC_PREPROCESSOR_DEFINITIONS' => + '$(inherited) ' + + 'GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1 ' + + 'HAVE_PTHREAD=1', 'HEADER_SEARCH_PATHS' => '"${PODS_ROOT}/ProtobufCpp/src"', # Cocoapods flattens header imports, leading to much anguish. The @@ -59,8 +62,6 @@ Pod::Spec.new do |s| # - https://github.com/CocoaPods/CocoaPods/issues/1437 'USE_HEADERMAP' => 'NO', 'ALWAYS_SEARCH_USER_PATHS' => 'NO', - - 'OTHER_CFLAGS' => '-DHAVE_PTHREAD' } s.requires_arc = false -- cgit v1.2.3