OLD | NEW |
---|---|
1 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 # IMPORTANT: | 5 # IMPORTANT: |
6 # Please don't directly include this file if you are building via gyp_chromium, | 6 # Please don't directly include this file if you are building via gyp_chromium, |
7 # since gyp_chromium is automatically forcing its inclusion. | 7 # since gyp_chromium is automatically forcing its inclusion. |
8 { | 8 { |
9 # Variables expected to be overriden on the GYP command line (-D) or by | 9 # Variables expected to be overriden on the GYP command line (-D) or by |
10 # ~/.gyp/include.gypi. | 10 # ~/.gyp/include.gypi. |
11 'variables': { | 11 'variables': { |
12 # Putting a variables dict inside another variables dict looks kind of | 12 # Putting a variables dict inside another variables dict looks kind of |
13 # weird. This is done so that 'host_arch', 'chromeos', etc are defined as | 13 # weird. This is done so that 'host_arch', 'chromeos', etc are defined as |
14 # variables within the outer variables dict here. This is necessary | 14 # variables within the outer variables dict here. This is necessary |
15 # to get these variables defined for the conditions within this variables | 15 # to get these variables defined for the conditions within this variables |
16 # dict that operate on these variables (e.g., for setting 'toolkit_views', | 16 # dict that operate on these variables (e.g., for setting 'toolkit_views', |
17 # we need to have 'chromeos' already set). | 17 # we need to have 'chromeos' already set). |
18 'variables': { | 18 'variables': { |
19 'variables': { | 19 'variables': { |
20 'variables': { | 20 'variables': { |
21 # Whether we're building a ChromeOS build. | 21 # Whether we're building a ChromeOS build. |
22 'chromeos%': 0, | 22 'chromeos%': 0, |
23 | 23 |
24 # Whether the Views toolkit can use its Pure form when available | |
25 # or if it must only use GTK (the default at the moment). | |
26 # This is an intermediate step until all of Views is 'Pure', | |
27 # at which point we plan to remove those switches. Until GTK is | |
28 # completely gone the Pure form (when enabled) will coexist with | |
29 # the remaining GTK code (which will diminish over time). | |
oshima
2011/06/30 17:46:51
Can you incorporate something like below?
TOOLKIT
| |
30 'toolkit_uses_pure_views%': 0, | |
31 | |
24 # Disable touch support by default. | 32 # Disable touch support by default. |
25 'touchui%': 0, | 33 'touchui%': 0, |
26 | 34 |
27 # Whether the compositor is enabled on views. | 35 # Whether the compositor is enabled on views. |
28 'views_compositor%': 0, | 36 'views_compositor%': 0, |
29 }, | 37 }, |
30 # Copy conditionally-set variables out one scope. | 38 # Copy conditionally-set variables out one scope. |
31 'chromeos%': '<(chromeos)', | 39 'chromeos%': '<(chromeos)', |
40 'toolkit_uses_pure_views%': '<(toolkit_uses_pure_views)', | |
32 'touchui%': '<(touchui)', | 41 'touchui%': '<(touchui)', |
33 'views_compositor%': '<(views_compositor)', | 42 'views_compositor%': '<(views_compositor)', |
34 | 43 |
35 # Compute the architecture that we're building on. | 44 # Compute the architecture that we're building on. |
36 'conditions': [ | 45 'conditions': [ |
37 [ 'OS=="win" or OS=="mac"', { | 46 [ 'OS=="win" or OS=="mac"', { |
38 'host_arch%': 'ia32', | 47 'host_arch%': 'ia32', |
39 }, { | 48 }, { |
40 # This handles the Unix platforms for which there is some support. | 49 # This handles the Unix platforms for which there is some support. |
41 # Anything else gets passed through, which probably won't work very | 50 # Anything else gets passed through, which probably won't work very |
42 # well; such hosts should pass an explicit target_arch to gyp. | 51 # well; such hosts should pass an explicit target_arch to gyp. |
43 'host_arch%': | 52 'host_arch%': |
44 '<!(uname -m | sed -e "s/i.86/ia32/;s/x86_64/x64/;s/amd64/x64/;s/a rm.*/arm/;s/i86pc/ia32/")', | 53 '<!(uname -m | sed -e "s/i.86/ia32/;s/x86_64/x64/;s/amd64/x64/;s/a rm.*/arm/;s/i86pc/ia32/")', |
45 }], | 54 }], |
46 | 55 |
47 # Set default value of toolkit_views on for Windows, Chrome OS | 56 # Set default value of toolkit_views on for Windows, Chrome OS |
48 # and the touch UI. | 57 # and the touch UI. |
49 ['OS=="win" or chromeos==1 or touchui==1', { | 58 ['OS=="win" or chromeos==1 or touchui==1 or toolkit_uses_pure_views==1 ', { |
50 'toolkit_views%': 1, | 59 'toolkit_views%': 1, |
51 }, { | 60 }, { |
52 'toolkit_views%': 0, | 61 'toolkit_views%': 0, |
53 }], | 62 }], |
63 | |
64 # Views are always Pure in Touch case | |
65 ['touchui==1', { | |
66 'toolkit_uses_pure_views%': 1, | |
67 }, { | |
68 'toolkit_uses_pure_views%': 0, | |
69 }], | |
54 ], | 70 ], |
55 }, | 71 }, |
56 | 72 |
57 # Copy conditionally-set variables out one scope. | 73 # Copy conditionally-set variables out one scope. |
58 'chromeos%': '<(chromeos)', | 74 'chromeos%': '<(chromeos)', |
59 'touchui%': '<(touchui)', | 75 'touchui%': '<(touchui)', |
60 'host_arch%': '<(host_arch)', | 76 'host_arch%': '<(host_arch)', |
61 'toolkit_views%': '<(toolkit_views)', | 77 'toolkit_views%': '<(toolkit_views)', |
78 'toolkit_uses_pure_views%': '<(toolkit_uses_pure_views)', | |
62 'views_compositor%': '<(views_compositor)', | 79 'views_compositor%': '<(views_compositor)', |
63 | 80 |
64 # We used to provide a variable for changing how libraries were built. | 81 # We used to provide a variable for changing how libraries were built. |
65 # This variable remains until we can clean up all the users. | 82 # This variable remains until we can clean up all the users. |
66 # This needs to be one nested variables dict in so that dependent | 83 # This needs to be one nested variables dict in so that dependent |
67 # gyp files can make use of it in their outer variables. (Yikes!) | 84 # gyp files can make use of it in their outer variables. (Yikes!) |
68 # http://code.google.com/p/chromium/issues/detail?id=83308 | 85 # http://code.google.com/p/chromium/issues/detail?id=83308 |
69 'library%': 'static_library', | 86 'library%': 'static_library', |
70 | 87 |
71 # Override branding to select the desired branding flavor. | 88 # Override branding to select the desired branding flavor. |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
213 ], | 230 ], |
214 }, | 231 }, |
215 | 232 |
216 # Copy conditionally-set variables out one scope. | 233 # Copy conditionally-set variables out one scope. |
217 'branding%': '<(branding)', | 234 'branding%': '<(branding)', |
218 'buildtype%': '<(buildtype)', | 235 'buildtype%': '<(buildtype)', |
219 'target_arch%': '<(target_arch)', | 236 'target_arch%': '<(target_arch)', |
220 'host_arch%': '<(host_arch)', | 237 'host_arch%': '<(host_arch)', |
221 'library%': 'static_library', | 238 'library%': 'static_library', |
222 'toolkit_views%': '<(toolkit_views)', | 239 'toolkit_views%': '<(toolkit_views)', |
240 'toolkit_uses_pure_views%': '<(toolkit_uses_pure_views)', | |
223 'views_compositor%': '<(views_compositor)', | 241 'views_compositor%': '<(views_compositor)', |
224 'os_posix%': '<(os_posix)', | 242 'os_posix%': '<(os_posix)', |
225 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)', | 243 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)', |
226 'use_skia%': '<(use_skia)', | 244 'use_skia%': '<(use_skia)', |
227 'use_x11%': '<(use_x11)', | 245 'use_x11%': '<(use_x11)', |
228 'use_gnome_keyring%': '<(use_gnome_keyring)', | 246 'use_gnome_keyring%': '<(use_gnome_keyring)', |
229 'linux_fpic%': '<(linux_fpic)', | 247 'linux_fpic%': '<(linux_fpic)', |
230 'enable_flapper_hacks%': '<(enable_flapper_hacks)', | 248 'enable_flapper_hacks%': '<(enable_flapper_hacks)', |
231 'chromeos%': '<(chromeos)', | 249 'chromeos%': '<(chromeos)', |
232 'touchui%': '<(touchui)', | 250 'touchui%': '<(touchui)', |
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
562 }, { | 580 }, { |
563 'grit_defines': ['-D', '_chromium', | 581 'grit_defines': ['-D', '_chromium', |
564 '-E', 'CHROMIUM_BUILD=chromium'], | 582 '-E', 'CHROMIUM_BUILD=chromium'], |
565 }], | 583 }], |
566 ['chromeos==1', { | 584 ['chromeos==1', { |
567 'grit_defines': ['-D', 'chromeos'], | 585 'grit_defines': ['-D', 'chromeos'], |
568 }], | 586 }], |
569 ['toolkit_views==1', { | 587 ['toolkit_views==1', { |
570 'grit_defines': ['-D', 'toolkit_views'], | 588 'grit_defines': ['-D', 'toolkit_views'], |
571 }], | 589 }], |
590 ['toolkit_uses_pure_views==1', { | |
591 'grit_defines': ['-D', 'toolkit_uses_pure_views'], | |
592 }], | |
572 ['touchui==1', { | 593 ['touchui==1', { |
573 'grit_defines': ['-D', 'touchui'], | 594 'grit_defines': ['-D', 'touchui'], |
574 }], | 595 }], |
575 ['file_manager_extension==1', { | 596 ['file_manager_extension==1', { |
576 'grit_defines': ['-D', 'file_manager_extension'], | 597 'grit_defines': ['-D', 'file_manager_extension'], |
577 }], | 598 }], |
578 ['remoting==1', { | 599 ['remoting==1', { |
579 'grit_defines': ['-D', 'remoting'], | 600 'grit_defines': ['-D', 'remoting'], |
580 }], | 601 }], |
581 ['use_titlecase_in_grd_files==1', { | 602 ['use_titlecase_in_grd_files==1', { |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
655 }, | 676 }, |
656 'conditions': [ | 677 'conditions': [ |
657 ['branding=="Chrome"', { | 678 ['branding=="Chrome"', { |
658 'defines': ['GOOGLE_CHROME_BUILD'], | 679 'defines': ['GOOGLE_CHROME_BUILD'], |
659 }, { # else: branding!="Chrome" | 680 }, { # else: branding!="Chrome" |
660 'defines': ['CHROMIUM_BUILD'], | 681 'defines': ['CHROMIUM_BUILD'], |
661 }], | 682 }], |
662 ['toolkit_views==1', { | 683 ['toolkit_views==1', { |
663 'defines': ['TOOLKIT_VIEWS=1'], | 684 'defines': ['TOOLKIT_VIEWS=1'], |
664 }], | 685 }], |
686 ['toolkit_uses_pure_views==1', { | |
687 'defines': ['TOOLKIT_USES_PURE_VIEWS=1'], | |
688 }], | |
665 ['views_compositor==1', { | 689 ['views_compositor==1', { |
666 'defines': ['VIEWS_COMPOSITOR=1'], | 690 'defines': ['VIEWS_COMPOSITOR=1'], |
667 }], | 691 }], |
668 ['chromeos==1', { | 692 ['chromeos==1', { |
669 'defines': ['OS_CHROMEOS=1'], | 693 'defines': ['OS_CHROMEOS=1'], |
670 }], | 694 }], |
671 ['touchui==1', { | 695 ['touchui==1', { |
672 'defines': ['TOUCH_UI=1'], | 696 'defines': ['TOUCH_UI=1'], |
673 }], | 697 }], |
674 ['file_manager_extension==1', { | 698 ['file_manager_extension==1', { |
(...skipping 1103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1778 # and therefore SYMROOT, needs to be set at the project level. | 1802 # and therefore SYMROOT, needs to be set at the project level. |
1779 'SYMROOT': '<(DEPTH)/xcodebuild', | 1803 'SYMROOT': '<(DEPTH)/xcodebuild', |
1780 }, | 1804 }, |
1781 } | 1805 } |
1782 | 1806 |
1783 # Local Variables: | 1807 # Local Variables: |
1784 # tab-width:2 | 1808 # tab-width:2 |
1785 # indent-tabs-mode:nil | 1809 # indent-tabs-mode:nil |
1786 # End: | 1810 # End: |
1787 # vim: set expandtab tabstop=2 shiftwidth=2: | 1811 # vim: set expandtab tabstop=2 shiftwidth=2: |
OLD | NEW |