• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# 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.
5# Views is the Skia windowing toolkit.
6# It provides:
7#  * A portable means of creating native windows.
8#  * Events.
9#  * Basic widgets and controls.
10
11{
12  'targets': [
13    {
14      'target_name': 'views',
15      'product_name': 'skia_views',
16      'type': 'static_library',
17      'standalone_static_library': 1,
18      'dependencies': [
19        'skia_lib.gyp:skia_lib',
20        'xml.gyp:xml',
21      ],
22      'include_dirs': [
23        '../include/private',
24        '../include/views',
25        '../include/views/unix',
26        '../src/core',
27        '../src/gpu',
28      ],
29      'sources': [
30        '../include/views/SkApplication.h',
31        '../include/views/SkBGViewArtist.h',
32        '../include/views/SkEvent.h',
33        '../include/views/SkEventSink.h',
34        '../include/views/SkKey.h',
35        '../include/views/SkOSMenu.h',
36        '../include/views/SkOSWindow_Mac.h',
37        '../include/views/SkOSWindow_SDL.h',
38        '../include/views/SkOSWindow_Unix.h',
39        '../include/views/SkOSWindow_Win.h',
40        '../include/views/SkStackViewLayout.h',
41        '../include/views/SkSystemEventTypes.h',
42        '../include/views/SkTouchGesture.h',
43        '../include/views/SkView.h',
44        '../include/views/SkViewInflate.h',
45        '../include/views/SkWidget.h',
46        '../include/views/SkWindow.h',
47
48        '../src/views/SkBGViewArtist.cpp',
49        '../src/views/SkEvent.cpp',
50        '../src/views/SkEventSink.cpp',
51        '../src/views/SkOSMenu.cpp',
52        '../src/views/SkParsePaint.cpp',
53        '../src/views/SkProgressView.cpp',
54        '../src/views/SkStackViewLayout.cpp',
55        '../src/views/SkTagList.cpp',
56        '../src/views/SkTagList.h',
57        '../src/views/SkTouchGesture.cpp',
58        '../src/views/SkView.cpp',
59        '../src/views/SkViewInflate.cpp',
60        '../src/views/SkViewPriv.cpp',
61        '../src/views/SkViewPriv.h',
62        '../src/views/SkWidgets.cpp',
63        '../src/views/SkWindow.cpp',
64
65        # Unix
66        '../src/views/unix/SkOSWindow_Unix.cpp',
67        '../src/views/unix/keysym2ucs.c',
68        '../src/views/unix/skia_unix.cpp',
69
70        # Mac
71        '../src/views/mac/SkEventNotifier.h',
72        '../src/views/mac/SkEventNotifier.mm',
73        '../src/views/mac/SkTextFieldCell.h',
74        '../src/views/mac/SkTextFieldCell.m',
75        '../src/views/mac/SkNSView.h',
76        '../src/views/mac/SkNSView.mm',
77        '../src/views/mac/SkOSWindow_Mac.mm',
78        '../src/views/mac/skia_mac.mm',
79
80        # Windows
81        '../src/views/win/SkOSWindow_win.cpp',
82        '../src/views/win/skia_win.cpp',
83      ],
84      'conditions': [
85        [ 'skia_gpu == 1', {
86          'include_dirs' : [
87            '../src/gpu',
88          ],
89        }],
90        [ 'skia_os == "mac" and skia_use_sdl == 0', {
91          'link_settings': {
92            'libraries': [
93              '$(SDKROOT)/System/Library/Frameworks/QuartzCore.framework',
94              '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
95              '$(SDKROOT)/System/Library/Frameworks/Cocoa.framework',
96              '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
97            ],
98          },
99        },{
100          'sources!': [
101          '../src/views/mac/SkEventNotifier.h',
102          '../src/views/mac/SkEventNotifier.mm',
103          '../src/views/mac/SkTextFieldCell.h',
104          '../src/views/mac/SkTextFieldCell.m',
105          '../src/views/mac/SkNSView.h',
106          '../src/views/mac/SkNSView.mm',
107          '../src/views/mac/SkOSWindow_Mac.mm',
108          '../src/views/mac/skia_mac.mm',
109          ],
110        }],
111        [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "chromeos"] and skia_use_sdl == 0', {
112          'link_settings': {
113            'libraries': [
114              '-lGL',
115              '-lGLU',
116              '-lX11',
117            ],
118          },
119        },{
120          'sources!': [
121            '../src/views/unix/SkOSWindow_Unix.cpp',
122            '../src/views/unix/keysym2ucs.c',
123            '../src/views/unix/skia_unix.cpp',
124          ],
125        }],
126        [ 'skia_os == "win"', {
127        },{
128          'sources!': [
129            '../src/views/win/SkOSWindow_win.cpp',
130            '../src/views/win/skia_win.cpp',
131          ],
132        }],
133        [ 'skia_gpu == 1', {
134          'include_dirs': [
135            '../include/gpu',
136          ],
137        }],
138        [ 'skia_use_sdl == 1', {
139          'defines': [
140            'SK_USE_SDL',
141          ],
142          'dependencies': [
143            'sdl.gyp:sdl',
144          ],
145          'sources!': [
146             # linux sources
147             '../src/views/unix/SkOSWindow_Unix.cpp',
148             '../src/views/unix/keysym2ucs.c',
149             '../src/views/unix/skia_unix.cpp',
150
151             # mac sources
152             '../src/views/mac/SkEventNotifier.h',
153             '../src/views/mac/SkEventNotifier.mm',
154             '../src/views/mac/SkTextFieldCell.h',
155             '../src/views/mac/SkTextFieldCell.m',
156             '../src/views/mac/SkNSView.h',
157             '../src/views/mac/SkNSView.mm',
158             '../src/views/mac/SkOSWindow_Mac.mm',
159             '../src/views/mac/skia_mac.mm',
160
161             # win sources
162             '../src/views/win/SkOSWindow_win.cpp',
163             '../src/views/win/skia_win.cpp',
164          ],
165          'sources': [
166            '../src/views/sdl/SkOSWindow_SDL.cpp',
167          ],
168          'export_dependent_settings': [
169            'sdl.gyp:sdl',
170          ],
171          'conditions': [
172            [ 'skia_os == "mac"', {
173              'include_dirs': [
174                  '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework/Headers',
175              ],
176              'link_settings': {
177                'libraries': [
178                  '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
179                ],
180              }
181            }],
182          ],
183        }],
184      ],
185      'direct_dependent_settings': {
186        'include_dirs': [
187          '../include/views',
188        ],
189      },
190      'export_dependent_settings': [
191        'xml.gyp:xml',
192      ],
193    },
194  ],
195}
196