Updated name of common objects pod

This commit is contained in:
Prianka Liz Kariat 2023-04-25 04:26:13 +05:30
parent d63d3f61d7
commit 6ac39c9b93
3 changed files with 14 additions and 14 deletions

View File

@ -33,7 +33,7 @@ licenses(["notice"])
# frameworks but are avoided from the framework binaries to avoid duplicate symbols
# error when included in an xcode project:
# 1. iOS classes shared amongst the various vision and text tasks. These classes
# will be built with ":MediaPipeTaskCommonObjects_framework"
# will be built with ":MediaPipeTaskCommon_framework"
# 2. Task graphs. These will be built with ":MediaPipeTaskGraphs_library".
# 3. gpu targets which will be built with the ":MediaPipeTaskGraphs_library".
OBJC_COMMON_DEPS = [
@ -102,7 +102,7 @@ apple_static_xcframework(
"//mediapipe/tasks/ios/text/text_classifier:MPPTextClassifier",
"//mediapipe/tasks/ios/text/text_embedder:MPPTextEmbedder",
],
# avoid dependencies of ":MediaPipeCommonObjects_framework" and
# avoid dependencies of ":MediaPipeCommon_framework" and
# ":MediaPipeTaskGraphs_library in order to prevent duplicate symbols error
# when the frameworks are imported in iOS projects.
avoid_deps = OBJC_COMMON_DEPS
@ -139,7 +139,7 @@ apple_static_xcframework(
"//mediapipe/tasks/ios/vision/image_classifier:MPPImageClassifier",
"//mediapipe/tasks/ios/vision/object_detector:MPPObjectDetector",
],
# Avoids dependencies of ":MediaPipeCommonObjects_framework" and
# Avoids dependencies of ":MediaPipeCommon_framework" and
# ":MediaPipeTaskGraphs_library in order to prevent duplicate symbols error
# when the frameworks are imported in iOS projects.
# Also avoids opencv since it will be built with
@ -171,7 +171,7 @@ apple_static_library(
)
apple_static_xcframework(
name = "MediaPipeTaskCommonObjects_framework",
name = "MediaPipeTaskCommon_framework",
bundle_name = "MediaPipeTaskCommon",
ios = {
"simulator" : ["arm64", "x86_64"],

View File

@ -1,5 +1,5 @@
Pod::Spec.new do |s|
s.name = 'MediaPipeTaskCommonObjects'
s.name = 'MediaPipeTaskCommon'
s.version = '${MPP_BUILD_VERSION}'
s.authors = 'Google Inc.'
s.license = { :type => 'Apache',:file => "LICENSE" }
@ -10,11 +10,11 @@ Pod::Spec.new do |s|
s.ios.deployment_target = '11.0'
s.module_name = 'MediaPipeTaskCommonObjects'
s.module_name = 'MediaPipeTaskCommon'
s.static_framework = true
s.user_target_xcconfig = {
'OTHER_LDFLAGS[sdk=iphonesimulator*]' => '$(inherited) -force_load "${PODS_ROOT}/MediaPipeTaskCommonObjects/frameworks/graph_libraries/libMediaPipeTaskCommonObjects_simulator_graph.a"',
'OTHER_LDFLAGS[sdk=iphoneos*]' => '$(inherited) -force_load "$(PODS_ROOT)/MediaPipeTaskCommonObjects/frameworks/graph_libraries/libMediaPipeTaskCommonObjects_device_graph.a"',
'OTHER_LDFLAGS[sdk=iphonesimulator*]' => '$(inherited) -force_load "${PODS_ROOT}/MediaPipeTaskCommon/frameworks/graph_libraries/libMediaPipeTaskCommon_simulator_graph.a"',
'OTHER_LDFLAGS[sdk=iphoneos*]' => '$(inherited) -force_load "$(PODS_ROOT)/MediaPipeTaskCommon/frameworks/graph_libraries/libMediaPipeTaskCommon_device_graph.a"',
}
s.frameworks = 'Accelerate', 'CoreMedia', 'AssetsLibrary', 'CoreFoundation', 'CoreGraphics', 'CoreImage', 'QuartzCore', 'AVFoundation', 'CoreVideo'
s.preserve_paths ='frameworks/graph_libraries/*.a'

View File

@ -16,7 +16,7 @@
# Set the following variables as appropriate.
# * BAZEL: path to bazel. defaults to the first one available in PATH
# * FRAMEWORK_NAME: name of the iOS framework to be built. Currently the
# * accepted values are MediaPipeTaskText.
# * accepted values are MediaPipeTaskCommon, MediaPipeTaskText, MediaPipeTaskVision.
# * MPP_BUILD_VERSION: to specify the release version. defaults to 0.0.1-dev
# * IS_RELEASE_BUILD: set as true if this build should be a release build
# * ARCHIVE_FRAMEWORK: set as true if the framework should be archived
@ -106,11 +106,11 @@ function build_ios_frameworks_and_libraries {
local FRAMEWORK_CQUERY_COMMAND="-c opt --apple_generate_dsym=false ${FULL_FRAMEWORK_TARGET}"
IOS_FRAMEWORK_PATH="$(build_target "${FRAMEWORK_CQUERY_COMMAND}")"
# `MediaPipeTaskCommonObjects`` pods must also include the task graph libraries which
# `MediaPipeTaskCommon`` pods must also include the task graph libraries which
# are to be force loaded. Hence the graph libraies are only built if the framework
# name is `MediaPipeTaskCommonObjects`.`
# name is `MediaPipeTaskCommon`.`
case $FRAMEWORK_NAME in
"MediaPipeTaskCommonObjects")
"MediaPipeTaskCommon")
local IOS_SIM_FAT_LIBRARY_CQUERY_COMMAND="-c opt --config=ios_sim_fat --apple_generate_dsym=false //mediapipe/tasks/ios:MediaPipeTaskGraphs_library"
IOS_GRAPHS_SIMULATOR_LIBRARY_PATH="$(build_target "${IOS_SIM_FAT_LIBRARY_CQUERY_COMMAND}")"
@ -141,10 +141,10 @@ function create_framework_archive {
echo ${IOS_FRAMEWORK_PATH}
unzip "${IOS_FRAMEWORK_PATH}" -d "${FRAMEWORKS_DIR}"
# If the framwork being built is `MediaPipeTaskCommonObjects`, the built graph
# If the framwork being built is `MediaPipeTaskCommon`, the built graph
# libraries should be copied to the output directory which is to be archived.
case $FRAMEWORK_NAME in
"MediaPipeTaskCommonObjects")
"MediaPipeTaskCommon")
local GRAPH_LIBRARIES_DIR="graph_libraries"