aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firestore/Example/ProtobufCpp.podspec
blob: c809c0690d5184344d75e89131e13f16efb8d1b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# 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 ' +
      'HAVE_PTHREAD=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',
  }

  # Disable warnings that upstream does not concern itself with
  s.compiler_flags = '$(inherited) ' +
    '-Wno-comma ' +
    '-Wno-shorten-64-to-32'

  s.requires_arc = false
  s.library = 'c++'
end