Yoga.podspec 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. # Copyright (c) Facebook, Inc. and its affiliates.
  2. #
  3. # This source code is licensed under the MIT license found in the
  4. # LICENSE file in the root directory of this source tree.
  5. package = JSON.parse(File.read(File.expand_path('../../package.json', __dir__)))
  6. version = package['version']
  7. source = { :git => ENV['INSTALL_YOGA_FROM_LOCATION'] || 'https://github.com/facebook/react-native.git' }
  8. if version == '1000.0.0'
  9. # This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in.
  10. source[:commit] = `git rev-parse HEAD`.strip
  11. else
  12. source[:tag] = "v#{version}"
  13. end
  14. Pod::Spec.new do |spec|
  15. spec.name = 'Yoga'
  16. spec.version = '1.14.0'
  17. spec.license = { :type => 'MIT' }
  18. spec.homepage = 'https://yogalayout.com'
  19. spec.documentation_url = 'https://yogalayout.com/docs/'
  20. spec.summary = 'Yoga is a cross-platform layout engine which implements Flexbox.'
  21. spec.description = 'Yoga is a cross-platform layout engine enabling maximum collaboration within your team by implementing an API many designers are familiar with, and opening it up to developers across different platforms.'
  22. spec.authors = 'Facebook'
  23. spec.source = source
  24. spec.module_name = 'yoga'
  25. spec.header_dir = 'yoga'
  26. spec.requires_arc = false
  27. spec.pod_target_xcconfig = {
  28. 'DEFINES_MODULE' => 'YES'
  29. }
  30. spec.compiler_flags = [
  31. '-fno-omit-frame-pointer',
  32. '-fexceptions',
  33. '-Wall',
  34. '-Werror',
  35. '-std=c++1y',
  36. '-fPIC'
  37. ]
  38. # Pinning to the same version as React.podspec.
  39. spec.platforms = { :ios => "10.0", :tvos => "10.0" }
  40. # Set this environment variable when *not* using the `:path` option to install the pod.
  41. # E.g. when publishing this spec to a spec repo.
  42. source_files = 'yoga/**/*.{cpp,h}'
  43. source_files = File.join('ReactCommon/yoga', source_files) if ENV['INSTALL_YOGA_WITHOUT_PATH_OPTION']
  44. spec.source_files = source_files
  45. header_files = 'yoga/{Yoga,YGEnums,YGMacros,YGValue}.h'
  46. header_files = File.join('ReactCommon/yoga', header_files) if ENV['INSTALL_YOGA_WITHOUT_PATH_OPTION']
  47. spec.public_header_files = header_files
  48. end