BUILD.gn 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. # Copyright 2016 The Chromium Authors. All rights reserved.
  2. # Use of this source code is governed by a BSD-style license that can be
  3. # found in the LICENSE file.
  4. import("//build/config/c++/c++.gni")
  5. import("//build/config/chromeos/ui_mode.gni")
  6. import("//remoting/build/config/remoting_build.gni")
  7. group("all_tests") {
  8. testonly = true
  9. }
  10. if (enable_me2me_host) {
  11. executable("remoting_user_session") {
  12. sources = [ "remoting_user_session.cc" ]
  13. deps = [ "//base" ]
  14. libs = [ "pam" ]
  15. }
  16. copy("remoting_me2me_host_copy_script") {
  17. sources = [ "linux_me2me_host.py" ]
  18. outputs = [ "$root_build_dir/remoting/chrome-remote-desktop" ]
  19. }
  20. copy("remoting_me2me_host_copy_host_wrapper") {
  21. sources = [ "remoting_me2me_host_wrapper.sh" ]
  22. outputs = [ "$root_build_dir/remoting/chrome-remote-desktop-host" ]
  23. }
  24. copy("remoting_me2me_host_copy_user_session_wrapper") {
  25. sources = [ "remoting_user_session_wrapper.sh" ]
  26. outputs = [ "$root_build_dir/remoting/user-session" ]
  27. }
  28. copy("remoting_me2me_host_copy_user_session") {
  29. sources = [ "$root_build_dir/remoting_user_session" ]
  30. outputs = [ "$root_build_dir/remoting/{{source_file_part}}" ]
  31. deps = [ ":remoting_user_session" ]
  32. if (is_component_build) {
  33. sources += [
  34. "$root_build_dir/libbase.so",
  35. "$root_build_dir/libboringssl.so",
  36. ]
  37. deps += [ "//base:base" ]
  38. if (use_custom_libcxx) {
  39. sources += [ "$root_build_dir/libc++.so" ]
  40. deps += [ "//buildtools/third_party/libc++" ]
  41. }
  42. }
  43. }
  44. remoting_localize("url_forwarder_desktop_entry") {
  45. sources = [ "crd-url-forwarder.desktop.jinja2" ]
  46. locale_list = remoting_locales_without_pseudolocales
  47. locale_dir = resources_locale_dir
  48. output = "$root_build_dir/remoting/{{source_name_part}}"
  49. }
  50. copy("remoting_me2me_host_copy_setup_url_forwarder_script") {
  51. sources = [ "configure_url_forwarder.py" ]
  52. outputs = [ "$root_build_dir/remoting/setup-url-forwarder" ]
  53. }
  54. group("remoting_dev_me2me_host") {
  55. deps = [
  56. ":remoting_me2me_host_copy_host_wrapper",
  57. ":remoting_me2me_host_copy_script",
  58. ":remoting_me2me_host_copy_setup_url_forwarder_script",
  59. ":remoting_me2me_host_copy_user_session",
  60. ":remoting_me2me_host_copy_user_session_wrapper",
  61. ":remoting_native_messaging_host",
  62. ":url_forwarder_desktop_entry",
  63. "//remoting/host:remoting_me2me_host",
  64. "//remoting/host/remote_open_url",
  65. "//remoting/host/webauthn:remote_webauthn",
  66. ]
  67. }
  68. }
  69. if (remoting_use_x11) {
  70. source_set("x11") {
  71. sources = [
  72. "unicode_to_keysym.cc",
  73. "unicode_to_keysym.h",
  74. "x11_character_injector.cc",
  75. "x11_character_injector.h",
  76. "x11_keyboard_impl.cc",
  77. "x11_keyboard_impl.h",
  78. "x11_util.cc",
  79. "x11_util.h",
  80. "x_server_clipboard.cc",
  81. "x_server_clipboard.h",
  82. ]
  83. public_deps = [ "//ui/gfx/x" ]
  84. deps = [
  85. "//base",
  86. "//remoting/base",
  87. "//remoting/base:logging",
  88. "//third_party/webrtc_overrides:webrtc_component",
  89. ]
  90. }
  91. }
  92. if (!is_chromeos) {
  93. executable("remoting_native_messaging_host") {
  94. configs += [ "//build/config/compiler:wexit_time_destructors" ]
  95. sources =
  96. [ "//remoting/host/setup/me2me_native_messaging_host_entry_point.cc" ]
  97. deps = [
  98. "//remoting/host:remoting_core",
  99. "//remoting/host/setup:native_messaging_host_main_headers",
  100. ]
  101. }
  102. }
  103. source_set("unit_tests") {
  104. testonly = true
  105. sources = [
  106. "audio_pipe_reader_unittest.cc",
  107. "certificate_watcher_unittest.cc",
  108. "unicode_to_keysym_unittest.cc",
  109. "x11_character_injector_unittest.cc",
  110. "x_server_clipboard_unittest.cc",
  111. ]
  112. if (!remoting_use_x11) {
  113. sources -= [
  114. "unicode_to_keysym_unittest.cc",
  115. "x11_character_injector_unittest.cc",
  116. "x_server_clipboard_unittest.cc",
  117. ]
  118. }
  119. configs += [ "//remoting/build/config:version" ]
  120. deps = [
  121. "//remoting/host:common",
  122. "//remoting/host:test_support",
  123. "//remoting/host/it2me:common",
  124. "//remoting/host/native_messaging",
  125. "//remoting/host/security_key:unit_tests",
  126. "//remoting/host/setup:common",
  127. "//remoting/proto",
  128. "//remoting/resources",
  129. "//skia",
  130. "//testing/gmock",
  131. "//testing/gtest",
  132. ]
  133. if (remoting_use_x11) {
  134. deps += [ ":x11" ]
  135. }
  136. if (!is_ios) {
  137. deps += [ "//components/policy/core/browser:test_support" ]
  138. }
  139. }