Linux: add library loader for GNOME keyring.

BUG=162733

Review URL: https://codereview.chromium.org/11437025

git-svn-id: http://src.chromium.org/svn/trunk/src/build@171573 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This commit is contained in:
phajdan.jr@chromium.org 2012-12-06 20:14:05 +00:00
Родитель 0fe83554ff
Коммит 76b0d30c79
1 изменённых файлов: 49 добавлений и 18 удалений

Просмотреть файл

@ -493,9 +493,15 @@
}, },
{ {
'target_name': 'gnome_keyring', 'target_name': 'gnome_keyring',
'type': 'none', 'type': 'static_library',
'conditions': [ 'conditions': [
['use_gnome_keyring==1', { ['use_gnome_keyring==1', {
'dependencies': [
'../../base/base.gyp:base',
],
'cflags': [
'<!@(<(pkg-config) --cflags gnome-keyring-1)',
],
'direct_dependent_settings': { 'direct_dependent_settings': {
'cflags': [ 'cflags': [
'<!@(<(pkg-config) --cflags gnome-keyring-1)', '<!@(<(pkg-config) --cflags gnome-keyring-1)',
@ -503,33 +509,58 @@
'defines': [ 'defines': [
'USE_GNOME_KEYRING', 'USE_GNOME_KEYRING',
], ],
'conditions': [ 'include_dirs': [
['linux_link_gnome_keyring==0', { '<(SHARED_INTERMEDIATE_DIR)',
'defines': ['DLOPEN_GNOME_KEYRING'],
}],
], ],
}, },
'conditions': [ 'link_settings': {
['linux_link_gnome_keyring!=0', { 'conditions': [
'link_settings': { ['linux_link_gnome_keyring==1', {
'ldflags': [ 'ldflags': [
'<!@(<(pkg-config) --libs-only-L --libs-only-other gnome-keyring-1)', '<!@(<(pkg-config) --libs-only-L --libs-only-other gnome-keyring-1)',
], ],
'libraries': [ 'libraries': [
'<!@(<(pkg-config) --libs-only-l gnome-keyring-1)', '<!@(<(pkg-config) --libs-only-l gnome-keyring-1)',
], ],
}, { # linux_link_gnome_keyring==0
'libraries': [
'-ldl',
],
}],
],
},
'hard_dependency': 1,
'actions': [
{
'variables': {
'output_h': '<(SHARED_INTERMEDIATE_DIR)/library_loaders/libgnome-keyring.h',
'output_cc': '<(INTERMEDIATE_DIR)/libgnome_keyring_loader.cc',
'generator': '../../tools/generate_library_loader/generate_library_loader.py',
}, },
}, { 'action_name': 'generate_libgnome_keyring_loader',
'conditions': [ 'inputs': [
['OS=="linux"', { '<(generator)',
'link_settings': {
'libraries': [
'-ldl',
],
},
}],
], ],
}], 'outputs': [
'<(output_h)',
'<(output_cc)',
],
'action': ['python',
'<(generator)',
'--name', 'LibGnomeKeyringLoader',
'--output-h', '<(output_h)',
'--output-cc', '<(output_cc)',
'--header', '<gnome-keyring.h>',
'--link-directly=<(linux_link_gnome_keyring)',
'gnome_keyring_is_available',
'gnome_keyring_store_password',
'gnome_keyring_delete_password',
'gnome_keyring_find_itemsv',
'gnome_keyring_result_to_message',
],
'message': 'Generating libgnome-keyring library loader.',
'process_outputs_as_sources': 1,
},
], ],
}], }],
], ],