diff options
Diffstat (limited to 'gyp')
-rw-r--r-- | gyp/common_conditions.gypi | 5 | ||||
-rw-r--r-- | gyp/views.gyp | 33 |
2 files changed, 33 insertions, 5 deletions
diff --git a/gyp/common_conditions.gypi b/gyp/common_conditions.gypi index e939470516..e7edb2763f 100644 --- a/gyp/common_conditions.gypi +++ b/gyp/common_conditions.gypi @@ -388,6 +388,11 @@ '<@(skia_for_android_framework_defines)', ], }], + + [ 'skia_use_sdl == 1', + { + 'defines': [ 'SK_USE_SDL' ], + }], [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "chromeos"]', { diff --git a/gyp/views.gyp b/gyp/views.gyp index f8ccf51903..1130e669d3 100644 --- a/gyp/views.gyp +++ b/gyp/views.gyp @@ -86,7 +86,7 @@ '../src/gpu', ], }], - [ 'skia_os == "mac"', { + [ 'skia_os == "mac" and skia_use_sdl == 0', { 'link_settings': { 'libraries': [ '$(SDKROOT)/System/Library/Frameworks/QuartzCore.framework', @@ -107,7 +107,7 @@ '../src/views/mac/skia_mac.mm', ], }], - [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "chromeos"]', { + [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "chromeos"] and skia_use_sdl == 0', { 'link_settings': { 'libraries': [ '-lGL', @@ -142,9 +142,20 @@ 'sdl.gyp:sdl', ], 'sources!': [ - '../src/views/unix/SkOSWindow_Unix.cpp', - '../src/views/unix/keysym2ucs.c', - '../src/views/unix/skia_unix.cpp', + # linux sources + '../src/views/unix/SkOSWindow_Unix.cpp', + '../src/views/unix/keysym2ucs.c', + '../src/views/unix/skia_unix.cpp', + + # mac sources + '../src/views/mac/SkEventNotifier.h', + '../src/views/mac/SkEventNotifier.mm', + '../src/views/mac/SkTextFieldCell.h', + '../src/views/mac/SkTextFieldCell.m', + '../src/views/mac/SkNSView.h', + '../src/views/mac/SkNSView.mm', + '../src/views/mac/SkOSWindow_Mac.mm', + '../src/views/mac/skia_mac.mm', ], 'sources': [ '../src/views/sdl/SkOSWindow_SDL.cpp', @@ -152,6 +163,18 @@ 'export_dependent_settings': [ 'sdl.gyp:sdl', ], + 'conditions': [ + [ 'skia_os == "mac"', { + 'include_dirs': [ + '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework/Headers', + ], + 'link_settings': { + 'libraries': [ + '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework', + ], + } + }], + ], }], ], 'direct_dependent_settings': { |