|
| 1 | +Pod::Spec.new do |s| |
| 2 | + s.name = 'LibTorch-Lite' |
| 3 | + s.version = '1.9.0' |
| 4 | + s.authors = 'PyTorch Team' |
| 5 | + s.license = { :type => 'BSD' } |
| 6 | + s.homepage = 'https://github.com/pytorch/pytorch' |
| 7 | + s.source = { :http => "https://ossci-ios.s3.amazonaws.com/libtorch_lite_ios_#{s.version}.zip" } |
| 8 | + s.summary = 'The PyTorch C++ library for iOS' |
| 9 | + s.description = <<-DESC |
| 10 | + The PyTorch C++ library for iOS. |
| 11 | + DESC |
| 12 | + s.ios.deployment_target = '12.0' |
| 13 | + s.default_subspec = 'Core' |
| 14 | + s.subspec 'Core' do |ss| |
| 15 | + ss.dependency 'LibTorch-Lite/Torch' |
| 16 | + ss.source_files = 'src/*.{h,cpp,c,cc}' |
| 17 | + ss.public_header_files = ['src/LibTorch-Lite.h'] |
| 18 | + end |
| 19 | + s.subspec 'Torch' do |ss| |
| 20 | + ss.header_mappings_dir = 'install/include/' |
| 21 | + ss.preserve_paths = 'install/include/**/*.{h,cpp,cc,c}' |
| 22 | + ss.vendored_libraries = 'install/lib/*.a' |
| 23 | + ss.libraries = ['c++', 'stdc++'] |
| 24 | + end |
| 25 | + s.user_target_xcconfig = { |
| 26 | + 'HEADER_SEARCH_PATHS' => '$(inherited) "$(PODS_ROOT)/LibTorch-Lite/install/include/"', |
| 27 | + 'OTHER_LDFLAGS' => '-force_load "$(PODS_ROOT)/LibTorch-Lite/install/lib/libtorch.a" -force_load "$(PODS_ROOT)/LibTorch-Lite/install/lib/libtorch_cpu.a"', |
| 28 | + 'CLANG_CXX_LANGUAGE_STANDARD' => 'c++14', |
| 29 | + 'CLANG_CXX_LIBRARY' => 'libc++' |
| 30 | + } |
| 31 | + s.pod_target_xcconfig = { |
| 32 | + 'HEADER_SEARCH_PATHS' => '$(inherited) "$(PODS_ROOT)/LibTorch-Lite/install/include/"', |
| 33 | + 'VALID_ARCHS' => 'x86_64 arm64' |
| 34 | + } |
| 35 | + s.library = ['c++', 'stdc++'] |
| 36 | +end |
0 commit comments