[chromium] Move geometry headers in Platform API to Platform directory
[WebKit-https.git] / Source / Platform / Platform.gyp / Platform.gyp
1 #
2 # Copyright (C) 2011 Google Inc. All rights reserved.
3 #
4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions are
6 # met:
7 #
8 #         * Redistributions of source code must retain the above copyright
9 # notice, this list of conditions and the following disclaimer.
10 #         * Redistributions in binary form must reproduce the above
11 # copyright notice, this list of conditions and the following disclaimer
12 # in the documentation and/or other materials provided with the
13 # distribution.
14 #         * Neither the name of Google Inc. nor the names of its
15 # contributors may be used to endorse or promote products derived from
16 # this software without specific prior written permission.
17 #
18 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 #
30
31 {
32     'includes': [
33         '../../WebKit/chromium/WinPrecompile.gypi',
34         '../Platform.gypi',
35     ],
36     'targets': [
37         {
38             'target_name': 'webkit_platform',
39             'type': 'static_library',
40             'dependencies': [
41                 '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:wtf',
42                 '../../WTF/WTF.gyp/WTF.gyp:newwtf',
43             ],
44             'include_dirs': [
45                 '../chromium',
46                 '<(output_dir)',
47             ],
48             'defines': [
49                 'WEBKIT_IMPLEMENTATION=1',
50             ],
51             'sources': [
52                 '<@(platform_files)',
53             ],
54             'variables': {
55                 # List of headers that are #included in Platform API headers that exist inside
56                 # the WebCore directory. These are only included when WEBKIT_IMPLEMENTATION=1.
57                 # Since Platform/ can't add WebCore/* to the include path, this build step
58                 # copies these headers into the shared intermediate directory and adds that to the include path.
59                 # This is temporary, the better solution is to move these headers into the Platform
60                 # directory for all ports and just use them as normal.
61                 'webcore_headers': [
62                     '../../WebCore/platform/graphics/FloatPoint.h',
63                     '../../WebCore/platform/graphics/FloatQuad.h',
64                     '../../WebCore/platform/graphics/FloatRect.h',
65                     '../../WebCore/platform/graphics/FloatSize.h',
66                     '../../WebCore/platform/graphics/IntPoint.h',
67                     '../../WebCore/platform/graphics/IntRect.h',
68                     '../../WebCore/platform/graphics/IntSize.h',
69                 ],
70                 'output_dir': '<(SHARED_INTERMEDIATE_DIR)/webcore_headers'
71             },
72             'direct_dependent_settings': {
73                 'include_dirs': [
74                     '../chromium',
75                     '<(output_dir)'
76                 ],
77             },
78             'conditions': [
79                 ['inside_chromium_build==1', {
80                     'conditions': [
81                         ['component=="shared_library"', {
82                             'defines': [
83                                 'WEBKIT_DLL',
84                             ],
85                         }],
86                     ],
87                 }],
88             ],
89             'actions': [
90                 {
91                     'action_name': 'platform_api_copy_webcore_headers',
92                     'inputs': [
93                         '<@(webcore_headers)'
94                     ],
95                     'outputs': [
96                         '<(output_dir)/IntPoint.h' # Just have to depend on any one copied header
97                     ],
98                     'action': [
99                         'python',
100                         'copy_webcore_headers.py',
101                         '<(SHARED_INTERMEDIATE_DIR)/webcore_headers',
102                         '<@(webcore_headers)'
103                     ],
104                     'message': 'Copying WebCore headers needed by Platform API'
105                 }
106             ]
107         }
108     ]
109 }
110