4e47acd3ae461fa452cedb6cc6e8497edc85081c
[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                 '../../WTF/WTF.gyp/WTF.gyp:newwtf',
42             ],
43             'include_dirs': [
44                 '../chromium',
45                 '<(output_dir)',
46             ],
47             'defines': [
48                 'WEBKIT_IMPLEMENTATION=1',
49             ],
50             'sources': [
51                 '<@(platform_files)',
52             ],
53             'variables': {
54                 # List of headers that are #included in Platform API headers that exist inside
55                 # the WebCore directory. These are only included when WEBKIT_IMPLEMENTATION=1.
56                 # Since Platform/ can't add WebCore/* to the include path, this build step
57                 # copies these headers into the shared intermediate directory and adds that to the include path.
58                 # This is temporary, the better solution is to move these headers into the Platform
59                 # directory for all ports and just use them as normal.
60                 'webcore_headers': [
61                     '../../WebCore/platform/graphics/FloatPoint.h',
62                     '../../WebCore/platform/graphics/FloatQuad.h',
63                     '../../WebCore/platform/graphics/FloatRect.h',
64                     '../../WebCore/platform/graphics/FloatSize.h',
65                     '../../WebCore/platform/graphics/IntPoint.h',
66                     '../../WebCore/platform/graphics/IntRect.h',
67                     '../../WebCore/platform/graphics/IntSize.h',
68                 ],
69                 'output_dir': '<(SHARED_INTERMEDIATE_DIR)/webcore_headers'
70             },
71             'direct_dependent_settings': {
72                 'include_dirs': [
73                     '../chromium',
74                     '<(output_dir)'
75                 ],
76             },
77             'conditions': [
78                 ['inside_chromium_build==1', {
79                     'conditions': [
80                         ['component=="shared_library"', {
81                             'defines': [
82                                 'WEBKIT_DLL',
83                             ],
84                         }],
85                     ],
86                 }],
87             ],
88             'copies': [
89                 {
90                     'destination': '<(output_dir)',
91                     'files': [
92                         '<@(webcore_headers)'
93                     ]
94                 }
95             ]
96         }
97     ]
98 }
99