BUILD.gn 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. # Copyright 2021 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("//remoting/build/config/remoting_build.gni")
  5. source_set("webauthn") {
  6. sources = [
  7. "remote_webauthn_caller_security_utils.cc",
  8. "remote_webauthn_caller_security_utils.h",
  9. "remote_webauthn_constants.cc",
  10. "remote_webauthn_constants.h",
  11. "remote_webauthn_delegated_state_change_notifier.cc",
  12. "remote_webauthn_delegated_state_change_notifier.h",
  13. "remote_webauthn_extension_notifier.cc",
  14. "remote_webauthn_extension_notifier.h",
  15. "remote_webauthn_message_handler.cc",
  16. "remote_webauthn_message_handler.h",
  17. "remote_webauthn_native_messaging_host.cc",
  18. "remote_webauthn_native_messaging_host.h",
  19. "remote_webauthn_state_change_notifier.h",
  20. ]
  21. deps = [
  22. "//base",
  23. "//extensions/browser/api/messaging:native_messaging",
  24. "//remoting/host:chromoting_host_services_client",
  25. "//remoting/host/base",
  26. "//remoting/host/mojom",
  27. "//remoting/host/native_messaging",
  28. "//remoting/proto",
  29. "//remoting/protocol",
  30. ]
  31. if (is_win) {
  32. deps += [ "//remoting/host/win:trust_util" ]
  33. }
  34. }
  35. source_set("remote_webauthn_main_headers") {
  36. sources = [ "remote_webauthn_main.h" ]
  37. deps = [ "//remoting/host:host_main_headers" ]
  38. }
  39. source_set("main") {
  40. configs += [ "//remoting/build/config:host_implementation" ]
  41. sources = [ "remote_webauthn_main.cc" ]
  42. deps = [
  43. ":remote_webauthn_main_headers",
  44. ":webauthn",
  45. "//base",
  46. "//mojo/core/embedder:embedder",
  47. "//remoting/base",
  48. "//remoting/host:chromoting_host_services_client",
  49. "//remoting/host/base",
  50. "//remoting/host/native_messaging",
  51. ]
  52. }
  53. source_set("unit_tests") {
  54. testonly = true
  55. sources = [
  56. "remote_webauthn_extension_notifier_unittest.cc",
  57. "remote_webauthn_message_handler_unittest.cc",
  58. "remote_webauthn_native_messaging_host_unittest.cc",
  59. ]
  60. deps = [
  61. ":webauthn",
  62. "//base",
  63. "//base/test:test_support",
  64. "//extensions/browser/api/messaging:native_messaging",
  65. "//mojo/public/cpp/bindings",
  66. "//mojo/public/cpp/platform",
  67. "//remoting/base",
  68. "//remoting/host:test_support",
  69. "//remoting/host/mojom",
  70. "//remoting/host/native_messaging:native_messaging",
  71. "//remoting/protocol:test_support",
  72. "//testing/gmock",
  73. "//testing/gtest",
  74. ]
  75. }
  76. executable("remote_webauthn") {
  77. sources = [ "remote_webauthn_entry_point.cc" ]
  78. deps = [ ":remote_webauthn_main_headers" ]
  79. if (is_win || is_linux) {
  80. deps += [ "//remoting/host:remoting_core" ]
  81. } else {
  82. deps += [ ":main" ]
  83. }
  84. if (is_win) {
  85. sources += [ "$root_gen_dir/remoting/version.rc" ]
  86. defines =
  87. host_predefines + [ "REMOTING_HOST_BINARY=BINARY_REMOTE_WEBAUTHN" ]
  88. deps += [
  89. "//build/win:default_exe_manifest",
  90. "//remoting/host/win:remoting_windows_resources",
  91. ]
  92. }
  93. }