美文网首页swift
GPUImage2 swift版本使用pod安装

GPUImage2 swift版本使用pod安装

作者: 云上听风 | 来源:发表于2018-04-12 01:22 被阅读0次

    来源: https://github.com/BradLarson/GPUImage2/issues/1
    支持swift4


    For Swift 4, here's an update to @m1entus's local podspec:

    # based on https://github.com/BradLarson/GPUImage2/issues/1#issuecomment-228542480
    
    Pod::Spec.new do |s|
      s.name     = 'GPUImage2'
      s.version  = '0.1.0'
      s.license  = 'BSD'
      s.summary  = 'An open source iOS framework for GPU-based image and video processing.'
      s.homepage = 'https://github.com/BradLarson/GPUImage2'
      s.author   = { 'Brad Larson' => 'contact@sunsetlakesoftware.com' }
    
      # This commit on that fork of GPUImage should contain just upgrades needed for Swift 4 compatibility. See https://github.com/BradLarson/GPUImage2/pull/212
      # Replace with https://github.com/BradLarson/GPUImage2.git when merged
      # into BradLarson's repository.
      s.source   = { :git => 'https://github.com/andrewcampoli/GPUImage2', :commit => '148c84e6b4194daeba122e77449f5ee9c8188161' }
    
      s.source_files = 'framework/Source/**/*.{swift}'
      s.resources = 'framework/Source/Operations/Shaders/*.{fsh}'
      s.requires_arc = true
      s.xcconfig = { 'CLANG_MODULES_AUTOLINK' => 'YES', 'OTHER_SWIFT_FLAGS' => "$(inherited) -DGLES"}
    
      s.ios.deployment_target = '8.0'
      s.ios.exclude_files = 'framework/Source/Mac', 'framework/Source/Linux', 'framework/Source/Operations/Shaders/ConvertedShaders_GL.swift'
      s.frameworks   = ['OpenGLES', 'CoreMedia', 'QuartzCore', 'AVFoundation']
    
    end
    
    

    Usage

    1. Save this as GPUImage2.podspec in the directory where your Podfile is.
    2. Add the following line to your Podfile: pod 'GPUImage2', :podspec => './GPUImage2.podspec'
    3. run pod install (you may have to close and re-open your Xcode workspace.)
    4. you can now import GPUImage2

    相关文章

      网友评论

        本文标题:GPUImage2 swift版本使用pod安装

        本文链接:https://www.haomeiwen.com/subject/hxvtkftx.html