Updating trunk VERSION from 968.0 to 969.0
[chromium-blink-merge.git] / build / linux / system.gyp
bloba2b57cc587b2876d50fd5a429b5979983eeb8e39
1 # Copyright (c) 2011 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.
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_posix==1 and OS!="mac"', {
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     }, {
23       'variables': {
24         'use_system_ssl%': 1,
25       },
26     }],
27   ],
30   'targets': [
31     {
32       'target_name': 'gtk',
33       'type': 'none',
34       'toolsets': ['host', 'target'],
35       'conditions': [
36         ['_toolset=="target"', {
37           'direct_dependent_settings': {
38             'cflags': [
39               '<!@(<(pkg-config) --cflags gtk+-2.0 gthread-2.0)',
40             ],
41           },
42           'link_settings': {
43             'ldflags': [
44               '<!@(<(pkg-config) --libs-only-L --libs-only-other gtk+-2.0 gthread-2.0)',
45             ],
46             'libraries': [
47               '<!@(<(pkg-config) --libs-only-l gtk+-2.0 gthread-2.0)',
48             ],
49           },
50         }, {
51           'direct_dependent_settings': {
52             'cflags': [
53               '<!@(pkg-config --cflags gtk+-2.0 gthread-2.0)',
54             ],
55           },
56           'link_settings': {
57             'ldflags': [
58               '<!@(pkg-config --libs-only-L --libs-only-other gtk+-2.0 gthread-2.0)',
59             ],
60             'libraries': [
61               '<!@(pkg-config --libs-only-l gtk+-2.0 gthread-2.0)',
62             ],
63           },
64         }],
65         ['chromeos==1', {
66           'link_settings': {
67             'libraries': [ '-lXtst' ]
68           }
69         }],
70       ],
71     },
72     {
73       'target_name': 'gtkprint',
74       'type': 'none',
75       'conditions': [
76         ['_toolset=="target"', {
77           'direct_dependent_settings': {
78             'cflags': [
79               '<!@(<(pkg-config) --cflags gtk+-unix-print-2.0)',
80             ],
81           },
82           'link_settings': {
83             'ldflags': [
84               '<!@(<(pkg-config) --libs-only-L --libs-only-other gtk+-unix-print-2.0)',
85             ],
86             'libraries': [
87               '<!@(<(pkg-config) --libs-only-l gtk+-unix-print-2.0)',
88             ],
89           },
90         }],
91       ],
92     },
93     {
94       'target_name': 'ssl',
95       'type': 'none',
96       'conditions': [
97         ['_toolset=="target"', {
98           'conditions': [
99             ['use_openssl==1', {
100               'dependencies': [
101                 '../../third_party/openssl/openssl.gyp:openssl',
102               ],
103             }],
104             ['use_openssl==0 and use_system_ssl==0', {
105               'dependencies': [
106                 '../../net/third_party/nss/ssl.gyp:ssl',
107                 '../../third_party/zlib/zlib.gyp:zlib',
108               ],
109               'direct_dependent_settings': {
110                 'include_dirs+': [
111                   # We need for our local copies of the libssl3 headers to come
112                   # before other includes, as we are shadowing system headers.
113                   '<(DEPTH)/net/third_party/nss/ssl',
114                 ],
115                 'cflags': [
116                   '<!@(<(pkg-config) --cflags nss)',
117                 ],
118               },
119               'link_settings': {
120                 'ldflags': [
121                   '<!@(<(pkg-config) --libs-only-L --libs-only-other nss)',
122                 ],
123                 'libraries': [
124                   '<!@(<(pkg-config) --libs-only-l nss | sed -e "s/-lssl3//")',
125                 ],
126               },
127             }],
128             ['use_openssl==0 and use_system_ssl==1', {
129               'direct_dependent_settings': {
130                 'cflags': [
131                   '<!@(<(pkg-config) --cflags nss)',
132                 ],
133                 'defines': [
134                   'USE_SYSTEM_SSL',
135                 ],
136               },
137               'link_settings': {
138                 'ldflags': [
139                   '<!@(<(pkg-config) --libs-only-L --libs-only-other nss)',
140                 ],
141                 'libraries': [
142                   '<!@(<(pkg-config) --libs-only-l nss)',
143                 ],
144               },
145             }],
146           ]
147         }],
148       ],
149     },
150     {
151       'target_name': 'freetype2',
152       'type': 'none',
153       'conditions': [
154         ['_toolset=="target"', {
155           'direct_dependent_settings': {
156             'cflags': [
157               '<!@(<(pkg-config) --cflags freetype2)',
158             ],
159           },
160           'link_settings': {
161             'ldflags': [
162               '<!@(<(pkg-config) --libs-only-L --libs-only-other freetype2)',
163             ],
164             'libraries': [
165               '<!@(<(pkg-config) --libs-only-l freetype2)',
166             ],
167           },
168         }],
169       ],
170     },
171     {
172       'target_name': 'fontconfig',
173       'type': 'none',
174       'conditions': [
175         ['_toolset=="target"', {
176           'direct_dependent_settings': {
177             'cflags': [
178               '<!@(<(pkg-config) --cflags fontconfig)',
179             ],
180           },
181           'link_settings': {
182             'ldflags': [
183               '<!@(<(pkg-config) --libs-only-L --libs-only-other fontconfig)',
184             ],
185             'libraries': [
186               '<!@(<(pkg-config) --libs-only-l fontconfig)',
187             ],
188           },
189         }],
190       ],
191     },
192     {
193       'target_name': 'gdk',
194       'type': 'none',
195       'conditions': [
196         ['_toolset=="target"', {
197           'direct_dependent_settings': {
198             'cflags': [
199               '<!@(<(pkg-config) --cflags gdk-2.0)',
200             ],
201           },
202           'link_settings': {
203             'ldflags': [
204               '<!@(<(pkg-config) --libs-only-L --libs-only-other gdk-2.0)',
205             ],
206             'libraries': [
207               '<!@(<(pkg-config) --libs-only-l gdk-2.0)',
208             ],
209           },
210         }],
211       ],
212     },
213     {
214       'target_name': 'gconf',
215       'type': 'none',
216       'conditions': [
217         ['use_gconf==1 and _toolset=="target"', {
218           'direct_dependent_settings': {
219             'cflags': [
220               '<!@(<(pkg-config) --cflags gconf-2.0)',
221             ],
222             'defines': [
223               'USE_GCONF',
224             ],
225           },
226           'link_settings': {
227             'ldflags': [
228               '<!@(<(pkg-config) --libs-only-L --libs-only-other gconf-2.0)',
229             ],
230             'libraries': [
231               '<!@(<(pkg-config) --libs-only-l gconf-2.0)',
232             ],
233           },
234         }],
235       ],
236     },
237     {
238       'target_name': 'gio',
239       'type': 'none',
240       'conditions': [
241         ['use_gio==1 and _toolset=="target"', {
242           'direct_dependent_settings': {
243             'cflags': [
244               '<!@(<(pkg-config) --cflags gio-2.0)',
245             ],
246             'defines': [
247               'USE_GIO',
248             ],
249             'conditions': [
250               ['linux_link_gsettings==0', {
251                 'defines': ['DLOPEN_GSETTINGS'],
252               }],
253             ],
254           },
255           'link_settings': {
256             'ldflags': [
257               '<!@(<(pkg-config) --libs-only-L --libs-only-other gio-2.0)',
258             ],
259             'libraries': [
260               '<!@(<(pkg-config) --libs-only-l gio-2.0)',
261             ],
262             'conditions': [
263               ['linux_link_gsettings==0 and OS=="linux"', {
264                 'libraries': [
265                   '-ldl',
266                 ],
267               }],
268             ],
269           },
270         }],
271       ],
272     },
273     {
274       'target_name': 'x11',
275       'type': 'none',
276       'toolsets': ['host', 'target'],
277       'conditions': [
278         ['_toolset=="target"', {
279           'direct_dependent_settings': {
280             'cflags': [
281               '<!@(<(pkg-config) --cflags x11)',
282             ],
283           },
284           'link_settings': {
285             'ldflags': [
286               '<!@(<(pkg-config) --libs-only-L --libs-only-other x11 xi)',
287             ],
288             'libraries': [
289               '<!@(<(pkg-config) --libs-only-l x11 xi)',
290             ],
291           },
292         }, {
293           'direct_dependent_settings': {
294             'cflags': [
295               '<!@(pkg-config --cflags x11)',
296             ],
297           },
298           'link_settings': {
299             'ldflags': [
300               '<!@(pkg-config --libs-only-L --libs-only-other x11 xi)',
301             ],
302             'libraries': [
303               '<!@(pkg-config --libs-only-l x11 xi)',
304             ],
305           },
306         }],
307       ],
308     },
309     {
310       'target_name': 'xext',
311       'type': 'none',
312       'conditions': [
313         ['_toolset=="target"', {
314           'direct_dependent_settings': {
315             'cflags': [
316               '<!@(<(pkg-config) --cflags xext)',
317             ],
318           },
319           'link_settings': {
320             'ldflags': [
321               '<!@(<(pkg-config) --libs-only-L --libs-only-other xext)',
322             ],
323             'libraries': [
324               '<!@(<(pkg-config) --libs-only-l xext)',
325             ],
326           },
327         }],
328       ],
329     },
330     {
331       'target_name': 'xfixes',
332       'type': 'none',
333       'conditions': [
334         ['_toolset=="target"', {
335           'direct_dependent_settings': {
336             'cflags': [
337               '<!@(<(pkg-config) --cflags xfixes)',
338             ],
339           },
340           'link_settings': {
341             'ldflags': [
342               '<!@(<(pkg-config) --libs-only-L --libs-only-other xfixes)',
343             ],
344             'libraries': [
345               '<!@(<(pkg-config) --libs-only-l xfixes)',
346             ],
347           },
348         }],
349       ],
350     },
351     {
352       'target_name': 'libgcrypt',
353       'type': 'none',
354       'conditions': [
355         ['_toolset=="target" and use_cups==1', {
356           'direct_dependent_settings': {
357             'cflags': [
358               '<!@(libgcrypt-config --cflags)',
359             ],
360           },
361           'link_settings': {
362             'libraries': [
363               '<!@(libgcrypt-config --libs)',
364             ],
365           },
366         }],
367       ],
368     },
369     {
370       'target_name': 'selinux',
371       'type': 'none',
372       'conditions': [
373         ['_toolset=="target"', {
374           'link_settings': {
375             'libraries': [
376               '-lselinux',
377             ],
378           },
379         }],
380       ],
381     },
382     {
383       'target_name': 'gnome_keyring',
384       'type': 'none',
385       'conditions': [
386         ['use_gnome_keyring==1', {
387           'direct_dependent_settings': {
388             'cflags': [
389               '<!@(<(pkg-config) --cflags gnome-keyring-1)',
390             ],
391             'defines': [
392               'USE_GNOME_KEYRING',
393             ],
394             'conditions': [
395               ['linux_link_gnome_keyring==0', {
396                 'defines': ['DLOPEN_GNOME_KEYRING'],
397               }],
398             ],
399           },
400           'conditions': [
401             ['linux_link_gnome_keyring!=0', {
402               'link_settings': {
403                 'ldflags': [
404                   '<!@(<(pkg-config) --libs-only-L --libs-only-other gnome-keyring-1)',
405                 ],
406                 'libraries': [
407                   '<!@(<(pkg-config) --libs-only-l gnome-keyring-1)',
408                 ],
409               },
410             }, {
411               'conditions': [
412                 ['OS=="linux"', {
413                  'link_settings': {
414                    'libraries': [
415                      '-ldl',
416                    ],
417                  },
418                 }],
419               ],
420             }],
421           ],
422         }],
423       ],
424     },
425     {
426       # The unit tests use a few convenience functions from the GNOME
427       # Keyring library directly. We ignore linux_link_gnome_keyring and
428       # link directly in this version of the target to allow this.
429       # *** Do not use this target in the main binary! ***
430       'target_name': 'gnome_keyring_direct',
431       'type': 'none',
432       'conditions': [
433         ['use_gnome_keyring==1', {
434           'direct_dependent_settings': {
435             'cflags': [
436               '<!@(<(pkg-config) --cflags gnome-keyring-1)',
437             ],
438             'defines': [
439               'USE_GNOME_KEYRING',
440             ],
441             'conditions': [
442               ['linux_link_gnome_keyring==0', {
443                 'defines': ['DLOPEN_GNOME_KEYRING'],
444               }],
445             ],
446           },
447           'link_settings': {
448             'ldflags': [
449               '<!@(<(pkg-config) --libs-only-L --libs-only-other gnome-keyring-1)',
450             ],
451             'libraries': [
452               '<!@(<(pkg-config) --libs-only-l gnome-keyring-1)',
453             ],
454           },
455         }],
456       ],
457     },
458     {
459       'target_name': 'dbus',
460       'type': 'none',
461       'direct_dependent_settings': {
462         'cflags': [
463           '<!@(<(pkg-config) --cflags dbus-1)',
464         ],
465       },
466       'link_settings': {
467         'ldflags': [
468           '<!@(<(pkg-config) --libs-only-L --libs-only-other dbus-1)',
469         ],
470         'libraries': [
471           '<!@(<(pkg-config) --libs-only-l dbus-1)',
472         ],
473       },
474     },
475     {
476       # TODO(satorux): Remove this once dbus-glib clients are gone.
477       'target_name': 'dbus-glib',
478       'type': 'none',
479       'direct_dependent_settings': {
480         'cflags': [
481           '<!@(<(pkg-config) --cflags dbus-glib-1)',
482         ],
483       },
484       'link_settings': {
485         'ldflags': [
486           '<!@(<(pkg-config) --libs-only-L --libs-only-other dbus-glib-1)',
487         ],
488         'libraries': [
489           '<!@(<(pkg-config) --libs-only-l dbus-glib-1)',
490         ],
491       },
492     },
493     {
494       'target_name': 'glib',
495       'type': 'none',
496       'toolsets': ['host', 'target'],
497       'conditions': [
498         ['_toolset=="target"', {
499           'direct_dependent_settings': {
500             'cflags': [
501               '<!@(<(pkg-config) --cflags glib-2.0 gobject-2.0 gthread-2.0)',
502             ],
503           },
504           'link_settings': {
505             'ldflags': [
506               '<!@(<(pkg-config) --libs-only-L --libs-only-other glib-2.0 gobject-2.0 gthread-2.0)',
507             ],
508             'libraries': [
509               '<!@(<(pkg-config) --libs-only-l glib-2.0 gobject-2.0 gthread-2.0)',
510             ],
511           },
512         }, {
513           'direct_dependent_settings': {
514             'cflags': [
515               '<!@(pkg-config --cflags glib-2.0 gobject-2.0 gthread-2.0)',
516             ],
517           },
518           'link_settings': {
519             'ldflags': [
520               '<!@(pkg-config --libs-only-L --libs-only-other glib-2.0 gobject-2.0 gthread-2.0)',
521             ],
522             'libraries': [
523               '<!@(pkg-config --libs-only-l glib-2.0 gobject-2.0 gthread-2.0)',
524             ],
525           },
526         }],
527         ['chromeos==1', {
528           'link_settings': {
529             'libraries': [ '-lXtst' ]
530           }
531         }],
532       ],
533     },
534     {
535       'target_name': 'pangocairo',
536       'type': 'none',
537       'toolsets': ['host', 'target'],
538       'conditions': [
539         ['_toolset=="target"', {
540           'direct_dependent_settings': {
541             'cflags': [
542               '<!@(<(pkg-config) --cflags pangocairo)',
543             ],
544           },
545           'link_settings': {
546             'ldflags': [
547               '<!@(<(pkg-config) --libs-only-L --libs-only-other pangocairo)',
548             ],
549             'libraries': [
550               '<!@(<(pkg-config) --libs-only-l pangocairo)',
551             ],
552           },
553         }, {
554           'direct_dependent_settings': {
555             'cflags': [
556               '<!@(pkg-config --cflags pangocairo)',
557             ],
558           },
559           'link_settings': {
560             'ldflags': [
561               '<!@(pkg-config --libs-only-L --libs-only-other pangocairo)',
562             ],
563             'libraries': [
564               '<!@(pkg-config --libs-only-l pangocairo)',
565             ],
566           },
567         }],
568       ],
569     },
570     {
571       'target_name': 'libresolv',
572       'type': 'none',
573       'link_settings': {
574         'libraries': [
575           '-lresolv',
576         ],
577       },
578     },
579     {
580       'target_name': 'ibus',
581       'type': 'none',
582       'conditions': [
583         ['use_ibus==1', {
584           'variables': {
585             'ibus_min_version': '1.3.99.20110425',
586           },
587           'direct_dependent_settings': {
588             'defines': ['HAVE_IBUS=1'],
589             'cflags': [
590               '<!@(<(pkg-config) --cflags "ibus-1.0 >= <(ibus_min_version)")',
591             ],
592           },
593           'link_settings': {
594             'ldflags': [
595               '<!@(<(pkg-config) --libs-only-L --libs-only-other "ibus-1.0 >= <(ibus_min_version)")',
596             ],
597             'libraries': [
598               '<!@(<(pkg-config) --libs-only-l "ibus-1.0 >= <(ibus_min_version)")',
599             ],
600           },
601         }],
602       ],
603     },
604     {
605       'target_name': 'wayland',
606       'type': 'none',
607       'conditions': [
608         ['use_wayland == 1', {
609           'cflags': [
610             '<!@(<(pkg-config) --cflags cairo wayland-client wayland-egl xkbcommon)',
611           ],
612           'direct_dependent_settings': {
613             'cflags': [
614               '<!@(<(pkg-config) --cflags cairo wayland-client wayland-egl xkbcommon)',
615             ],
616           },
617           'link_settings': {
618             'ldflags': [
619               '<!@(<(pkg-config) --libs-only-L --libs-only-other wayland-client wayland-egl xkbcommon)',
620             ],
621             'libraries': [
622               '<!@(<(pkg-config) --libs-only-l wayland-client wayland-egl xkbcommon)',
623             ],
624           },
625         }],
626       ],
627     },
628   ],