fix: Simplify Podfile

This commit is contained in:
Marc Rousavy 2023-07-03 13:37:43 +02:00
parent d964f40e53
commit 0111f2edb4
2 changed files with 5 additions and 23 deletions

View File

@ -7,23 +7,11 @@ skiaPath = File.join(nodeModules, "@shopify", "react-native-skia")
hasSkia = File.exist?(skiaPath) hasSkia = File.exist?(skiaPath)
puts "VisionCamera: Skia integration #{hasSkia ? "enabled" : "disabled"}!" puts "VisionCamera: Skia integration #{hasSkia ? "enabled" : "disabled"}!"
reactVersion = '0.0.0'
begin
reactVersion = JSON.parse(File.read(File.join(__dir__, "..", "react-native", "package.json")))["version"]
rescue
reactVersion = '0.71.0'
end
rnVersion = reactVersion.split('.')[1]
folly_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DRNVERSION=' + rnVersion
folly_compiler_flags = folly_flags + ' ' + '-Wno-comma -Wno-shorten-64-to-32'
folly_version = '2021.04.26.00'
boost_compiler_flags = '-Wno-documentation'
Pod::Spec.new do |s| Pod::Spec.new do |s|
s.name = "VisionCamera" s.name = "VisionCamera"
s.version = package["version"] s.version = package["version"]
s.summary = package["description"] s.summary = package["description"]
s.description = package["description"]
s.homepage = package["homepage"] s.homepage = package["homepage"]
s.license = package["license"] s.license = package["license"]
s.authors = package["author"] s.authors = package["author"]
@ -32,15 +20,9 @@ Pod::Spec.new do |s|
s.source = { :git => "https://github.com/mrousavy/react-native-vision-camera.git", :tag => "#{s.version}" } s.source = { :git => "https://github.com/mrousavy/react-native-vision-camera.git", :tag => "#{s.version}" }
s.pod_target_xcconfig = { s.pod_target_xcconfig = {
"USE_HEADERMAP" => "YES", "GCC_PREPROCESSOR_DEFINITIONS" => "$(inherited) SK_METAL=1 SK_GANESH=1",
"GCC_PREPROCESSOR_DEFINITIONS" => '$(inherited) SK_METAL=1 SK_GANESH=1',
"HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_TARGET_SRCROOT)\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/Headers/Private/React-Core\" \"#{skiaPath}/cpp/skia/**\" "
}
s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags
s.xcconfig = {
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17", "CLANG_CXX_LANGUAGE_STANDARD" => "c++17",
"HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/glog\" \"$(PODS_ROOT)/RCT-Folly\" \"${PODS_ROOT}/Headers/Public/React-hermes\" \"${PODS_ROOT}/Headers/Public/hermes-engine\" \"#{skiaPath}/cpp/skia/**\" ", "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/cpp/\"/** \"#{skiaPath}/cpp/skia/**\" "
"OTHER_CFLAGS" => "$(inherited)" + " " + folly_flags
} }
s.requires_arc = true s.requires_arc = true
@ -68,8 +50,8 @@ Pod::Spec.new do |s|
"ios/**/*.h" "ios/**/*.h"
] ]
s.dependency "React-callinvoker"
s.dependency "React" s.dependency "React"
s.dependency "React-callinvoker"
s.dependency "React-Core" s.dependency "React-Core"
s.dependency "react-native-worklets" s.dependency "react-native-worklets"
s.dependency "react-native-skia" s.dependency "react-native-skia"

View File

@ -719,7 +719,7 @@ SPEC CHECKSUMS:
RNStaticSafeAreaInsets: 055ddbf5e476321720457cdaeec0ff2ba40ec1b8 RNStaticSafeAreaInsets: 055ddbf5e476321720457cdaeec0ff2ba40ec1b8
RNVectorIcons: fcc2f6cb32f5735b586e66d14103a74ce6ad61f8 RNVectorIcons: fcc2f6cb32f5735b586e66d14103a74ce6ad61f8
SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17 SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17
VisionCamera: d93ed026b49508915f857e84d25a97a18e0e7eb2 VisionCamera: 0ee46c2c5dd7b8aa3cc3152ff4deda60ac58276f
Yoga: 65286bb6a07edce5e4fe8c90774da977ae8fc009 Yoga: 65286bb6a07edce5e4fe8c90774da977ae8fc009
PODFILE CHECKSUM: ab9c06b18c63e741c04349c0fd630c6d3145081c PODFILE CHECKSUM: ab9c06b18c63e741c04349c0fd630c6d3145081c