2015-02-04 16:12:09 +01:00
|
|
|
|
|
|
|
from toolchain import Recipe, shprint
|
|
|
|
from os.path import join, exists
|
|
|
|
import sh
|
|
|
|
import shutil
|
|
|
|
|
|
|
|
|
|
|
|
class LibSDL2Recipe(Recipe):
|
|
|
|
version = "2.0.3"
|
2015-02-04 16:23:15 +01:00
|
|
|
url = "https://www.libsdl.org/release/SDL2-{version}.tar.gz"
|
2015-02-04 16:12:09 +01:00
|
|
|
library = "Xcode-iOS/SDL/build/Release-{arch.sdk}/libSDL2.a"
|
2015-02-06 01:53:21 +01:00
|
|
|
include_dir = "include"
|
2015-02-04 16:12:09 +01:00
|
|
|
|
|
|
|
def build_arch(self, arch):
|
|
|
|
shprint(sh.xcodebuild,
|
|
|
|
"ONLY_ACTIVE_ARCH=NO",
|
|
|
|
"ARCHS={}".format(arch.arch),
|
|
|
|
"-sdk", arch.sdk,
|
|
|
|
"-project", "Xcode-iOS/SDL/SDL.xcodeproj",
|
|
|
|
"-target", "libSDL",
|
|
|
|
"-configuration", "Release")
|
|
|
|
|
|
|
|
|
|
|
|
recipe = LibSDL2Recipe()
|
|
|
|
|