mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-06-04 23:59:56 +00:00
Add podspec template for ios package, update build settings (#7907)
* Add podspec template for ios package * minor formatting update * Add spec.source_files for header files * Update spec.public_header_files to spec.source_files * minor update
This commit is contained in:
parent
0e935b8718
commit
79a6727a02
4 changed files with 35 additions and 13 deletions
|
|
@ -66,10 +66,14 @@ elseif(onnxruntime_BUILD_APPLE_FRAMEWORK)
|
|||
"${CMAKE_CURRENT_BINARY_DIR}/generated_source.c"
|
||||
)
|
||||
|
||||
# create Info.plist for the framework and podspec for CocoaPods (optional)
|
||||
set(MACOSX_FRAMEWORK_NAME "onnxruntime")
|
||||
set(MACOSX_FRAMEWORK_IDENTIFIER "com.microsoft.onnxruntime")
|
||||
configure_file(${REPO_ROOT}/cmake/Info.plist.in ${CMAKE_CURRENT_BINARY_DIR}/Info.plist)
|
||||
|
||||
configure_file(
|
||||
${REPO_ROOT}/tools/ci_build/github/apple/onnxruntime-mobile-c.podspec.template
|
||||
${CMAKE_CURRENT_BINARY_DIR}/onnxruntime-mobile-c.podspec
|
||||
)
|
||||
set_target_properties(onnxruntime PROPERTIES
|
||||
FRAMEWORK TRUE
|
||||
FRAMEWORK_VERSION A
|
||||
|
|
|
|||
|
|
@ -1,18 +1,19 @@
|
|||
# This pod spec template is used to generate podspec file for running ios_package_test project,
|
||||
# this is not a podspec template used by onnxruntime-mobile official CocoaPods package
|
||||
Pod::Spec.new do |spec|
|
||||
spec.name = "onnxruntime-mobile"
|
||||
spec.version = "${ORT_VERSION}"
|
||||
spec.summary = "Onnx Runtime C/C++ Package"
|
||||
spec.description = <<-DESC
|
||||
Onnx Runtime C/C++ framework pod.
|
||||
spec.name = "onnxruntime-mobile"
|
||||
spec.version = "${ORT_VERSION}"
|
||||
spec.summary = "ONNX Runtime C/C++ Package"
|
||||
spec.description = <<-DESC
|
||||
ONNX Runtime C/C++ framework pod.
|
||||
DESC
|
||||
|
||||
spec.homepage = "https://github.com/microsoft/onnxruntime"
|
||||
spec.license = { :type => 'MIT' }
|
||||
spec.authors = { "ONNX Runtime" => "onnxruntime@microsoft.com" }
|
||||
spec.platform = :ios, '13.0'
|
||||
spec.homepage = "https://github.com/microsoft/onnxruntime"
|
||||
spec.license = { :type => 'MIT' }
|
||||
spec.authors = { "ONNX Runtime" => "onnxruntime@microsoft.com" }
|
||||
spec.platform = :ios, '13.0'
|
||||
# if you are going to use a file as the spec.source, add 'file:' before your file path
|
||||
spec.source = { :http => '${ORT_BASE_FRAMEWORK_ARCHIVE}' }
|
||||
spec.vendored_frameworks = 'onnxruntime.framework'
|
||||
spec.source = { :http => '${ORT_BASE_FRAMEWORK_ARCHIVE}' }
|
||||
spec.vendored_frameworks = 'onnxruntime.framework'
|
||||
spec.source_files = 'onnxruntime.framework/Headers/*.h'
|
||||
end
|
||||
|
|
|
|||
|
|
@ -14,11 +14,12 @@
|
|||
"--parallel",
|
||||
"--use_xcode",
|
||||
"--build_apple_framework",
|
||||
"--minimal_build",
|
||||
"--minimal_build=extended",
|
||||
"--disable_rtti",
|
||||
"--disable_ml_ops",
|
||||
"--disable_exceptions",
|
||||
"--enable_reduced_operator_type_support",
|
||||
"--use_coreml",
|
||||
"--skip_tests",
|
||||
"--apple_deploy_target=11.0"
|
||||
]
|
||||
|
|
|
|||
|
|
@ -0,0 +1,16 @@
|
|||
Pod::Spec.new do |spec|
|
||||
spec.name = "onnxruntime-mobile-c"
|
||||
spec.version = "${ORT_VERSION}"
|
||||
spec.authors = { "ONNX Runtime" => "onnxruntime@microsoft.com" }
|
||||
spec.license = { :type => "MIT" }
|
||||
spec.homepage = "https://github.com/microsoft/onnxruntime"
|
||||
spec.source = { :http => "_ORT_DOWNLOAD_URL_" }
|
||||
spec.summary = "ONNX Runtime Mobile C/C++ Pod"
|
||||
spec.platform = :ios, "${CMAKE_OSX_DEPLOYMENT_TARGET}"
|
||||
spec.vendored_frameworks = "onnxruntime.framework"
|
||||
spec.weak_framework = 'CoreML'
|
||||
spec.source_files = 'onnxruntime.framework/Headers/*.h'
|
||||
spec.description = <<-DESC
|
||||
A preview pod for ONNX Runtime Mobile C/C++ library. Pods for Objective-C and Swift coming soon.
|
||||
DESC
|
||||
end
|
||||
Loading…
Reference in a new issue