linux: Fix linking with system libraries

This commit is contained in:
Cheng Zhao
2015-04-08 08:22:55 +00:00
parent c5f8e4360c
commit 891856f3af
2 changed files with 27 additions and 4 deletions

View File

@@ -92,10 +92,23 @@
'common/main_delegate.h',
'common/main_delegate_mac.mm',
],
'link_settings': {
'libraries': [ '<@(libchromiumcontent_libraries)' ]
},
'conditions': [
['OS=="linux" and libchromiumcontent_component==0', {
# On Linux we have to use "--whole-archive" to force executable
# to include all symbols, otherwise we will have plenty of
# unresolved symbols errors.
'direct_dependent_settings': {
'ldflags': [
'-Wl,--whole-archive',
'<@(libchromiumcontent_libraries)',
'-Wl,--no-whole-archive',
],
}
}, {
'link_settings': {
'libraries': [ '<@(libchromiumcontent_libraries)' ]
},
}],
['OS=="linux"', {
'cflags_cc': [
'-Wno-deprecated-register',
@@ -121,6 +134,16 @@
'link_settings': {
'libraries': [
'<(libchromiumcontent_dir)/libboringssl.so',
'-lasound',
'-lcap',
'-lcups',
'-lrt',
'-ldl',
'-lresolv',
'-lfontconfig',
'-lfreetype',
'-lX11 -lXi -lXcursor -lXext -lXfixes -lXrender -lXcomposite -lXdamage -lXtst -lXrandr',
'-lexpat',
],
},
}],

Submodule brightray/vendor/libchromiumcontent updated: c94e623f59...09c2eb301c