BUILD.gn 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. # Copyright 2022 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("//third_party/protobuf/proto_library.gni")
  5. # Local content analysis SDK.
  6. source_set("liblcasdk") {
  7. public = [ "src/browser/include/content_analysis/sdk/analysis_client.h" ]
  8. sources = [
  9. "src/browser/src/client_base.cc",
  10. "src/browser/src/client_base.h",
  11. ]
  12. if (is_win) {
  13. sources += [
  14. "src/browser/src/client_win.cc",
  15. "src/browser/src/client_win.h",
  16. "src/common/utils_win.cc",
  17. "src/common/utils_win.h",
  18. ]
  19. }
  20. if (is_linux) {
  21. sources += [
  22. "src/browser/src/client_posix.cc",
  23. "src/browser/src/client_posix.h",
  24. ]
  25. }
  26. if (is_mac) {
  27. sources += [
  28. "src/browser/src/client_mac.cc",
  29. "src/browser/src/client_mac.h",
  30. ]
  31. }
  32. include_dirs = [
  33. "src",
  34. "src/browser/include",
  35. "gen/third_party/content_analysis_sdk/src/proto",
  36. ]
  37. public_deps = [
  38. ":proto",
  39. "//third_party/protobuf:protobuf_lite",
  40. ]
  41. }
  42. source_set("libagentsdk") {
  43. sources = [
  44. "src/agent/include/content_analysis/sdk/analysis_agent.h",
  45. "src/agent/include/content_analysis/sdk/result_codes.h",
  46. "src/agent/src/agent_base.cc",
  47. "src/agent/src/agent_base.h",
  48. "src/agent/src/event_base.cc",
  49. "src/agent/src/event_base.h",
  50. ]
  51. if (is_win) {
  52. sources += [
  53. "src/agent/src/agent_utils_win.cc",
  54. "src/agent/src/agent_utils_win.h",
  55. "src/agent/src/agent_win.cc",
  56. "src/agent/src/agent_win.h",
  57. "src/agent/src/event_win.cc",
  58. "src/agent/src/event_win.h",
  59. "src/common/utils_win.cc",
  60. "src/common/utils_win.h",
  61. ]
  62. } else if (is_mac) {
  63. sources += [
  64. "src/agent/src/agent_mac.cc",
  65. "src/agent/src/agent_mac.h",
  66. "src/agent/src/event_mac.cc",
  67. "src/agent/src/event_mac.h",
  68. ]
  69. } else {
  70. sources += [
  71. "src/agent/src/agent_posix.cc",
  72. "src/agent/src/agent_posix.h",
  73. "src/agent/src/event_posix.cc",
  74. "src/agent/src/event_posix.h",
  75. ]
  76. }
  77. include_dirs = [
  78. "src",
  79. "src/agent/include",
  80. "gen/third_party/content_analysis_sdk/src/proto",
  81. ]
  82. public_deps = [
  83. ":proto",
  84. "//third_party/protobuf:protobuf_lite",
  85. ]
  86. }
  87. executable("lca_agent") {
  88. sources = [
  89. "src/demo/agent.cc",
  90. "src/demo/handler.h",
  91. ]
  92. include_dirs = [
  93. "src",
  94. "src/agent/include",
  95. "gen/third_party/content_analysis_sdk/src/proto",
  96. ]
  97. public_deps = [ ":libagentsdk" ]
  98. }
  99. proto_library("proto") {
  100. proto_in_dir = "src/proto"
  101. sources = [ "src/proto/content_analysis/sdk/analysis.proto" ]
  102. }