blob: 4ba6174e7bbd911ae2ce158896af68b470bc9ae9 [file] [log] [blame]
scroggo3e562272015-03-25 10:22:41 -07001# Copyright 2015 Google Inc.
2#
3# Use of this source code is governed by a BSD-style license that can be
4# found in the LICENSE file.
tfarina@chromium.orge229e922012-09-27 13:44:57 +00005# Views is the Skia windowing toolkit.
6# It provides:
7# * A portable means of creating native windows.
8# * Events.
9# * Basic widgets and controls.
bungeman@google.com5e41b372012-03-23 14:11:43 +000010
epoger@google.comae85aea2011-05-31 13:50:51 +000011{
epoger@google.comae85aea2011-05-31 13:50:51 +000012 'targets': [
13 {
14 'target_name': 'views',
borenet@google.comefb1d772012-10-10 19:45:51 +000015 'product_name': 'skia_views',
epoger@google.comae85aea2011-05-31 13:50:51 +000016 'type': 'static_library',
borenet@google.comefb1d772012-10-10 19:45:51 +000017 'standalone_static_library': 1,
bungeman@google.comb8f36552013-07-22 14:39:45 +000018 'dependencies': [
19 'skia_lib.gyp:skia_lib',
djsollen5ae77652014-11-14 05:52:50 -080020 'xml.gyp:xml',
bungeman@google.comb8f36552013-07-22 14:39:45 +000021 ],
bungeman@google.com2b0ab9e2013-07-19 22:31:23 +000022 'include_dirs': [
herbb906daf2015-09-29 09:37:59 -070023 '../include/private',
bungeman@google.com2b0ab9e2013-07-19 22:31:23 +000024 '../include/views',
25 '../include/views/unix',
bungeman5d2cd6e2016-02-23 07:34:25 -080026 '../src/core',
bsalomon42380172015-02-23 08:57:23 -080027 '../src/gpu',
epoger@google.comae85aea2011-05-31 13:50:51 +000028 ],
29 'sources': [
30 '../include/views/SkApplication.h',
epoger@google.comae85aea2011-05-31 13:50:51 +000031 '../include/views/SkEvent.h',
32 '../include/views/SkEventSink.h',
epoger@google.comae85aea2011-05-31 13:50:51 +000033 '../include/views/SkKey.h',
34 '../include/views/SkOSMenu.h',
35 '../include/views/SkOSWindow_Mac.h',
36 '../include/views/SkOSWindow_SDL.h',
37 '../include/views/SkOSWindow_Unix.h',
38 '../include/views/SkOSWindow_Win.h',
epoger@google.comae85aea2011-05-31 13:50:51 +000039 '../include/views/SkSystemEventTypes.h',
40 '../include/views/SkTouchGesture.h',
41 '../include/views/SkView.h',
epoger@google.comae85aea2011-05-31 13:50:51 +000042 '../include/views/SkWindow.h',
43
epoger@google.comae85aea2011-05-31 13:50:51 +000044 '../src/views/SkEvent.cpp',
45 '../src/views/SkEventSink.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +000046 '../src/views/SkOSMenu.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +000047 '../src/views/SkTagList.cpp',
48 '../src/views/SkTagList.h',
epoger@google.comae85aea2011-05-31 13:50:51 +000049 '../src/views/SkTouchGesture.cpp',
50 '../src/views/SkView.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +000051 '../src/views/SkViewPriv.cpp',
52 '../src/views/SkViewPriv.h',
epoger@google.comae85aea2011-05-31 13:50:51 +000053 '../src/views/SkWindow.cpp',
joshualitt65d6fbb2015-11-04 13:41:02 -080054
55 # Unix
56 '../src/views/unix/SkOSWindow_Unix.cpp',
57 '../src/views/unix/keysym2ucs.c',
58 '../src/views/unix/skia_unix.cpp',
bungeman@google.comcbd76ae2012-03-21 20:59:49 +000059
tfarina@chromium.orge229e922012-09-27 13:44:57 +000060 # Mac
bsalomon241b56d2015-06-18 11:49:42 -070061 '../src/views/mac/SkEventNotifier.h',
62 '../src/views/mac/SkEventNotifier.mm',
63 '../src/views/mac/SkTextFieldCell.h',
64 '../src/views/mac/SkTextFieldCell.m',
65 '../src/views/mac/SkNSView.h',
66 '../src/views/mac/SkNSView.mm',
bungeman@google.comcbd76ae2012-03-21 20:59:49 +000067 '../src/views/mac/SkOSWindow_Mac.mm',
68 '../src/views/mac/skia_mac.mm',
69
tfarina@chromium.orge229e922012-09-27 13:44:57 +000070 # Windows
bungeman@google.comcbd76ae2012-03-21 20:59:49 +000071 '../src/views/win/SkOSWindow_win.cpp',
72 '../src/views/win/skia_win.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +000073 ],
74 'conditions': [
caryclarkc8fcafb2015-01-30 12:37:02 -080075 [ 'skia_gpu == 1', {
76 'include_dirs' : [
77 '../src/gpu',
78 ],
79 }],
joshualitt47fdae92015-11-09 12:30:05 -080080 [ 'skia_os == "mac" and skia_use_sdl == 0', {
epoger@google.comae85aea2011-05-31 13:50:51 +000081 'link_settings': {
82 'libraries': [
bsalomon241b56d2015-06-18 11:49:42 -070083 '$(SDKROOT)/System/Library/Frameworks/QuartzCore.framework',
84 '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
yangsu@google.coma8540412011-08-30 14:40:49 +000085 '$(SDKROOT)/System/Library/Frameworks/Cocoa.framework',
86 '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
epoger@google.comae85aea2011-05-31 13:50:51 +000087 ],
88 },
bungeman@google.comcbd76ae2012-03-21 20:59:49 +000089 },{
90 'sources!': [
bsalomon241b56d2015-06-18 11:49:42 -070091 '../src/views/mac/SkEventNotifier.h',
92 '../src/views/mac/SkEventNotifier.mm',
93 '../src/views/mac/SkTextFieldCell.h',
94 '../src/views/mac/SkTextFieldCell.m',
95 '../src/views/mac/SkNSView.h',
96 '../src/views/mac/SkNSView.mm',
97 '../src/views/mac/SkOSWindow_Mac.mm',
98 '../src/views/mac/skia_mac.mm',
bungeman@google.comcbd76ae2012-03-21 20:59:49 +000099 ],
epoger@google.comae85aea2011-05-31 13:50:51 +0000100 }],
borenet43bf5112016-04-29 14:01:34 -0700101 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris"] and skia_use_sdl == 0', {
borenet@google.comdb2e25a2012-11-01 18:01:08 +0000102 'link_settings': {
103 'libraries': [
104 '-lGL',
105 '-lGLU',
106 '-lX11',
107 ],
108 },
bungeman@google.comcbd76ae2012-03-21 20:59:49 +0000109 },{
110 'sources!': [
111 '../src/views/unix/SkOSWindow_Unix.cpp',
112 '../src/views/unix/keysym2ucs.c',
epoger@google.comc62923d2012-03-22 15:37:22 +0000113 '../src/views/unix/skia_unix.cpp',
bungeman@google.comcbd76ae2012-03-21 20:59:49 +0000114 ],
115 }],
116 [ 'skia_os == "win"', {
117 },{
118 'sources!': [
119 '../src/views/win/SkOSWindow_win.cpp',
120 '../src/views/win/skia_win.cpp',
121 ],
epoger@google.comae85aea2011-05-31 13:50:51 +0000122 }],
borenet@google.comb364eb62012-10-11 19:23:46 +0000123 [ 'skia_gpu == 1', {
124 'include_dirs': [
125 '../include/gpu',
126 ],
127 }],
bsalomon3724e572016-03-30 18:56:19 -0700128 [ 'skia_angle', {
129 'dependencies': [
130 'angle.gyp:*',
131 ],
132 }],
joshualitt65d6fbb2015-11-04 13:41:02 -0800133 [ 'skia_use_sdl == 1', {
134 'defines': [
135 'SK_USE_SDL',
136 ],
137 'dependencies': [
138 'sdl.gyp:sdl',
139 ],
140 'sources!': [
joshualitt47fdae92015-11-09 12:30:05 -0800141 # linux sources
142 '../src/views/unix/SkOSWindow_Unix.cpp',
143 '../src/views/unix/keysym2ucs.c',
144 '../src/views/unix/skia_unix.cpp',
145
146 # mac sources
147 '../src/views/mac/SkEventNotifier.h',
148 '../src/views/mac/SkEventNotifier.mm',
149 '../src/views/mac/SkTextFieldCell.h',
150 '../src/views/mac/SkTextFieldCell.m',
151 '../src/views/mac/SkNSView.h',
152 '../src/views/mac/SkNSView.mm',
153 '../src/views/mac/SkOSWindow_Mac.mm',
154 '../src/views/mac/skia_mac.mm',
joshualittdad57c82015-11-11 13:17:06 -0800155
156 # win sources
157 '../src/views/win/SkOSWindow_win.cpp',
158 '../src/views/win/skia_win.cpp',
joshualitt65d6fbb2015-11-04 13:41:02 -0800159 ],
160 'sources': [
161 '../src/views/sdl/SkOSWindow_SDL.cpp',
162 ],
163 'export_dependent_settings': [
164 'sdl.gyp:sdl',
165 ],
joshualitt47fdae92015-11-09 12:30:05 -0800166 'conditions': [
167 [ 'skia_os == "mac"', {
168 'include_dirs': [
169 '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework/Headers',
170 ],
171 'link_settings': {
172 'libraries': [
173 '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
174 ],
175 }
176 }],
177 ],
joshualitt65d6fbb2015-11-04 13:41:02 -0800178 }],
epoger@google.comae85aea2011-05-31 13:50:51 +0000179 ],
180 'direct_dependent_settings': {
181 'include_dirs': [
182 '../include/views',
183 ],
184 },
djsollen5ae77652014-11-14 05:52:50 -0800185 'export_dependent_settings': [
186 'xml.gyp:xml',
187 ],
epoger@google.comae85aea2011-05-31 13:50:51 +0000188 },
189 ],
190}