JJ_MKVMaker/packages/whisper_ggml/macos/whisper_ggml.podspec

43 lines
2.0 KiB
Ruby

Pod::Spec.new do |s|
s.name = 'whisper_ggml'
s.version = '1.0.0'
s.summary = 'A new Flutter FFI plugin project.'
s.description = <<-DESC
A new Flutter FFI plugin project.
DESC
s.homepage = 'https://github.com/sk3llo/whisper_ggml'
s.license = { :file => '../LICENSE' }
s.author = { 'Your Company' => 'www.antonkarpenko.com' }
# This will ensure the source files in Classes/ are included in the native
# builds of apps using this FFI plugin. Podspec does not support relative
# paths, so Classes contains a forwarder C file that relatively imports
# `../src/*` so that the C sources can be shared among all target platforms.
s.source = { :path => '.' }
s.source_files = 'Classes/**/*.{cpp,c,h,hpp}'
# Only whisper.h is public; the ggml tree has duplicate header basenames
# (common.h, quants.h) that collide when flattened into the framework.
s.public_header_files = 'Classes/whisper/include/whisper.h'
s.dependency 'FlutterMacOS'
s.platform = :osx, '10.15'
s.xcconfig = {
'CLANG_CXX_LANGUAGE_STANDARD' => 'c++20',
}
s.library = 'c++'
s.frameworks = 'Accelerate'
s.pod_target_xcconfig = {
'DEFINES_MODULE' => 'YES',
# whisper.cpp v1.9.1 (CPU backend) include roots
'HEADER_SEARCH_PATHS' => [
'"$(PODS_TARGET_SRCROOT)/Classes/whisper/include"',
'"$(PODS_TARGET_SRCROOT)/Classes/whisper/ggml/include"',
'"$(PODS_TARGET_SRCROOT)/Classes/whisper/ggml/src"',
'"$(PODS_TARGET_SRCROOT)/Classes/whisper/ggml/src/ggml-cpu"',
'"$(PODS_TARGET_SRCROOT)/Classes/whisper/src"',
].join(' '),
'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) GGML_USE_CPU=1 GGML_USE_ACCELERATE=1 ACCELERATE_NEW_LAPACK=1 ACCELERATE_LAPACK_ILP64=1 GGML_VERSION=\"1.9.1\" GGML_COMMIT=\"whisper.cpp-v1.9.1\" WHISPER_VERSION=\"1.9.1\"',
# keep inference usable in debug builds
'GCC_OPTIMIZATION_LEVEL' => '3',
}
s.swift_version = '5.0'
end