diff options
author | pkotwicz <pkotwicz@chromium.org> | 2015-12-15 14:29:46 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-12-15 22:30:25 +0000 |
commit | 92e2e231a1e99fa168220fe543653512383ed34a (patch) | |
tree | ae2b24e913abda5908a6b63e23ffef550aa2a594 /google_apis | |
parent | 20f3589be438cb5c50d4b2d6a688bc89b68257c1 (diff) | |
download | chromium_src-92e2e231a1e99fa168220fe543653512383ed34a.zip chromium_src-92e2e231a1e99fa168220fe543653512383ed34a.tar.gz chromium_src-92e2e231a1e99fa168220fe543653512383ed34a.tar.bz2 |
Port cronet build rules to GN part 1
BUG=462737
Review URL: https://codereview.chromium.org/1483843002
Cr-Commit-Position: refs/heads/master@{#365357}
Diffstat (limited to 'google_apis')
-rw-r--r-- | google_apis/BUILD.gn | 183 |
1 files changed, 102 insertions, 81 deletions
diff --git a/google_apis/BUILD.gn b/google_apis/BUILD.gn index 0f5448e..46048ff 100644 --- a/google_apis/BUILD.gn +++ b/google_apis/BUILD.gn @@ -78,93 +78,114 @@ config("key_defines") { } } -source_set("google_apis") { - sources = [ - "gaia/account_tracker.cc", - "gaia/account_tracker.h", - "gaia/gaia_auth_consumer.cc", - "gaia/gaia_auth_consumer.h", - "gaia/gaia_auth_fetcher.cc", - "gaia/gaia_auth_fetcher.h", - "gaia/gaia_auth_util.cc", - "gaia/gaia_auth_util.h", - "gaia/gaia_constants.cc", - "gaia/gaia_constants.h", - "gaia/gaia_oauth_client.cc", - "gaia/gaia_oauth_client.h", - "gaia/gaia_switches.cc", - "gaia/gaia_switches.h", - "gaia/gaia_urls.cc", - "gaia/gaia_urls.h", - "gaia/google_service_auth_error.cc", - "gaia/google_service_auth_error.h", - "gaia/identity_provider.cc", - "gaia/identity_provider.h", - "gaia/oauth2_access_token_consumer.h", - "gaia/oauth2_access_token_fetcher.cc", - "gaia/oauth2_access_token_fetcher.h", - "gaia/oauth2_access_token_fetcher_immediate_error.cc", - "gaia/oauth2_access_token_fetcher_immediate_error.h", - "gaia/oauth2_access_token_fetcher_impl.cc", - "gaia/oauth2_access_token_fetcher_impl.h", - "gaia/oauth2_api_call_flow.cc", - "gaia/oauth2_api_call_flow.h", - "gaia/oauth2_mint_token_flow.cc", - "gaia/oauth2_mint_token_flow.h", - "gaia/oauth2_token_service.cc", - "gaia/oauth2_token_service.h", - "gaia/oauth2_token_service_delegate.cc", - "gaia/oauth2_token_service_delegate.h", - "gaia/oauth2_token_service_request.cc", - "gaia/oauth2_token_service_request.h", - "gaia/oauth_request_signer.cc", - "gaia/oauth_request_signer.h", - "gaia/ubertoken_fetcher.cc", - "gaia/ubertoken_fetcher.h", - "google_api_keys.cc", - "google_api_keys.h", - ] +# Variables: +# deps: Extra dependencies +template("google_apis_tmpl") { + source_set(target_name) { + sources = [ + "gaia/account_tracker.cc", + "gaia/account_tracker.h", + "gaia/gaia_auth_consumer.cc", + "gaia/gaia_auth_consumer.h", + "gaia/gaia_auth_fetcher.cc", + "gaia/gaia_auth_fetcher.h", + "gaia/gaia_auth_util.cc", + "gaia/gaia_auth_util.h", + "gaia/gaia_constants.cc", + "gaia/gaia_constants.h", + "gaia/gaia_oauth_client.cc", + "gaia/gaia_oauth_client.h", + "gaia/gaia_switches.cc", + "gaia/gaia_switches.h", + "gaia/gaia_urls.cc", + "gaia/gaia_urls.h", + "gaia/google_service_auth_error.cc", + "gaia/google_service_auth_error.h", + "gaia/identity_provider.cc", + "gaia/identity_provider.h", + "gaia/oauth2_access_token_consumer.h", + "gaia/oauth2_access_token_fetcher.cc", + "gaia/oauth2_access_token_fetcher.h", + "gaia/oauth2_access_token_fetcher_immediate_error.cc", + "gaia/oauth2_access_token_fetcher_immediate_error.h", + "gaia/oauth2_access_token_fetcher_impl.cc", + "gaia/oauth2_access_token_fetcher_impl.h", + "gaia/oauth2_api_call_flow.cc", + "gaia/oauth2_api_call_flow.h", + "gaia/oauth2_mint_token_flow.cc", + "gaia/oauth2_mint_token_flow.h", + "gaia/oauth2_token_service.cc", + "gaia/oauth2_token_service.h", + "gaia/oauth2_token_service_delegate.cc", + "gaia/oauth2_token_service_delegate.h", + "gaia/oauth2_token_service_request.cc", + "gaia/oauth2_token_service_request.h", + "gaia/oauth_request_signer.cc", + "gaia/oauth_request_signer.h", + "gaia/ubertoken_fetcher.cc", + "gaia/ubertoken_fetcher.h", + "google_api_keys.cc", + "google_api_keys.h", + ] - configs += [ - ":key_defines", - "//build/config/compiler:no_size_t_to_int_warning", - ] + configs += [ + ":key_defines", + "//build/config/compiler:no_size_t_to_int_warning", + ] + + deps = [ + "//base", + "//base/third_party/dynamic_annotations", + "//crypto", + "//third_party/libxml", + ] + + if (defined(invoker.deps)) { + deps += invoker.deps + } + if (enable_extensions) { + sources += [ + "drive/auth_service.cc", + "drive/auth_service.h", + "drive/auth_service_interface.h", + "drive/auth_service_observer.h", + "drive/base_requests.cc", + "drive/base_requests.h", + "drive/drive_api_error_codes.cc", + "drive/drive_api_error_codes.h", + "drive/drive_api_parser.cc", + "drive/drive_api_parser.h", + "drive/drive_api_requests.cc", + "drive/drive_api_requests.h", + "drive/drive_api_url_generator.cc", + "drive/drive_api_url_generator.h", + "drive/drive_common_callbacks.h", + "drive/files_list_request_runner.cc", + "drive/files_list_request_runner.h", + "drive/request_sender.cc", + "drive/request_sender.h", + "drive/request_util.cc", + "drive/request_util.h", + "drive/task_util.cc", + "drive/task_util.h", + "drive/time_util.cc", + "drive/time_util.h", + ] + } + } +} + +google_apis_tmpl("google_apis") { deps = [ - "//base", - "//base/third_party/dynamic_annotations", - "//crypto", "//net", - "//third_party/libxml", ] +} - if (enable_extensions) { - sources += [ - "drive/auth_service.cc", - "drive/auth_service.h", - "drive/auth_service_interface.h", - "drive/auth_service_observer.h", - "drive/base_requests.cc", - "drive/base_requests.h", - "drive/drive_api_error_codes.cc", - "drive/drive_api_error_codes.h", - "drive/drive_api_parser.cc", - "drive/drive_api_parser.h", - "drive/drive_api_requests.cc", - "drive/drive_api_requests.h", - "drive/drive_api_url_generator.cc", - "drive/drive_api_url_generator.h", - "drive/drive_common_callbacks.h", - "drive/files_list_request_runner.cc", - "drive/files_list_request_runner.h", - "drive/request_sender.cc", - "drive/request_sender.h", - "drive/request_util.cc", - "drive/request_util.h", - "drive/task_util.cc", - "drive/task_util.h", - "drive/time_util.cc", - "drive/time_util.h", +if (is_android) { + google_apis_tmpl("google_apis_small") { + deps = [ + "//net:net_small", ] } } |