1# Copyright (c) 2009 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 'conditions': [ 7 ['sysroot!=""', { 8 'variables': { 9 'pkg-config': './pkg-config-wrapper "<(sysroot)"', 10 }, 11 }, { 12 'variables': { 13 'pkg-config': 'pkg-config' 14 }, 15 }], 16 [ 'OS=="linux" or OS=="freebsd" or OS=="openbsd"', { 17 'variables': { 18 # We use our own copy of libssl3, although we still need to link against 19 # the rest of NSS. 20 'use_system_ssl%': 0, 21 }, 22 }, { # OS!="linux" 23 'variables': { 24 'use_system_ssl%': 1, 25 }, 26 }], 27 ], 28 29 30 'targets': [ 31 { 32 'target_name': 'gtk', 33 'type': 'settings', 34 'conditions': [ 35 ['_toolset=="target"', { 36 'direct_dependent_settings': { 37 'cflags': [ 38 '<!@(<(pkg-config) --cflags gtk+-2.0 gthread-2.0)', 39 ], 40 }, 41 'link_settings': { 42 'ldflags': [ 43 '<!@(<(pkg-config) --libs-only-L --libs-only-other gtk+-2.0 gthread-2.0)', 44 ], 45 'libraries': [ 46 '<!@(<(pkg-config) --libs-only-l gtk+-2.0 gthread-2.0)', 47 ], 48 }, 49 }], 50 [ 'chromeos==1', { 51 'link_settings': { 52 'libraries': [ '-lXtst' ] 53 } 54 }]] 55 }, 56 { 57 'target_name': 'gtkprint', 58 'type': 'settings', 59 'conditions': [ 60 ['_toolset=="target"', { 61 'direct_dependent_settings': { 62 'cflags': [ 63 '<!@(<(pkg-config) --cflags gtk+-unix-print-2.0)', 64 ], 65 }, 66 'link_settings': { 67 'ldflags': [ 68 '<!@(<(pkg-config) --libs-only-L --libs-only-other gtk+-unix-print-2.0)', 69 ], 70 'libraries': [ 71 '<!@(<(pkg-config) --libs-only-l gtk+-unix-print-2.0)', 72 ], 73 }, 74 }]] 75 }, 76 { 77 'target_name': 'nss', 78 'type': 'settings', 79 'conditions': [ 80 ['_toolset=="target"', { 81 'conditions': [ 82 ['use_system_ssl==0', { 83 'dependencies': [ 84 '../../net/third_party/nss/ssl.gyp:ssl', 85 '../../third_party/zlib/zlib.gyp:zlib', 86 ], 87 'direct_dependent_settings': { 88 'cflags': [ 89 # We need for our local copies of the libssl3 headers to come 90 # first, otherwise the code will build, but will fallback to 91 # the set of features advertised in the system headers. 92 # Unfortunately, there's no include path that we can filter 93 # out of $(pkg-config --cflags nss) and GYP include paths 94 # come after cflags on the command line. So we have these 95 # bodges: 96 '-Inet/third_party/nss/ssl', # for make 97 '-ISource/WebKit/chromium/net/third_party/nss/ssl', # for make in webkit 98 '<!@(<(pkg-config) --cflags nss)', 99 ], 100 }, 101 'link_settings': { 102 'ldflags': [ 103 '<!@(<(pkg-config) --libs-only-L --libs-only-other nss)', 104 ], 105 'libraries': [ 106 '<!@(<(pkg-config) --libs-only-l nss | sed -e "s/-lssl3//")', 107 ], 108 }, 109 }, { 110 'direct_dependent_settings': { 111 'cflags': [ 112 '<!@(<(pkg-config) --cflags nss)', 113 ], 114 'defines': [ 115 'USE_SYSTEM_SSL', 116 ], 117 }, 118 'link_settings': { 119 'ldflags': [ 120 '<!@(<(pkg-config) --libs-only-L --libs-only-other nss)', 121 ], 122 'libraries': [ 123 '<!@(<(pkg-config) --libs-only-l nss)', 124 ], 125 }, 126 } 127 ]] 128 }], 129 ], 130 }, 131 { 132 'target_name': 'freetype2', 133 'type': 'settings', 134 'conditions': [ 135 ['_toolset=="target"', { 136 'direct_dependent_settings': { 137 'cflags': [ 138 '<!@(<(pkg-config) --cflags freetype2)', 139 ], 140 }, 141 'link_settings': { 142 'ldflags': [ 143 '<!@(<(pkg-config) --libs-only-L --libs-only-other freetype2)', 144 ], 145 'libraries': [ 146 '<!@(<(pkg-config) --libs-only-l freetype2)', 147 ], 148 }, 149 }]] 150 }, 151 { 152 'target_name': 'fontconfig', 153 'type': 'settings', 154 'conditions': [ 155 ['_toolset=="target"', { 156 'direct_dependent_settings': { 157 'cflags': [ 158 '<!@(<(pkg-config) --cflags fontconfig)', 159 ], 160 }, 161 'link_settings': { 162 'ldflags': [ 163 '<!@(<(pkg-config) --libs-only-L --libs-only-other fontconfig)', 164 ], 165 'libraries': [ 166 '<!@(<(pkg-config) --libs-only-l fontconfig)', 167 ], 168 }, 169 }]] 170 }, 171 { 172 'target_name': 'gdk', 173 'type': 'settings', 174 'conditions': [ 175 ['_toolset=="target"', { 176 'direct_dependent_settings': { 177 'cflags': [ 178 '<!@(<(pkg-config) --cflags gdk-2.0)', 179 ], 180 }, 181 'link_settings': { 182 'ldflags': [ 183 '<!@(<(pkg-config) --libs-only-L --libs-only-other gdk-2.0)', 184 ], 185 'libraries': [ 186 '<!@(<(pkg-config) --libs-only-l gdk-2.0)', 187 ], 188 }, 189 }]] 190 }, 191 { 192 'target_name': 'gconf', 193 'type': 'settings', 194 'conditions': [ 195 ['use_gconf==1 and _toolset=="target"', { 196 'direct_dependent_settings': { 197 'cflags': [ 198 '<!@(<(pkg-config) --cflags gconf-2.0)', 199 ], 200 'defines': [ 201 'USE_GCONF', 202 ], 203 }, 204 'link_settings': { 205 'ldflags': [ 206 '<!@(<(pkg-config) --libs-only-L --libs-only-other gconf-2.0)', 207 ], 208 'libraries': [ 209 '<!@(<(pkg-config) --libs-only-l gconf-2.0)', 210 ], 211 }, 212 }]] 213 }, 214 { 215 'target_name': 'x11', 216 'type': 'settings', 217 'conditions': [ 218 ['_toolset=="target"', { 219 'direct_dependent_settings': { 220 'cflags': [ 221 '<!@(<(pkg-config) --cflags x11)', 222 ], 223 }, 224 'link_settings': { 225 'ldflags': [ 226 '<!@(<(pkg-config) --libs-only-L --libs-only-other x11)', 227 ], 228 'libraries': [ 229 '<!@(<(pkg-config) --libs-only-l x11)', 230 ], 231 }, 232 }], 233 # When XInput2 is available (i.e. inputproto version is 2.0), the 234 # pkg-config command will succeed, so the output will be empty. 235 ['"<!@(<(pkg-config) --atleast-version=2.0 inputproto || echo $?)"==""', { 236 'direct_dependent_settings': { 237 'defines': [ 238 'HAVE_XINPUT2', 239 ], 240 }, 241 'link_settings': { 242 'ldflags': [ 243 '<!@(<(pkg-config) --libs-only-L --libs-only-other xi)', 244 ], 245 'libraries': [ 246 '<!@(<(pkg-config) --libs-only-l xi)', 247 ], 248 } 249 }], 250 ], 251 }, 252 { 253 'target_name': 'xext', 254 'type': 'settings', 255 'conditions': [ 256 ['_toolset=="target"', { 257 'direct_dependent_settings': { 258 'cflags': [ 259 '<!@(<(pkg-config) --cflags xext)', 260 ], 261 }, 262 'link_settings': { 263 'ldflags': [ 264 '<!@(<(pkg-config) --libs-only-L --libs-only-other xext)', 265 ], 266 'libraries': [ 267 '<!@(<(pkg-config) --libs-only-l xext)', 268 ], 269 }, 270 }]] 271 }, 272 { 273 'target_name': 'selinux', 274 'type': 'settings', 275 'conditions': [ 276 ['_toolset=="target"', { 277 'link_settings': { 278 'libraries': [ 279 '-lselinux', 280 ], 281 }, 282 }]] 283 }, 284 { 285 'target_name': 'gnome-keyring', 286 'type': 'settings', 287 'conditions': [ 288 ['use_gnome_keyring==1', { 289 'direct_dependent_settings': { 290 'cflags': [ 291 '<!@(<(pkg-config) --cflags gnome-keyring-1)', 292 ], 293 'defines': [ 294 'USE_GNOME_KEYRING', 295 ], 296 'conditions': [ 297 ['linux_link_gnome_keyring==0', { 298 'defines': ['DLOPEN_GNOME_KEYRING'], 299 }], 300 ], 301 }, 302 'conditions': [ 303 ['linux_link_gnome_keyring!=0', { 304 'link_settings': { 305 'ldflags': [ 306 '<!@(<(pkg-config) --libs-only-L --libs-only-other gnome-keyring-1)', 307 ], 308 'libraries': [ 309 '<!@(<(pkg-config) --libs-only-l gnome-keyring-1)', 310 ], 311 }, 312 }, { 313 'link_settings': { 314 'libraries': [ 315 '-ldl', 316 ], 317 }, 318 }], 319 ], 320 }], 321 ], 322 }, 323 { 324 'target_name': 'dbus-glib', 325 'type': 'settings', 326 'direct_dependent_settings': { 327 'cflags': [ 328 '<!@(<(pkg-config) --cflags dbus-glib-1)', 329 ], 330 }, 331 'link_settings': { 332 'ldflags': [ 333 '<!@(<(pkg-config) --libs-only-L --libs-only-other dbus-glib-1)', 334 ], 335 'libraries': [ 336 '<!@(<(pkg-config) --libs-only-l dbus-glib-1)', 337 ], 338 }, 339 }, 340 { 341 'target_name': 'libresolv', 342 'type': 'settings', 343 'link_settings': { 344 'libraries': [ 345 '-lresolv', 346 ], 347 }, 348 }, 349 { 350 'target_name': 'ibus', 351 'type': 'settings', 352 'conditions': [ 353 ['"<!@(<(pkg-config) --atleast-version=1.3.99 ibus-1.0 || echo $?)"==""', { 354 'variables': { 355 'ibus': 1 356 }, 357 'direct_dependent_settings': { 358 'cflags': [ 359 '<!@(<(pkg-config) --cflags ibus-1.0)', 360 ], 361 }, 362 'link_settings': { 363 'ldflags': [ 364 '<!@(<(pkg-config) --libs-only-L --libs-only-other ibus-1.0)', 365 ], 366 'libraries': [ 367 '<!@(<(pkg-config) --libs-only-l ibus-1.0)', 368 ], 369 }, 370 }], 371 ], 372 }, 373 ], 374} 375 376# Local Variables: 377# tab-width:2 378# indent-tabs-mode:nil 379# End: 380# vim: set expandtab tabstop=2 shiftwidth=2: 381