Added Xcode project that builds libwebp as a framework for all 4 platforms + small macos command line example
+ gitignore, readme, travis CI script
This commit is contained in:
parent
f71b9ddc66
commit
e8299f4069
|
@ -0,0 +1,66 @@
|
|||
# Xcode
|
||||
#
|
||||
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
|
||||
|
||||
## Build generated
|
||||
build/
|
||||
DerivedData/
|
||||
|
||||
## Various settings
|
||||
*.pbxuser
|
||||
!default.pbxuser
|
||||
*.mode1v3
|
||||
!default.mode1v3
|
||||
*.mode2v3
|
||||
!default.mode2v3
|
||||
*.perspectivev3
|
||||
!default.perspectivev3
|
||||
xcuserdata/
|
||||
|
||||
## Other
|
||||
*.moved-aside
|
||||
*.xccheckout
|
||||
*.xcscmblueprint
|
||||
|
||||
## Obj-C/Swift specific
|
||||
*.hmap
|
||||
*.ipa
|
||||
*.dSYM.zip
|
||||
*.dSYM
|
||||
|
||||
# CocoaPods
|
||||
#
|
||||
# We recommend against adding the Pods directory to your .gitignore. However
|
||||
# you should judge for yourself, the pros and cons are mentioned at:
|
||||
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
|
||||
#
|
||||
# Pods/
|
||||
#
|
||||
# Add this line if you want to avoid checking in source code from the Xcode workspace
|
||||
# *.xcworkspace
|
||||
|
||||
# Carthage
|
||||
#
|
||||
# Add this line if you want to avoid checking in source code from Carthage dependencies.
|
||||
# Carthage/Checkouts
|
||||
|
||||
Carthage/Build
|
||||
|
||||
# fastlane
|
||||
#
|
||||
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
|
||||
# screenshots whenever they are needed.
|
||||
# For more information about the recommended setup visit:
|
||||
# https://docs.fastlane.tools/best-practices/source-control/#source-control
|
||||
|
||||
fastlane/report.xml
|
||||
fastlane/Preview.html
|
||||
fastlane/screenshots/**/*.png
|
||||
fastlane/test_output
|
||||
|
||||
# Code Injection
|
||||
#
|
||||
# After new code Injection tools there's a generated folder /iOSInjectionProject
|
||||
# https://github.com/johnno1962/injectionforxcode
|
||||
|
||||
iOSInjectionProject/
|
|
@ -0,0 +1,31 @@
|
|||
|
||||
language: objective-c
|
||||
osx_image: xcode9.4
|
||||
|
||||
env:
|
||||
global:
|
||||
- LC_CTYPE=en_US.UTF-8
|
||||
- LANG=en_US.UTF-8
|
||||
|
||||
notifications:
|
||||
email: false
|
||||
|
||||
before_install:
|
||||
- env
|
||||
- locale
|
||||
- gem install xcpretty --no-rdoc --no-ri --no-document --quiet
|
||||
- xcpretty --version
|
||||
- xcodebuild -version
|
||||
- xcodebuild -showsdks
|
||||
|
||||
script:
|
||||
- set -o pipefail
|
||||
|
||||
- echo Build the framework
|
||||
- xcodebuild clean build -scheme 'libwebp' -sdk macosx -configuration Debug | xcpretty -c
|
||||
- xcodebuild clean build -scheme 'libwebp' -sdk iphonesimulator PLATFORM_NAME=iphonesimulator -configuration Debug | xcpretty -c
|
||||
- xcodebuild clean build -scheme 'libwebp' -sdk appletvsimulator -configuration Debug | xcpretty -c
|
||||
- xcodebuild clean build -scheme 'libwebp' -sdk watchsimulator -configuration Debug | xcpretty -c
|
||||
|
||||
- echo Build the example app
|
||||
- xcodebuild build -scheme 'libwebpExample' -sdk macosx -configuration Debug | xcpretty -c
|
|
@ -0,0 +1,30 @@
|
|||
# libwebp + Xcode
|
||||
|
||||
A wrapper for [libwebp](https://github.com/webmproject/libwebp) + Xcode project.
|
||||
This enables Carthage support
|
||||
|
||||
[![CI Status](http://img.shields.io/travis/SDWebImage/libwebp-Xcode.svg?style=flat)](https://travis-ci.org/SDWebImage/libwebp-Xcode)
|
||||
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/SDWebImage/libwebp-Xcode)
|
||||
|
||||
## Requirements
|
||||
|
||||
+ iOS 8
|
||||
+ macOS 10.6
|
||||
+ tvOS 9.0
|
||||
+ watchOS 2.0
|
||||
|
||||
## Installation
|
||||
|
||||
libwebp is (via this repo) available through [Carthage](https://github.com/Carthage/Carthage).
|
||||
|
||||
```
|
||||
github "SDWebImage/libwebp-Xcode"
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
Use libwebp as you would normally, this is just a repo that adds an Xcode proj.
|
||||
|
||||
## License
|
||||
|
||||
libwebp is available under the BSD-3 license. See [the LICENSE file](https://github.com/webmproject/libwebp/blob/master/COPYING) for more info.
|
|
@ -0,0 +1,24 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>0.6.1</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,25 @@
|
|||
//
|
||||
// libwebp.h
|
||||
// libwebp
|
||||
//
|
||||
// Created by Bogdan Poplauschi on 28/08/2018.
|
||||
// Copyright © 2018 SDWebImage. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
//! Project version number for libwebp.
|
||||
FOUNDATION_EXPORT double libwebpVersionNumber;
|
||||
|
||||
//! Project version string for libwebp.
|
||||
FOUNDATION_EXPORT const unsigned char libwebpVersionString[];
|
||||
|
||||
// In this header, you should import all the public headers of your framework using statements like #import <libwebp/PublicHeader.h>
|
||||
|
||||
#import <libwebp/decode.h>
|
||||
#import <libwebp/demux.h>
|
||||
#import <libwebp/encode.h>
|
||||
#import <libwebp/format_constants.h>
|
||||
#import <libwebp/mux.h>
|
||||
#import <libwebp/mux_types.h>
|
||||
#import <libwebp/types.h>
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:libwebp+xcode.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
|
@ -0,0 +1,17 @@
|
|||
//
|
||||
// main.m
|
||||
// libwebpExample
|
||||
//
|
||||
// Created by Bogdan Poplauschi on 28/08/2018.
|
||||
// Copyright © 2018 SDWebImage. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <libwebp/libwebp.h>
|
||||
|
||||
int main(int argc, const char * argv[]) {
|
||||
@autoreleasepool {
|
||||
NSLog(@"Decoder version: %d", WebPGetDecoderVersion());
|
||||
}
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue