React-graphics.podspec 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. require "json"
  6. package = JSON.parse(File.read(File.join(__dir__, "..", "..", "..", "package.json")))
  7. version = package['version']
  8. source = { :git => 'https://github.com/facebook/react-native.git' }
  9. if version == '1000.0.0'
  10. # This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in.
  11. source[:commit] = `git rev-parse HEAD`.strip
  12. else
  13. source[:tag] = "v#{version}"
  14. end
  15. folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
  16. folly_version = '2020.01.13.00'
  17. Pod::Spec.new do |s|
  18. s.name = "React-graphics"
  19. s.version = version
  20. s.summary = "Fabric for React Native."
  21. s.homepage = "https://reactnative.dev/"
  22. s.license = package["license"]
  23. s.author = "Facebook, Inc. and its affiliates"
  24. s.platforms = { :ios => "9.0", :tvos => "10.0" }
  25. s.source = source
  26. s.library = "stdc++"
  27. s.compiler_flags = folly_compiler_flags
  28. s.source_files = "**/*.{m,mm,cpp,h}"
  29. s.exclude_files = "**/tests/*",
  30. "**/android/*",
  31. "**/cxx/*"
  32. s.header_dir = "react/graphics"
  33. s.pod_target_xcconfig = { "USE_HEADERMAP" => "NO", "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/Folly\"" }
  34. s.dependency "Folly/Fabric", folly_version
  35. end