Updated name of common objects pod
This commit is contained in:
parent
d63d3f61d7
commit
6ac39c9b93
|
@ -33,7 +33,7 @@ licenses(["notice"])
|
||||||
# frameworks but are avoided from the framework binaries to avoid duplicate symbols
|
# frameworks but are avoided from the framework binaries to avoid duplicate symbols
|
||||||
# error when included in an xcode project:
|
# error when included in an xcode project:
|
||||||
# 1. iOS classes shared amongst the various vision and text tasks. These classes
|
# 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".
|
# 2. Task graphs. These will be built with ":MediaPipeTaskGraphs_library".
|
||||||
# 3. gpu targets which will be built with the ":MediaPipeTaskGraphs_library".
|
# 3. gpu targets which will be built with the ":MediaPipeTaskGraphs_library".
|
||||||
OBJC_COMMON_DEPS = [
|
OBJC_COMMON_DEPS = [
|
||||||
|
@ -102,7 +102,7 @@ apple_static_xcframework(
|
||||||
"//mediapipe/tasks/ios/text/text_classifier:MPPTextClassifier",
|
"//mediapipe/tasks/ios/text/text_classifier:MPPTextClassifier",
|
||||||
"//mediapipe/tasks/ios/text/text_embedder:MPPTextEmbedder",
|
"//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
|
# ":MediaPipeTaskGraphs_library in order to prevent duplicate symbols error
|
||||||
# when the frameworks are imported in iOS projects.
|
# when the frameworks are imported in iOS projects.
|
||||||
avoid_deps = OBJC_COMMON_DEPS
|
avoid_deps = OBJC_COMMON_DEPS
|
||||||
|
@ -139,7 +139,7 @@ apple_static_xcframework(
|
||||||
"//mediapipe/tasks/ios/vision/image_classifier:MPPImageClassifier",
|
"//mediapipe/tasks/ios/vision/image_classifier:MPPImageClassifier",
|
||||||
"//mediapipe/tasks/ios/vision/object_detector:MPPObjectDetector",
|
"//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
|
# ":MediaPipeTaskGraphs_library in order to prevent duplicate symbols error
|
||||||
# when the frameworks are imported in iOS projects.
|
# when the frameworks are imported in iOS projects.
|
||||||
# Also avoids opencv since it will be built with
|
# Also avoids opencv since it will be built with
|
||||||
|
@ -171,7 +171,7 @@ apple_static_library(
|
||||||
)
|
)
|
||||||
|
|
||||||
apple_static_xcframework(
|
apple_static_xcframework(
|
||||||
name = "MediaPipeTaskCommonObjects_framework",
|
name = "MediaPipeTaskCommon_framework",
|
||||||
bundle_name = "MediaPipeTaskCommon",
|
bundle_name = "MediaPipeTaskCommon",
|
||||||
ios = {
|
ios = {
|
||||||
"simulator" : ["arm64", "x86_64"],
|
"simulator" : ["arm64", "x86_64"],
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
Pod::Spec.new do |s|
|
Pod::Spec.new do |s|
|
||||||
s.name = 'MediaPipeTaskCommonObjects'
|
s.name = 'MediaPipeTaskCommon'
|
||||||
s.version = '${MPP_BUILD_VERSION}'
|
s.version = '${MPP_BUILD_VERSION}'
|
||||||
s.authors = 'Google Inc.'
|
s.authors = 'Google Inc.'
|
||||||
s.license = { :type => 'Apache',:file => "LICENSE" }
|
s.license = { :type => 'Apache',:file => "LICENSE" }
|
||||||
|
@ -10,11 +10,11 @@ Pod::Spec.new do |s|
|
||||||
|
|
||||||
s.ios.deployment_target = '11.0'
|
s.ios.deployment_target = '11.0'
|
||||||
|
|
||||||
s.module_name = 'MediaPipeTaskCommonObjects'
|
s.module_name = 'MediaPipeTaskCommon'
|
||||||
s.static_framework = true
|
s.static_framework = true
|
||||||
s.user_target_xcconfig = {
|
s.user_target_xcconfig = {
|
||||||
'OTHER_LDFLAGS[sdk=iphonesimulator*]' => '$(inherited) -force_load "${PODS_ROOT}/MediaPipeTaskCommonObjects/frameworks/graph_libraries/libMediaPipeTaskCommonObjects_simulator_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)/MediaPipeTaskCommonObjects/frameworks/graph_libraries/libMediaPipeTaskCommonObjects_device_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.frameworks = 'Accelerate', 'CoreMedia', 'AssetsLibrary', 'CoreFoundation', 'CoreGraphics', 'CoreImage', 'QuartzCore', 'AVFoundation', 'CoreVideo'
|
||||||
s.preserve_paths ='frameworks/graph_libraries/*.a'
|
s.preserve_paths ='frameworks/graph_libraries/*.a'
|
|
@ -16,7 +16,7 @@
|
||||||
# Set the following variables as appropriate.
|
# Set the following variables as appropriate.
|
||||||
# * BAZEL: path to bazel. defaults to the first one available in PATH
|
# * BAZEL: path to bazel. defaults to the first one available in PATH
|
||||||
# * FRAMEWORK_NAME: name of the iOS framework to be built. Currently the
|
# * 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
|
# * 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
|
# * 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
|
# * 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}"
|
local FRAMEWORK_CQUERY_COMMAND="-c opt --apple_generate_dsym=false ${FULL_FRAMEWORK_TARGET}"
|
||||||
IOS_FRAMEWORK_PATH="$(build_target "${FRAMEWORK_CQUERY_COMMAND}")"
|
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
|
# 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
|
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"
|
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}")"
|
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}
|
echo ${IOS_FRAMEWORK_PATH}
|
||||||
unzip "${IOS_FRAMEWORK_PATH}" -d "${FRAMEWORKS_DIR}"
|
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.
|
# libraries should be copied to the output directory which is to be archived.
|
||||||
case $FRAMEWORK_NAME in
|
case $FRAMEWORK_NAME in
|
||||||
"MediaPipeTaskCommonObjects")
|
"MediaPipeTaskCommon")
|
||||||
|
|
||||||
local GRAPH_LIBRARIES_DIR="graph_libraries"
|
local GRAPH_LIBRARIES_DIR="graph_libraries"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user