ProtobufCpp.podspec 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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.11.4'
  19. s.summary = 'Protocol Buffers v.3 runtime library for C++.'
  20. s.homepage = 'https://github.com/protocolbuffers/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.ios.deployment_target = '8.0'
  29. s.osx.deployment_target = '10.11'
  30. s.tvos.deployment_target = '10.0'
  31. s.source_files = 'src/**/*.{h,cc,inc}'
  32. s.exclude_files = # skip test files. (Yes, the test files are intermixed with
  33. # the source. No there doesn't seem to be a common/simple
  34. # pattern we could use to exclude them; 'test' appears in
  35. # various places throughout the file names and also in a
  36. # non-test file. So, we'll exclude all files that either
  37. # start with 'test' or include test and have a previous
  38. # character that isn't "y" (so that bytestream isn't
  39. # matched.))
  40. 'src/**/test*.*',
  41. 'src/**/*[^y]test*.*',
  42. 'src/**/testing/**',
  43. 'src/**/mock*',
  44. # skip the javascript handling code.
  45. 'src/**/js/**',
  46. # skip the protoc compiler
  47. 'src/google/protobuf/compiler/**/*'
  48. s.header_mappings_dir = 'src/'
  49. # Set a CPP symbol so the code knows to use framework imports.
  50. s.pod_target_xcconfig = {
  51. 'GCC_PREPROCESSOR_DEFINITIONS' =>
  52. '$(inherited) ' +
  53. 'GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1 ' +
  54. 'HAVE_PTHREAD=1',
  55. 'HEADER_SEARCH_PATHS' => '"${PODS_ROOT}/ProtobufCpp/src"',
  56. # Cocoapods flattens header imports, leading to much anguish. The
  57. # following two statements work around this.
  58. # - https://github.com/CocoaPods/CocoaPods/issues/1437
  59. 'USE_HEADERMAP' => 'NO',
  60. 'ALWAYS_SEARCH_USER_PATHS' => 'NO',
  61. }
  62. # Disable warnings that upstream does not concern itself with
  63. s.compiler_flags = '$(inherited) ' +
  64. '-Wno-comma ' +
  65. '-Wno-inconsistent-missing-override ' +
  66. '-Wno-invalid-offsetof ' +
  67. '-Wno-shorten-64-to-32 ' +
  68. '-Wno-unreachable-code ' +
  69. '-Wno-unused-parameter'
  70. s.requires_arc = false
  71. s.library = 'c++'
  72. end