diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-19 19:22:39 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-19 19:22:39 +0000 |
commit | 9394a3a5843cd1f1d1d9e89b3ab4dcff0878fc24 (patch) | |
tree | f222c69d95dcf346d4acd9d6711e15e6450b269b /build | |
parent | 715b111abe938b852701cc2bde53ffd24082b2d0 (diff) | |
download | chromium_src-9394a3a5843cd1f1d1d9e89b3ab4dcff0878fc24.zip chromium_src-9394a3a5843cd1f1d1d9e89b3ab4dcff0878fc24.tar.gz chromium_src-9394a3a5843cd1f1d1d9e89b3ab4dcff0878fc24.tar.bz2 |
Linux: use generated library loader for libgps.
BUG=162733
Review URL: https://codereview.chromium.org/11571036
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173972 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build')
-rw-r--r-- | build/common.gypi | 9 | ||||
-rw-r--r-- | build/linux/system.gyp | 72 |
2 files changed, 80 insertions, 1 deletions
diff --git a/build/common.gypi b/build/common.gypi index 5af90ee..1c98625 100644 --- a/build/common.gypi +++ b/build/common.gypi @@ -553,6 +553,14 @@ 'linux_use_gold_flags%': 0, }], + ['chromeos==1', { + 'linux_use_libgps%': 1, + }, { # chromeos==0 + # Do not use libgps on desktop Linux by default, + # see http://crbug.com/103751. + 'linux_use_libgps%': 0, + }], + ['OS=="android" or OS=="ios"', { 'enable_captive_portal_detection%': 0, }, { @@ -699,6 +707,7 @@ 'enable_background%': '<(enable_background)', 'linux_use_gold_binary%': '<(linux_use_gold_binary)', 'linux_use_gold_flags%': '<(linux_use_gold_flags)', + 'linux_use_libgps%': '<(linux_use_libgps)', 'use_canvas_skia%': '<(use_canvas_skia)', 'test_isolation_mode%': '<(test_isolation_mode)', 'test_isolation_outdir%': '<(test_isolation_outdir)', diff --git a/build/linux/system.gyp b/build/linux/system.gyp index 1bb764f..7a172ff 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': [ { |