Skip to content

Commit

Permalink
Moving CRD Windows targets to subdirectories.
Browse files Browse the repository at this point in the history
This is the windows host focused GN rewrite for Remoting Host. This
work attempts to simplify the build for Remoting so it can be more
easily understood and maintained. This is done by pushing more of the target config checking deeper into the platform specific targets and
producing build files that are more in-line with best-practice GN style.

Review-Url: https://codereview.chromium.org/2308813002
Cr-Commit-Position: refs/heads/master@{#419265}
  • Loading branch information
nicholss authored and Commit bot committed Sep 16, 2016
1 parent fd30799 commit e3320ae
Show file tree
Hide file tree
Showing 18 changed files with 858 additions and 628 deletions.
1 change: 1 addition & 0 deletions .gn
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ exec_script_whitelist = [
"//net/BUILD.gn",
"//remoting/host/BUILD.gn",
"//remoting/remoting_version.gni",
"//remoting/host/installer/win/generate_clsids.gni",
"//third_party/angle/BUILD.gn",
"//third_party/angle/src/tests/BUILD.gn",
"//third_party/angle/src/vulkan_support/BUILD.gn",
Expand Down
31 changes: 23 additions & 8 deletions remoting/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ group("remoting_all") {
if (is_win) {
deps += [
"//remoting:remoting_breakpad_tester",
"//remoting/host:remoting_console",
"//remoting/host:remoting_desktop",
"//remoting/host/win:all",
]

if (is_chrome_branded) {
Expand Down Expand Up @@ -55,13 +54,8 @@ group("remoting_all") {
}
}

# The same target is called differently on Linux.
# TODO(sergeyu): Rename it to remoting_native_messaging_host on all
# platforms.
if (is_win) {
if (is_win || (!is_chromeos && !is_android && !is_ios)) {
deps += [ "//remoting/host:remoting_native_messaging_host" ]
} else if (!is_chromeos && !is_android) {
deps += [ "//remoting/host:native_messaging_host" ]
}

if (is_linux && !is_chromeos) {
Expand Down Expand Up @@ -90,11 +84,20 @@ if (is_win) {
"//remoting/host",
]

libs = []

configs += [ "//build/config/compiler:wexit_time_destructors" ]

sources = [
"tools/breakpad_tester_win.cc",
]

if (is_win) {
libs += [
"rpcrt4.lib",
"wtsapi32.lib",
]
}
}
}

Expand Down Expand Up @@ -183,6 +186,9 @@ test("remoting_unittests") {

if (enable_remoting_host) {
test("remoting_perftests") {
defines = []
libs = []

sources = [
"test/codec_perftest.cc",
"test/protocol_perftest.cc",
Expand All @@ -205,5 +211,14 @@ if (enable_remoting_host) {
if (enable_webrtc) {
deps += [ "//third_party/libjingle:libjingle_webrtc" ]
}

if (is_win) {
defines += [ "_ALT_NO_EXCEPTIONS" ]

libs += [
"rpcrt4.lib",
"wtsapi32.lib",
]
}
}
}
17 changes: 17 additions & 0 deletions remoting/build/config/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import("//build/config/features.gni")
import("//build/util/version.gni")
import("//remoting/remoting_options.gni")

# TODO(nicholss): Move this and other defines to version.h.in.
# Various remoting targets need this version definition.
Expand All @@ -16,3 +17,19 @@ config("enable_webrtc_remoting_client") {
defines = [ "ENABLE_WEBRTC_REMOTING_CLIENT=1" ]
}
}

config("remoting_me2me_host") {
defines = []

if (is_mac && is_official_build) {
defines += [ "USE_REMOTING_MACOSX_INTERNAL" ]
}

if (is_win && remoting_multi_process != 0 && remoting_rdp_session != 0) {
defines += [ "REMOTING_RDP_SESSION" ]
}

if (remoting_multi_process != 0) {
defines += [ "REMOTING_MULTI_PROCESS" ]
}
}
Loading

0 comments on commit e3320ae

Please sign in to comment.