Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1277)

Unified Diff: build/linux/system.gyp

Issue 11571036: Linux: use generated library loader for libgps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more fixlets Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/common.gypi ('k') | content/browser/geolocation/gps_location_provider_linux.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/linux/system.gyp
diff --git a/build/linux/system.gyp b/build/linux/system.gyp
index 1bb764f1305e9be71d0f3f8025c315225054182d..7a172ffa06186a6442b8f7c5f407bc0771495d92 100644
--- a/build/linux/system.gyp
+++ b/build/linux/system.gyp
@@ -9,9 +9,10 @@
'pkg-config': './pkg-config-wrapper "<(sysroot)" "<(target_arch)"',
}, {
'pkg-config': 'pkg-config'
- }]
+ }],
],
+ 'linux_link_libgps%': 0,
'linux_link_libpci%': 0,
'linux_link_libspeechd%': 0,
},
@@ -116,6 +117,75 @@
},
], # targets
}],
+ ['linux_use_libgps==1', {
+ 'targets': [
+ {
+ 'target_name': 'libgps',
+ 'type': 'static_library',
+ 'dependencies': [
+ '../../base/base.gyp:base',
+ ],
+ 'all_dependent_settings': {
+ 'defines': [
+ 'USE_LIBGPS',
+ ],
+ 'include_dirs': [
+ '<(SHARED_INTERMEDIATE_DIR)',
+ ],
+ 'conditions': [
+ ['linux_link_libgps==1', {
+ 'cflags': [
+ '<!@(<(pkg-config) --cflags libgps)',
+ ],
+ 'link_settings': {
+ 'ldflags': [
+ '<!@(<(pkg-config) --libs-only-L --libs-only-other libgps)',
+ ],
+ 'libraries': [
+ '<!@(<(pkg-config) --libs-only-l libgps)',
+ ],
+ }
+ }],
+ ],
+ },
+ 'hard_dependency': 1,
+ 'actions': [
+ {
+ 'variables': {
+ 'output_h': '<(SHARED_INTERMEDIATE_DIR)/library_loaders/libgps.h',
+ 'output_cc': '<(INTERMEDIATE_DIR)/libgps_loader.cc',
+ 'generator': '../../tools/generate_library_loader/generate_library_loader.py',
+ },
+ 'action_name': 'generate_libgps_loader',
+ 'inputs': [
+ '<(generator)',
+ ],
+ 'outputs': [
+ '<(output_h)',
+ '<(output_cc)',
+ ],
+ 'action': ['python',
+ '<(generator)',
+ '--name', 'LibGpsLoader',
+ '--output-h', '<(output_h)',
+ '--output-cc', '<(output_cc)',
+ '--header', '<gps.h>',
+ '--bundled-header', '"third_party/gpsd/release-3.1/gps.h"',
+ '--link-directly=<(linux_link_libgps)',
+ 'gps_open',
+ 'gps_close',
+ 'gps_read',
+ # We don't use gps_shm_read() directly, just to make
+ # sure that libgps has the shared memory support.
+ 'gps_shm_read',
+ ],
+ 'message': 'Generating libgps library loader.',
+ 'process_outputs_as_sources': 1,
+ },
+ ],
+ },
+ ],
+ }],
], # conditions
'targets': [
{
« no previous file with comments | « build/common.gypi ('k') | content/browser/geolocation/gps_location_provider_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698