ProtobufCpp.podspec 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. # Copyright 2018 Google
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. # A Private podspec for Protobuf which exposes the C++ headers (rather than
  15. # only the Obj-C headers). Suitable only for use inside this source tree.
  16. Pod::Spec.new do |s|
  17. s.name = 'ProtobufCpp'
  18. s.version = '3.5.2'
  19. s.summary = 'Protocol Buffers v.3 runtime library for C++.'
  20. s.homepage = 'https://github.com/google/protobuf'
  21. s.license = '3-Clause BSD License'
  22. s.authors = { 'The Protocol Buffers contributors' => 'protobuf@googlegroups.com' }
  23. s.cocoapods_version = '>= 1.0'
  24. s.source = {
  25. :git => 'https://github.com/google/protobuf.git',
  26. :tag => "v#{s.version}"
  27. }
  28. s.source_files = 'src/**/*.{h,cc}'
  29. s.exclude_files = # skip test files. (Yes, the test files are intermixed with
  30. # the source. No there doesn't seem to be a common/simple
  31. # pattern we could use to exclude them; 'test' appears in
  32. # various places throughout the file names and also in a
  33. # non-test file. So, we'll exclude all files that either
  34. # start with 'test' or include test and have a previous
  35. # character that isn't "y" (so that bytestream isn't
  36. # matched.))
  37. 'src/**/test*.*',
  38. 'src/**/*[^y]test*.*',
  39. 'src/**/testing/**',
  40. 'src/**/mock*',
  41. # skip the javascript handling code.
  42. 'src/**/js/**',
  43. # skip the protoc compiler
  44. 'src/google/protobuf/compiler/**/*'
  45. s.header_mappings_dir = 'src/'
  46. # Set a CPP symbol so the code knows to use framework imports.
  47. s.pod_target_xcconfig = {
  48. 'GCC_PREPROCESSOR_DEFINITIONS' =>
  49. '$(inherited) ' +
  50. 'GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1 ' +
  51. 'HAVE_PTHREAD=1',
  52. 'HEADER_SEARCH_PATHS' => '"${PODS_ROOT}/ProtobufCpp/src"',
  53. # Cocoapods flattens header imports, leading to much anguish. The
  54. # following two statements work around this.
  55. # - https://github.com/CocoaPods/CocoaPods/issues/1437
  56. 'USE_HEADERMAP' => 'NO',
  57. 'ALWAYS_SEARCH_USER_PATHS' => 'NO',
  58. }
  59. # Disable warnings that upstream does not concern itself with
  60. s.compiler_flags = '$(inherited) ' +
  61. '-Wno-comma ' +
  62. '-Wno-shorten-64-to-32'
  63. s.requires_arc = false
  64. s.library = 'c++'
  65. end