1 # 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 'variables': { 7 'chromium_code': 1, # Use higher warning level. 8 }, 9 'target_defaults': { 10 'conditions': [ 11 # Linux shared libraries should always be built -fPIC. 12 # 13 # TODO(ajwong): For internal pepper plugins, which are statically linked 14 # into chrome, do we want to build w/o -fPIC? If so, how can we express 15 # that in the build system? 16 ['os_posix==1 and OS!="android" and OS!="mac"', { 17 'cflags': ['-fPIC', '-fvisibility=hidden'], 18 19 # This is needed to make the Linux shlib build happy. Without this, 20 # -fvisibility=hidden gets stripped by the exclusion in common.gypi 21 # that is triggered when a shared library build is specified. 22 'cflags/': [['include', '^-fvisibility=hidden$']], 23 }], 24 ], 25 }, 26 'includes': [ 27 'ppapi_sources.gypi', 28 'ppapi_host.gypi', 29 'ppapi_ipc.gypi', 30 'ppapi_proxy.gypi', 31 'ppapi_shared.gypi', 32 'ppapi_tests.gypi', 33 ], 34 'targets': [ 35 { 36 'target_name': 'ppapi_shared', 37 'type': '<(component)', 38 'variables': { 39 # Set the ppapi_shared_target variable, so that we will pull in the 40 # sources from ppapi_shared.gypi (and only from there). We follow the 41 # same pattern for the other targets defined within this file. 42 'ppapi_shared_target': 1, 43 }, 44 'dependencies': [ 45 '../base/base.gyp:base', 46 '../base/base.gyp:base_i18n', 47 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', 48 '../gpu/command_buffer/command_buffer.gyp:gles2_utils', 49 '../gpu/gpu.gyp:command_buffer_client', 50 '../gpu/gpu.gyp:gles2_implementation', 51 '../media/media.gyp:shared_memory_support', 52 '../skia/skia.gyp:skia', 53 '../third_party/icu/icu.gyp:icuuc', 54 '../ui/surface/surface.gyp:surface', 55 '../url/url.gyp:url_lib', 56 'ppapi.gyp:ppapi_c', 57 ], 58 'export_dependent_settings': [ 59 '../base/base.gyp:base', 60 ], 61 'conditions': [ 62 ['OS=="mac"', { 63 'link_settings': { 64 'libraries': [ 65 '$(SDKROOT)/System/Library/Frameworks/QuartzCore.framework', 66 ], 67 }, 68 }], 69 ['chrome_multiple_dll==1', { 70 'dependencies': [ 71 '../third_party/WebKit/public/blink.gyp:blink_minimal', 72 ], 73 'export_dependent_settings': [ 74 '../third_party/WebKit/public/blink.gyp:blink_minimal', 75 ], 76 }, { 77 'dependencies': [ 78 '../third_party/WebKit/public/blink.gyp:blink', 79 ], 80 'export_dependent_settings': [ 81 '../third_party/WebKit/public/blink.gyp:blink', 82 ], 83 }], 84 ], 85 # Disable c4267 warnings until we fix size_t to int truncations. 86 'msvs_disabled_warnings': [ 4267, ], 87 }, 88 ], 89 'conditions': [ 90 ['component=="static_library"', { 91 # In a static build, build ppapi_ipc separately. 92 'targets': [ 93 { 94 'target_name': 'ppapi_ipc', 95 'type': 'static_library', 96 'variables': { 97 'ppapi_ipc_target': 1, 98 }, 99 'dependencies': [ 100 '../base/base.gyp:base', 101 '../gpu/gpu.gyp:gpu_ipc', 102 '../ipc/ipc.gyp:ipc', 103 '../skia/skia.gyp:skia', 104 'ppapi.gyp:ppapi_c', 105 'ppapi_shared', 106 ], 107 'all_dependent_settings': { 108 'include_dirs': [ 109 '..', 110 ], 111 }, 112 }, 113 { 114 'target_name': 'ppapi_proxy', 115 'type': 'static_library', 116 'variables': { 117 'ppapi_proxy_target': 1, 118 }, 119 'dependencies': [ 120 '../base/base.gyp:base', 121 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', 122 '../gpu/gpu.gyp:gles2_implementation', 123 '../gpu/gpu.gyp:gpu_ipc', 124 '../media/media.gyp:shared_memory_support', 125 '../ipc/ipc.gyp:ipc', 126 '../skia/skia.gyp:skia', 127 '../third_party/icu/icu.gyp:icuuc', 128 '../third_party/icu/icu.gyp:icui18n', 129 '../ui/surface/surface.gyp:surface', 130 'ppapi.gyp:ppapi_c', 131 'ppapi_shared', 132 'ppapi_ipc', 133 ], 134 'all_dependent_settings': { 135 'include_dirs': [ 136 '..', 137 ], 138 }, 139 # Disable c4267 warnings until we fix size_t to int truncations. 140 'msvs_disabled_warnings': [ 4267, ], 141 'conditions': [ 142 ['chrome_multiple_dll==1', { 143 'dependencies': [ 144 '../third_party/WebKit/public/blink.gyp:blink_minimal', 145 ], 146 }, { 147 'dependencies': [ 148 '../third_party/WebKit/public/blink.gyp:blink', 149 ], 150 }], 151 ], 152 }, 153 ], 154 }, 155 { # component != static_library 156 # In the component build, we'll just build ppapi_ipc in to ppapi_proxy. 157 'targets': [ 158 { 159 'target_name': 'ppapi_proxy', 160 'type': 'shared_library', 161 'variables': { 162 # Setting both variables means we pull in the sources from both 163 # ppapi_ipc.gypi and ppapi_proxy.gypi. 164 'ppapi_ipc_target': 1, 165 'ppapi_proxy_target': 1, 166 }, 167 'dependencies': [ 168 '../base/base.gyp:base', 169 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', 170 '../gpu/gpu.gyp:gles2_implementation', 171 '../gpu/gpu.gyp:gpu_ipc', 172 '../media/media.gyp:shared_memory_support', 173 '../ipc/ipc.gyp:ipc', 174 '../skia/skia.gyp:skia', 175 '../third_party/icu/icu.gyp:icuuc', 176 '../third_party/icu/icu.gyp:icui18n', 177 '../ui/surface/surface.gyp:surface', 178 'ppapi.gyp:ppapi_c', 179 'ppapi_shared', 180 ], 181 'all_dependent_settings': { 182 'include_dirs': [ 183 '..', 184 ], 185 }, 186 # Disable c4267 warnings until we fix size_t to int truncations. 187 'msvs_disabled_warnings': [ 4267, ], 188 'conditions': [ 189 ['chrome_multiple_dll==1', { 190 'dependencies': [ 191 '../third_party/WebKit/public/blink.gyp:blink_minimal', 192 ], 193 }, { 194 'dependencies': [ 195 '../third_party/WebKit/public/blink.gyp:blink', 196 ], 197 }], 198 ], 199 }, 200 { 201 # In component build, this is just a phony target that makes sure 202 # ppapi_proxy is built, since that's where the ipc sources go in the 203 # component build. 204 'target_name': 'ppapi_ipc', 205 'type': 'none', 206 'dependencies': [ 207 'ppapi_proxy', 208 ], 209 }, 210 ], 211 }], 212 ['disable_nacl!=1 and OS=="win" and target_arch=="ia32"', { 213 # In windows builds, we also want to define some targets to build in 214 # 64-bit mode for use by nacl64.exe (the NaCl helper process for 64-bit 215 # Windows). 216 'targets': [ 217 { 218 'target_name': 'ppapi_shared_win64', 219 'type': '<(component)', 220 'variables': { 221 'nacl_win64_target': 1, 222 'ppapi_shared_target': 1, 223 }, 224 'dependencies': [ 225 'ppapi.gyp:ppapi_c', 226 '../base/base.gyp:base_nacl_win64', 227 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations_win64', 228 ], 229 'defines': [ 230 '<@(nacl_win64_defines)', 231 ], 232 'export_dependent_settings': [ 233 '../base/base.gyp:base_nacl_win64', 234 ], 235 'configurations': { 236 'Common_Base': { 237 'msvs_target_platform': 'x64', 238 }, 239 }, 240 }, 241 { 242 'target_name': 'ppapi_ipc_win64', 243 'type': 'static_library', 244 'variables': { 245 'nacl_win64_target': 1, 246 'ppapi_ipc_target': 1, 247 }, 248 'dependencies': [ 249 '../base/base.gyp:base_nacl_win64', 250 '../ipc/ipc.gyp:ipc_win64', 251 '../gpu/gpu.gyp:gpu_ipc_win64', 252 'ppapi.gyp:ppapi_c', 253 'ppapi_shared_win64', 254 ], 255 'export_dependent_settings': [ 256 '../gpu/gpu.gyp:gpu_ipc_win64', 257 ], 258 'defines': [ 259 '<@(nacl_win64_defines)', 260 ], 261 'all_dependent_settings': { 262 'include_dirs': [ 263 '..', 264 ], 265 }, 266 'configurations': { 267 'Common_Base': { 268 'msvs_target_platform': 'x64', 269 }, 270 }, 271 }], 272 }], 273 ], 274 } 275