update gyp files to build on iOS
authorcaryclark@google.com <caryclark@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Tue, 18 Sep 2012 15:41:18 +0000 (15:41 +0000)
committercaryclark@google.com <caryclark@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Tue, 18 Sep 2012 15:41:18 +0000 (15:41 +0000)
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

gyp/images.gyp
gyp/ports.gyp
gyp/xml.gyp
src/ports/SkImageDecoder_CG.cpp

index 24c70a1..00c8377 100644 (file)
@@ -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',
             'SK_ENABLE_LIBPNG',
           ],
         }],
+        [ 'skia_os == "ios"', {
+           'include_dirs': [
+             '../include/utils/mac',
+           ],
+        }],
       ],
       'direct_dependent_settings': {
         'include_dirs': [
index 3f8140d..cc301b6 100644 (file)
@@ -88,6 +88,7 @@
         [ 'skia_os == "ios"', {
           'include_dirs': [
             '../include/utils/ios',
+            '../include/utils/mac',
           ],
           'sources': [
             '../src/ports/SkFontHost_mac_coretext.cpp',
index 6650a5c..b7878e2 100644 (file)
@@ -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',
index 26f5744..ac2eb0e 100644 (file)
 
 #ifdef SK_BUILD_FOR_IOS
 #include <CoreGraphics/CoreGraphics.h>
+#include <ImageIO/ImageIO.h>
+//#include <UTCoreTypes.h> // 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) {