mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2024-11-24 14:26:09 +03:00
126 lines
2.8 KiB
Plaintext
126 lines
2.8 KiB
Plaintext
# 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("//build/symlink.gni")
|
|
import("//testing/test.gni")
|
|
|
|
group("forwarder2") {
|
|
testonly = true
|
|
data_deps = [
|
|
":host_forwarder",
|
|
":host_forwarder_unittests",
|
|
":device_forwarder_prepare_dist($default_toolchain)",
|
|
]
|
|
}
|
|
|
|
if (current_toolchain == default_toolchain) {
|
|
import("//build/config/android/rules.gni")
|
|
|
|
executable("device_forwarder") {
|
|
sources = [
|
|
"command.cc",
|
|
"command.h",
|
|
"common.cc",
|
|
"common.h",
|
|
"daemon.cc",
|
|
"daemon.h",
|
|
"device_controller.cc",
|
|
"device_controller.h",
|
|
"device_forwarder_main.cc",
|
|
"device_listener.cc",
|
|
"device_listener.h",
|
|
"forwarder.cc",
|
|
"forwarder.h",
|
|
"forwarders_manager.cc",
|
|
"forwarders_manager.h",
|
|
"pipe_notifier.cc",
|
|
"pipe_notifier.h",
|
|
"self_deleter_helper.h",
|
|
"socket.cc",
|
|
"socket.h",
|
|
"util.h",
|
|
]
|
|
deps = [
|
|
"//base",
|
|
"//build/config:exe_and_shlib_deps",
|
|
"//tools/android/common",
|
|
]
|
|
data_deps = [
|
|
"//build/android/pylib/device/commands",
|
|
]
|
|
}
|
|
|
|
create_native_executable_dist("device_forwarder_prepare_dist") {
|
|
dist_dir = "$root_build_dir/forwarder_dist"
|
|
binary = "$root_build_dir/device_forwarder"
|
|
deps = [
|
|
":device_forwarder",
|
|
]
|
|
}
|
|
}
|
|
|
|
if (current_toolchain != default_toolchain) {
|
|
source_set("host_forwarder_source_set") {
|
|
sources = [
|
|
"command.cc",
|
|
"command.h",
|
|
"common.cc",
|
|
"common.h",
|
|
"daemon.cc",
|
|
"daemon.h",
|
|
"forwarder.cc",
|
|
"forwarder.h",
|
|
"forwarders_manager.cc",
|
|
"forwarders_manager.h",
|
|
"host_controller.cc",
|
|
"host_controller.h",
|
|
"host_controllers_manager.cc",
|
|
"host_controllers_manager.h",
|
|
"pipe_notifier.cc",
|
|
"pipe_notifier.h",
|
|
"self_deleter_helper.h",
|
|
"socket.cc",
|
|
"socket.h",
|
|
"util.h",
|
|
]
|
|
deps = [
|
|
"//base",
|
|
"//build/config:exe_and_shlib_deps",
|
|
"//tools/android/common",
|
|
]
|
|
}
|
|
|
|
executable("host_forwarder") {
|
|
sources = [
|
|
"host_forwarder_main.cc",
|
|
]
|
|
deps = [
|
|
":host_forwarder_source_set",
|
|
"//base",
|
|
]
|
|
}
|
|
|
|
test("host_forwarder_unittests") {
|
|
testonly = true
|
|
sources = [
|
|
"host_controllers_manager_unittest.cc",
|
|
]
|
|
deps = [
|
|
":host_forwarder_source_set",
|
|
"//base",
|
|
"//testing/gtest",
|
|
"//testing/gtest:gtest_main",
|
|
]
|
|
}
|
|
} else {
|
|
# Create a symlink from root_build_dir -> clang_x64/host_forwarder.
|
|
binary_symlink("host_forwarder") {
|
|
binary_label = ":$target_name($host_toolchain)"
|
|
}
|
|
binary_symlink("host_forwarder_unittests") {
|
|
testonly = true
|
|
binary_label = ":$target_name($host_toolchain)"
|
|
}
|
|
}
|