aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firestore/Example/ProtobufCpp.podspec
diff options
context:
space:
mode:
authorGravatar Rich Gowman <rgowman@google.com>2018-05-28 14:23:41 -0400
committerGravatar Rich Gowman <rgowman@google.com>2018-05-28 15:22:47 -0400
commit2d071ec260efe196890dbacdbe9ffca8081e1edd (patch)
tree279af75c350ef8ca5722b16dafe5cfa6f53d35ee /Firestore/Example/ProtobufCpp.podspec
parent42669a237f9c8fbcee4da10dc8c7aeaf2efeffe0 (diff)
Hookup serializer_test.cc to the xcode based test suite
This involves: - building c++ libprotobuf (rather than just the obj-c version). - adding c++ libprotobuf, c++ built protos (previously created) to the *test suite* only (not to the main build). - modifying existing nanopb CFLAGS to match those that are indirectly pulled in.
Diffstat (limited to 'Firestore/Example/ProtobufCpp.podspec')
-rw-r--r--Firestore/Example/ProtobufCpp.podspec68
1 files changed, 68 insertions, 0 deletions
diff --git a/Firestore/Example/ProtobufCpp.podspec b/Firestore/Example/ProtobufCpp.podspec
new file mode 100644
index 0000000..8090b1e
--- /dev/null
+++ b/Firestore/Example/ProtobufCpp.podspec
@@ -0,0 +1,68 @@
+# Copyright 2018 Google
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# A Private podspec for Protobuf which exposes the C++ headers (rather than
+# only the Obj-C headers). Suitable only for use inside this source tree.
+
+Pod::Spec.new do |s|
+ s.name = 'ProtobufCpp'
+ s.version = '3.5.2'
+ s.summary = 'Protocol Buffers v.3 runtime library for C++.'
+ s.homepage = 'https://github.com/google/protobuf'
+ s.license = '3-Clause BSD License'
+ s.authors = { 'The Protocol Buffers contributors' => 'protobuf@googlegroups.com' }
+ s.cocoapods_version = '>= 1.0'
+
+ s.source = {
+ :git => 'https://github.com/google/protobuf.git',
+ :tag => "v#{s.version}"
+ }
+
+ s.source_files = 'src/**/*.{h,cc}'
+ s.exclude_files = # skip test files. (Yes, the test files are intermixed with
+ # the source. No there doesn't seem to be a common/simple
+ # pattern we could use to exclude them; 'test' appears in
+ # various places throughout the file names and also in a
+ # non-test file. So, we'll exclude all files that either
+ # start with 'test' or include test and have a previous
+ # character that isn't "y" (so that bytestream isn't
+ # matched.))
+ 'src/**/test*.*',
+ 'src/**/*[^y]test*.*',
+ 'src/**/testing/**',
+ 'src/**/mock*',
+ # skip the javascript handling code.
+ 'src/**/js/**',
+ # skip the protoc compiler
+ 'src/google/protobuf/compiler/**/*'
+
+ s.header_mappings_dir = 'src/'
+
+ # 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',
+ 'HEADER_SEARCH_PATHS' => '"${PODS_ROOT}/ProtobufCpp/src"',
+
+ # Cocoapods flattens header imports, leading to much anguish. The
+ # following two statements work around this.
+ # - https://github.com/CocoaPods/CocoaPods/issues/1437
+ 'USE_HEADERMAP' => 'NO',
+ 'ALWAYS_SEARCH_USER_PATHS' => 'NO',
+
+ 'OTHER_CFLAGS' => '-DHAVE_PTHREAD'
+ }
+
+ s.requires_arc = false
+ s.library = 'c++'
+end