ProtobufCpp.podspec 3.6 KB

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