Upstream version 5.34.98.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / testing / testing.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     'variables': {
33         'ahem_path': '../../Source/testing/data/fonts/AHEM____.TTF',
34         'source_dir': '../../Source',
35         'conditions': [
36             ['OS=="linux"', {
37                 'use_custom_freetype%': 1,
38             }, {
39                 'use_custom_freetype%': 0,
40             }],
41         ],
42     },
43     'includes': [
44         '../../Source/build/features.gypi',
45         '../../Source/testing/plugin/plugin.gypi',
46     ],
47     'targets': [
48         {
49             'target_name': 'TestNetscapePlugIn',
50             'type': 'loadable_module',
51             'sources': [ '<@(test_plugin_files)' ],
52             'dependencies': [
53                 '../config.gyp:unittest_config',
54                 '<(DEPTH)/third_party/npapi/npapi.gyp:npapi',
55             ],
56             'include_dirs': [
57                 '<(DEPTH)',
58                 '<(source_dir)/testing/plugin/',
59             ],
60             'conditions': [
61                 ['OS=="mac"', {
62                     'mac_bundle': 1,
63                     'product_extension': 'plugin',
64                     'link_settings': {
65                         'libraries': [
66                             '$(SDKROOT)/System/Library/Frameworks/Carbon.framework',
67                             '$(SDKROOT)/System/Library/Frameworks/Cocoa.framework',
68                             '$(SDKROOT)/System/Library/Frameworks/QuartzCore.framework',
69                         ]
70                     },
71                     'xcode_settings': {
72                         'GCC_SYMBOLS_PRIVATE_EXTERN': 'NO',
73                         'INFOPLIST_FILE': 'plugin/mac/Info.plist',
74                     },
75                 }],
76                 ['os_posix == 1 and OS != "mac"', {
77                     'cflags': [
78                         '-fvisibility=default',
79                     ],
80                 }],
81                 ['OS=="win"', {
82                     'defines': [
83                         # This seems like a hack, but this is what Safari Win does.
84                         'snprintf=_snprintf',
85                     ],
86                     'sources': [
87                         'plugin/win/TestNetscapePlugin.def',
88                         'plugin/win/TestNetscapePlugin.rc',
89                     ],
90                     # The .rc file requires that the name of the dll is npTestNetscapePlugIn.dll.
91                     'product_name': 'npTestNetscapePlugIn',
92                     # Disable c4267 warnings until we fix size_t to int truncations.
93                     'msvs_disabled_warnings': [ 4267, ],
94                 }],
95             ],
96         },
97         {
98             'target_name': 'copy_TestNetscapePlugIn',
99             'type': 'none',
100             'dependencies': [
101                 'TestNetscapePlugIn',
102             ],
103             'conditions': [
104                 ['OS=="win"', {
105                     'copies': [{
106                         'destination': '<(PRODUCT_DIR)/plugins',
107                         'files': ['<(PRODUCT_DIR)/npTestNetscapePlugIn.dll'],
108                     }],
109                 }],
110                 ['OS=="mac"', {
111                     'dependencies': ['TestNetscapePlugIn'],
112                     'copies': [{
113                         'destination': '<(PRODUCT_DIR)/plugins/',
114                         'files': ['<(PRODUCT_DIR)/TestNetscapePlugIn.plugin/'],
115                     }],
116                 }],
117                 ['os_posix == 1 and OS != "mac"', {
118                     'copies': [{
119                         'destination': '<(PRODUCT_DIR)/plugins',
120                         'files': ['<(PRODUCT_DIR)/libTestNetscapePlugIn.so'],
121                     }],
122                 }],
123             ],
124         },
125     ], # targets
126     'conditions': [
127         ['gcc_version>=46', {
128             'target_defaults': {
129                 # Disable warnings about c++0x compatibility, as some names (such
130                 # as nullptr) conflict with upcoming c++0x types.
131                 'cflags_cc': ['-Wno-c++0x-compat'],
132             },
133         }],
134         ['clang==1', {
135             'target_defaults': {
136                 # FIXME: Add -Wglobal-constructors after fixing existing bugs.
137             },
138         }],
139     ], # conditions
140 }