Add "linux_system_libraries" variable

This commit is contained in:
Cheng Zhao 2015-04-09 10:14:25 +08:00
parent 845986750c
commit 9a691d1be8

View file

@ -1,4 +1,8 @@
{ {
'variables': {
# The libraries brightray will be compiled to.
'linux_system_libraries': 'gtk+-2.0 libnotify dbus-1 x11 xrandr xext gconf-2.0'
},
'includes': [ 'includes': [
'filenames.gypi', 'filenames.gypi',
], ],
@ -46,26 +50,23 @@
}, },
}], }],
['OS=="linux"', { ['OS=="linux"', {
'variables': {
'system_libraries': 'gtk+-2.0 libnotify dbus-1 x11 xrandr xext gconf-2.0',
},
'link_settings': { 'link_settings': {
'ldflags': [ 'ldflags': [
'<!@(pkg-config --libs-only-L --libs-only-other <(system_libraries))', '<!@(pkg-config --libs-only-L --libs-only-other <(linux_system_libraries))',
], ],
'libraries': [ 'libraries': [
'-lpthread', '-lpthread',
'<!@(pkg-config --libs-only-l <(system_libraries))', '<!@(pkg-config --libs-only-l <(linux_system_libraries))',
], ],
}, },
'cflags': [ 'cflags': [
'<!@(pkg-config --cflags <(system_libraries))', '<!@(pkg-config --cflags <(linux_system_libraries))',
# Needed by using libgtk2ui: # Needed by using libgtk2ui:
'-Wno-deprecated-register', '-Wno-deprecated-register',
], ],
'direct_dependent_settings': { 'direct_dependent_settings': {
'cflags': [ 'cflags': [
'<!@(pkg-config --cflags <(system_libraries))', '<!@(pkg-config --cflags <(linux_system_libraries))',
'-Wno-deprecated-register', '-Wno-deprecated-register',
], ],
}, },