Skip to content

Commit

Permalink
Add gypi_to_gn for content/utility sources list
Browse files Browse the repository at this point in the history
BUG=None

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

Cr-Commit-Position: refs/heads/master@{#330393}
  • Loading branch information
krockot authored and Commit bot committed May 18, 2015
1 parent 76ebffc commit 7b6128a
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 26 deletions.
1 change: 1 addition & 0 deletions .gn
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ exec_script_whitelist = [
"//content/public/android/BUILD.gn",
"//content/renderer/renderer.gni",
"//content/test/BUILD.gn",
"//content/utility/utility.gni",
"//extensions/common/api/schemas.gni",
"//extensions/extensions.gni",
"//extensions/shell/app_shell.gni",
Expand Down
38 changes: 23 additions & 15 deletions content/content_utility.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,30 @@
'../base/base.gyp:base',
'../courgette/courgette.gyp:courgette_lib',
],
'sources': [
'public/utility/content_utility_client.cc',
'public/utility/content_utility_client.h',
'public/utility/utility_thread.cc',
'public/utility/utility_thread.h',
'utility/in_process_utility_thread.cc',
'utility/in_process_utility_thread.h',
'utility/utility_blink_platform_impl.cc',
'utility/utility_blink_platform_impl.h',
'utility/utility_main.cc',
'utility/utility_thread_impl.cc',
'utility/utility_thread_impl.h',
'utility/webthread_impl_for_utility_thread.cc',
'utility/webthread_impl_for_utility_thread.h',
],
'variables': {
'utility_sources': [
'utility/in_process_utility_thread.cc',
'utility/in_process_utility_thread.h',
'utility/utility_blink_platform_impl.cc',
'utility/utility_blink_platform_impl.h',
'utility/utility_main.cc',
'utility/utility_thread_impl.cc',
'utility/utility_thread_impl.h',
'utility/webthread_impl_for_utility_thread.cc',
'utility/webthread_impl_for_utility_thread.h',
],
'public_utility_sources': [
'public/utility/content_utility_client.cc',
'public/utility/content_utility_client.h',
'public/utility/utility_thread.cc',
'public/utility/utility_thread.h',
],
},
'include_dirs': [
'..',
],
'sources': [
'<@(public_utility_sources)',
'<@(utility_sources)',
],
}
15 changes: 4 additions & 11 deletions content/utility/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,15 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//content/utility/utility.gni")

source_set("utility") {
# Only the public target should depend on this. All other targets (even
# internal content ones) should depend on the public one.
visibility = [ "//content/public/utility:utility_sources" ]

sources = [
"in_process_utility_thread.cc",
"in_process_utility_thread.h",
"utility_blink_platform_impl.cc",
"utility_blink_platform_impl.h",
"utility_main.cc",
"utility_thread_impl.cc",
"utility_thread_impl.h",
"webthread_impl_for_utility_thread.cc",
"webthread_impl_for_utility_thread.h",
]
sources =
rebase_path(content_utility_gypi_values.utility_sources, ".", "//content")

configs += [ "//content:content_implementation" ]

Expand Down
16 changes: 16 additions & 0 deletions content/utility/utility.gni
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

# This file defines the content utility gypi values. This file is read once and
# cached, which is a performance optimization that allows us to share the
# results of parsing the .gypi file between the public and private BUILD.gn
# files. It also saves us from duplicating this exec_script call.
content_utility_gypi_values =
exec_script("//build/gypi_to_gn.py",
[
rebase_path("../content_utility.gypi"),
"--replace=<(SHARED_INTERMEDIATE_DIR)=$root_gen_dir",
],
"scope",
[ "../content_utility.gypi" ])

0 comments on commit 7b6128a

Please sign in to comment.