blob: c49dd32078027f5fa9b51b02c4610b0d5b3d603e [file] [log] [blame]
# Copyright 2014 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.
import("//tools/grit/grit_rule.gni")
if (is_android) {
import("//build/config/android/rules.gni")
}
# GYP version: WebKit/public/blink.gyp:blink
group("blink") {
deps = [
":blink_headers",
":blink_minimal",
"//third_party/WebKit/Source/web",
"//third_party/WebKit/Source/platform",
]
}
# This target provides a minimal set of Blink APIs such as WebString to use in
# places that cannot link against the full Blink library. FIXME: We really
# shouldn't have this at all and should instead remove all uses of Blink's API
# types from places that can't link against Blink. crbug.com/248653
#
# GYP version: WebKit/public/blink.gyp:blink_minimal
group("blink_minimal") {
deps = [
"//third_party/WebKit/Source/platform:blink_common",
]
}
# GYP version: WebKit/public/blink.gyp:blink_test_support
group("test_support") {
deps = [
"//third_party/WebKit/Source/web:test_support",
]
}
# GYP version: WebKit/public/all.gyp:all_blink
group("all_blink") {
# This includes some test targets. Don't link into production!
testonly = true
deps = [
"//third_party/WebKit/Source/core",
"//third_party/WebKit/Source/modules",
"//third_party/WebKit/Source/platform:heap_unittests",
"//third_party/WebKit/Source/platform:platform_unittests",
"//third_party/WebKit/Source/web",
"//third_party/WebKit/Source/wtf:wtf_unittests",
]
if (is_mac) {
# TODO(GYP): Re-enable this as soon as we can link Blink binaries on mac.
deps -= [
"//third_party/WebKit/Source/platform:heap_unittests",
"//third_party/WebKit/Source/platform:platform_unittests",
]
}
}
group("blink_tests") {
testonly = true
deps = [
"//third_party/WebKit/Source/platform:heap_unittests",
"//third_party/WebKit/Source/platform:platform_unittests",
"//third_party/WebKit/Source/wtf:wtf_unittests",
]
if (is_mac) {
# TODO(GYP): Re-enable this as soon as we can link Blink binaries on mac.
deps -= [
"//third_party/WebKit/Source/platform:heap_unittests",
"//third_party/WebKit/Source/platform:platform_unittests",
]
}
}
config("blink_headers_config") {
include_dirs = [ ".." ]
}
config("debug_devtools") {
if (debug_devtools) {
defines = [ "DEBUG_DEVTOOLS=1" ]
}
}
if (is_android) {
# GYP version: WebKit/public/blink_headers.gyp:web_input_event_java
# GYP version: WebKit/public/blink_headers.gyp:web_text_input_type
java_cpp_enum("blink_headers_java_enums_srcjar") {
sources = [
"./web/WebInputEvent.h",
"./web/WebTextInputType.h",
]
outputs = [
"org/chromium/blink_public/web/WebInputEventModifier.java",
"org/chromium/blink_public/web/WebInputEventType.java",
"org/chromium/blink_public/web/WebTextInputFlags.java",
]
}
# GYP version: WebKit/public/blink_headers.gyp:blink_headers_java
android_library("blink_headers_java") {
srcjar_deps = [
":blink_headers_java_enums_srcjar",
]
}
}
# Depend on this target to use public blink API headers for things like enums
# and public structures without actually linking against any Blink libraries.
source_set("blink_headers") {
public_configs = [
":blink_headers_config",
# Blink exposes icu headers in the public API.
"//third_party/icu:icu_config",
# Blink exposes NPAPI headers in the public API.
"//third_party/npapi:npapi_config",
]
}
# GYP version: WebKit/public/blink_devtools.gyp:blink_devtools_frontend_resources
group("blink_devtools_frontend_resources") {
deps = [
"//third_party/WebKit/Source/devtools:devtools_frontend_resources",
]
}
# GYP version: WebKit/public/blink_devtools.gyp:blink_generate_devtools_grd
group("blink_generate_devtools_grd") {
deps = [
"//third_party/WebKit/Source/devtools:generate_devtools_grd",
]
}
# GYP version: WebKit/public/blink_resources.gyp:blink_resources
grit("resources") {
output_dir = "$root_gen_dir/blink/public/resources"
use_qualified_include = true
source = "blink_resources.grd"
outputs = [
"grit/blink_resources.h",
"blink_resources.rc",
"blink_resources.pak",
]
}