From: caryclark@google.com Date: Tue, 18 Sep 2012 15:41:18 +0000 (+0000) Subject: update gyp files to build on iOS X-Git-Tag: accepted/tizen/5.0/unified/20181102.025319~14805 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=35f5ac9738b938e4f4cf3e575f7cc095fa1f59b0;p=platform%2Fupstream%2FlibSkiaSharp.git update gyp files to build on iOS Note that there's a hack in SkImageDecoder_CG.cpp -- the necessary defines are included directly. This is temporary until I can figure out how to include them properly. Review URL: https://codereview.appspot.com/6523044 git-svn-id: http://skia.googlecode.com/svn/trunk@5586 2bbb7eff-a529-9590-31e7-b0007b416f81 --- diff --git a/gyp/images.gyp b/gyp/images.gyp index 24c70a1..00c8377 100644 --- a/gyp/images.gyp +++ b/gyp/images.gyp @@ -73,7 +73,7 @@ '../src/ports/SkImageDecoder_WIC.cpp', ], }], - [ 'skia_os == "mac"', { + [ 'skia_os in ["mac", "ios"]', { 'sources!': [ '../src/images/SkImageDecoder_Factory.cpp', '../src/images/SkImageDecoder_libpng.cpp', @@ -116,6 +116,11 @@ 'SK_ENABLE_LIBPNG', ], }], + [ 'skia_os == "ios"', { + 'include_dirs': [ + '../include/utils/mac', + ], + }], ], 'direct_dependent_settings': { 'include_dirs': [ diff --git a/gyp/ports.gyp b/gyp/ports.gyp index 3f8140d..cc301b6 100644 --- a/gyp/ports.gyp +++ b/gyp/ports.gyp @@ -88,6 +88,7 @@ [ 'skia_os == "ios"', { 'include_dirs': [ '../include/utils/ios', + '../include/utils/mac', ], 'sources': [ '../src/ports/SkFontHost_mac_coretext.cpp', diff --git a/gyp/xml.gyp b/gyp/xml.gyp index 6650a5c..b7878e2 100644 --- a/gyp/xml.gyp +++ b/gyp/xml.gyp @@ -30,7 +30,7 @@ '../src/xml/SkXMLPullParser.cpp', #if 0 around class decl in header ], 'conditions': [ - [ 'skia_os in ["win", "mac", "linux", "freebsd", "openbsd", "solaris", "android"]', { + [ 'skia_os in ["win", "mac", "linux", "freebsd", "openbsd", "solaris", "android", "ios"]', { 'sources!': [ # no jsapi.h by default on system '../include/xml/SkJS.h', diff --git a/src/ports/SkImageDecoder_CG.cpp b/src/ports/SkImageDecoder_CG.cpp index 26f5744..ac2eb0e 100644 --- a/src/ports/SkImageDecoder_CG.cpp +++ b/src/ports/SkImageDecoder_CG.cpp @@ -20,6 +20,10 @@ #ifdef SK_BUILD_FOR_IOS #include +#include +//#include // FIXME: hack -- can't figure out how to include this +extern const CFStringRef kUTTypeJPEG __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_3_0); +extern const CFStringRef kUTTypePNG __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_3_0); #endif static void malloc_release_proc(void* info, const void* data, size_t size) {