2021-02-19 08:07:53 -07:00
|
|
|
require "json"
|
|
|
|
|
|
|
|
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
|
|
|
|
|
2021-10-13 07:18:11 -06:00
|
|
|
reactVersion = '0.0.0'
|
|
|
|
begin
|
|
|
|
reactVersion = JSON.parse(File.read(File.join(__dir__, "..", "react-native", "package.json")))["version"]
|
|
|
|
rescue
|
2023-02-09 03:52:41 -07:00
|
|
|
reactVersion = '0.71.0'
|
2021-10-13 07:18:11 -06:00
|
|
|
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'
|
|
|
|
|
2021-02-19 08:07:53 -07:00
|
|
|
Pod::Spec.new do |s|
|
2021-03-26 09:22:24 -06:00
|
|
|
s.name = "VisionCamera"
|
2021-02-19 08:07:53 -07:00
|
|
|
s.version = package["version"]
|
|
|
|
s.summary = package["description"]
|
|
|
|
s.homepage = package["homepage"]
|
|
|
|
s.license = package["license"]
|
|
|
|
s.authors = package["author"]
|
|
|
|
|
2021-02-19 08:59:39 -07:00
|
|
|
s.platforms = { :ios => "11.0" }
|
2021-06-21 14:42:46 -06:00
|
|
|
s.source = { :git => "https://github.com/mrousavy/react-native-vision-camera.git", :tag => "#{s.version}" }
|
2021-02-19 08:07:53 -07:00
|
|
|
|
2021-05-06 06:11:55 -06:00
|
|
|
s.pod_target_xcconfig = {
|
|
|
|
"USE_HEADERMAP" => "YES",
|
2023-02-09 03:52:41 -07:00
|
|
|
"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\" "
|
2021-05-06 06:11:55 -06:00
|
|
|
}
|
2021-10-13 07:18:11 -06:00
|
|
|
s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags
|
|
|
|
s.xcconfig = {
|
2022-10-31 06:04:07 -06:00
|
|
|
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17",
|
2021-10-13 07:18:11 -06:00
|
|
|
"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\"",
|
|
|
|
"OTHER_CFLAGS" => "$(inherited)" + " " + folly_flags
|
|
|
|
}
|
|
|
|
|
2021-05-06 06:11:55 -06:00
|
|
|
s.requires_arc = true
|
2021-02-19 08:59:39 -07:00
|
|
|
|
2021-05-06 06:11:55 -06:00
|
|
|
# All source files that should be publicly visible
|
|
|
|
# Note how this does not include headers, since those can nameclash.
|
|
|
|
s.source_files = [
|
|
|
|
"ios/**/*.{m,mm,swift}",
|
|
|
|
"ios/CameraBridge.h",
|
2021-06-09 02:57:05 -06:00
|
|
|
"ios/Frame Processor/Frame.h",
|
2021-05-06 06:11:55 -06:00
|
|
|
"ios/Frame Processor/FrameProcessorCallback.h",
|
|
|
|
"ios/Frame Processor/FrameProcessorRuntimeManager.h",
|
|
|
|
"ios/Frame Processor/FrameProcessorPluginRegistry.h",
|
|
|
|
"ios/Frame Processor/FrameProcessorPlugin.h",
|
|
|
|
"ios/React Utils/RCTBridge+runOnJS.h",
|
2021-06-03 06:16:02 -06:00
|
|
|
"ios/React Utils/JSConsoleHelper.h",
|
2021-05-06 06:11:55 -06:00
|
|
|
"cpp/**/*.{cpp}",
|
|
|
|
]
|
|
|
|
# Any private headers that are not globally unique should be mentioned here.
|
|
|
|
# Otherwise there will be a nameclash, since CocoaPods flattens out any header directories
|
|
|
|
# See https://github.com/firebase/firebase-ios-sdk/issues/4035 for more details.
|
|
|
|
s.preserve_paths = [
|
|
|
|
"cpp/**/*.h",
|
|
|
|
"ios/**/*.h"
|
|
|
|
]
|
|
|
|
|
|
|
|
s.dependency "React-callinvoker"
|
|
|
|
s.dependency "React"
|
2021-02-19 08:07:53 -07:00
|
|
|
s.dependency "React-Core"
|
|
|
|
end
|