BUILD.gn 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. # Copyright (c) 2020 Project CHIP Authors
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. import("//build_overrides/chip.gni")
  15. import("${chip_root}/examples/common/pigweed/pigweed_rpcs.gni")
  16. import("${chip_root}/src/app/common_flags.gni")
  17. import("${chip_root}/src/lib/core/core.gni")
  18. import("${chip_root}/src/lib/lib.gni")
  19. import("${chip_root}/src/tracing/tracing_args.gni")
  20. declare_args() {
  21. chip_enable_smoke_co_trigger = false
  22. }
  23. config("app-main-config") {
  24. include_dirs = [ "." ]
  25. }
  26. source_set("ota-test-event-trigger") {
  27. sources = [
  28. "${chip_root}/src/app/clusters/ota-requestor/OTATestEventTriggerDelegate.h",
  29. ]
  30. }
  31. source_set("smco-test-event-trigger") {
  32. sources = [ "${chip_root}/src/app/clusters/smoke-co-alarm-server/SmokeCOTestEventTriggerDelegate.h" ]
  33. }
  34. source_set("app-main") {
  35. defines = [ "ENABLE_TRACING=${matter_enable_tracing_support}" ]
  36. sources = [
  37. "AppMain.cpp",
  38. "AppMain.h",
  39. "CommissionableInit.cpp",
  40. "CommissionableInit.h",
  41. "CommissionerMain.cpp",
  42. "CommissionerMain.h",
  43. "LinuxCommissionableDataProvider.cpp",
  44. "LinuxCommissionableDataProvider.h",
  45. "NamedPipeCommands.cpp",
  46. "NamedPipeCommands.h",
  47. "Options.cpp",
  48. "Options.h",
  49. "testing/CustomCSRResponse.cpp",
  50. "testing/CustomCSRResponse.h",
  51. "testing/CustomCSRResponseOperationalKeyStore.cpp",
  52. "testing/CustomCSRResponseOperationalKeyStore.h",
  53. ]
  54. public_deps = [
  55. ":smco-test-event-trigger",
  56. "${chip_root}/src/lib",
  57. "${chip_root}/src/platform/logging:force_stdio",
  58. ]
  59. deps = [
  60. ":ota-test-event-trigger",
  61. "${chip_root}/examples/providers:device_info_provider",
  62. "${chip_root}/src/app/server",
  63. ]
  64. if (chip_enable_pw_rpc) {
  65. defines += [ "PW_RPC_ENABLED" ]
  66. }
  67. if (chip_build_libshell) {
  68. defines += [ "ENABLE_CHIP_SHELL" ]
  69. sources += [
  70. "CommissioneeShellCommands.cpp",
  71. "CommissioneeShellCommands.h",
  72. "ControllerShellCommands.cpp",
  73. "ControllerShellCommands.h",
  74. ]
  75. }
  76. if (chip_enable_transport_trace) {
  77. deps += [ "${chip_root}/examples/common/tracing:trace_handlers_decoder" ]
  78. }
  79. if (matter_enable_tracing_support) {
  80. deps += [
  81. "${chip_root}/examples/common/tracing:commandline",
  82. "${chip_root}/src/tracing",
  83. ]
  84. }
  85. if (chip_enable_smoke_co_trigger) {
  86. defines += [ "CHIP_DEVICE_CONFIG_ENABLE_SMOKE_CO_TRIGGER=1" ]
  87. }
  88. public_configs = [ ":app-main-config" ]
  89. }
  90. source_set("commissioner-main") {
  91. defines = []
  92. sources = [
  93. "CommissionerMain.cpp",
  94. "CommissionerMain.h",
  95. ]
  96. if (chip_build_libshell) {
  97. defines += [ "ENABLE_CHIP_SHELL" ]
  98. }
  99. public_deps = [ "${chip_root}/src/lib" ]
  100. deps = [ "${chip_root}/src/app/server" ]
  101. if (chip_enable_transport_trace) {
  102. deps += [ "${chip_root}/examples/common/tracing:trace_handlers" ]
  103. }
  104. public_configs = [ ":app-main-config" ]
  105. }