blob: 29f546493833b1898522ce99d596c6b7160e76a4 [file] [log] [blame]
Dan Sinclaira03c3432016-03-16 15:35:20 -04001# Copyright (c) 2012 The Chromium Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5{
6 'conditions': [
7 # In component mode (shared_lib), we build all of skia as a single DLL.
8 # However, in the static mode, we need to build skia as multiple targets
9 # in order to support the use case where a platform (e.g. Android) may
10 # already have a copy of skia as a system library.
11 ['component=="static_library"', {
12 'targets': [
13 {
14 'target_name': 'skia_library',
15 'type': 'static_library',
16 # The optimize: 'max' scattered throughout are particularly
17 # important when compiled by MSVC 2013, which seems
18 # to mis-link-time-compile code that's built with
19 # different optimization levels. http://crbug.com/543583
20 'variables': {
21 'optimize': 'max',
22 },
23 'includes': [
24 'skia_common.gypi',
25 'skia_library.gypi',
26 ],
27 },
28 ],
29 }],
30 ['component=="static_library"', {
31 'targets': [
32 {
33 'target_name': 'skia',
34 # The optimize: 'max' scattered throughout are particularly
35 # important when compiled by MSVC 2013, which seems
36 # to mis-link-time-compile code that's built with
37 # different optimization levels. http://crbug.com/543583
38 'variables': {
39 'optimize': 'max',
40 },
41 'type': 'none',
42 'dependencies': [
43 'skia_library',
44 'skia_pdfium',
45 ],
46 'export_dependent_settings': [
47 'skia_library',
48 'skia_pdfium',
49 ],
50 'direct_dependent_settings': {
51 'conditions': [
52 [ 'OS == "win"', {
53 'defines': [
54 'GR_GL_FUNCTION_TYPE=__stdcall',
55 ],
56 }],
57 ],
58 },
59 },
60 {
61 'target_name': 'skia_pdfium',
62 'type': 'static_library',
63 'includes': [
64 'skia_pdfium.gypi',
65 'skia_common.gypi',
66 ],
67 },
68 ],
69 }],
70 ],
71}