1Pod::Spec.new do |s| 2 s.name = 'LibTorch-Lite-Nightly' 3 s.version = 'IOS_NIGHTLY_BUILD_VERSION' 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-build.s3.amazonaws.com/libtorch_lite_ios_nightly_#{s.version}.zip" } 8 s.summary = 'The nightly build version of PyTorch C++ library for iOS' 9 s.description = <<-DESC 10 The nightly build version of 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-Nightly/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-Nightly/install/include/"', 27 'OTHER_LDFLAGS' => '-force_load "$(PODS_ROOT)/LibTorch-Lite-Nightly/install/lib/libtorch.a" -force_load "$(PODS_ROOT)/LibTorch-Lite-Nightly/install/lib/libtorch_cpu.a"', 28 'CLANG_CXX_LANGUAGE_STANDARD' => 'c++17', 29 'CLANG_CXX_LIBRARY' => 'libc++' 30 } 31 s.pod_target_xcconfig = { 32 'HEADER_SEARCH_PATHS' => '$(inherited) "$(PODS_ROOT)/LibTorch-Lite-Nightly/install/include/"', 33 'VALID_ARCHS' => 'x86_64 arm64' 34 } 35 s.library = ['c++', 'stdc++'] 36 s.frameworks = 'Accelerate', 'MetalPerformanceShaders', 'CoreML' 37end 38