Skip to content

Commit 4494844

Browse files
mspangpull[bot]
authored andcommitted
Add Linux lighting app to unified build (#3561)
1 parent 170e825 commit 4494844

File tree

2 files changed

+40
-10
lines changed

2 files changed

+40
-10
lines changed

BUILD.gn

+36-10
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,10 @@ if (current_toolchain != "${dir_pw_toolchain}/dummy:dummy") {
135135
# Build the shell example.
136136
enable_standalone_shell_build = enable_default_builds
137137

138+
# Build the Linux lighting app example.
139+
enable_linux_lighting_app_build =
140+
enable_default_builds && host_os == "linux"
141+
138142
# Build the nRF5 lock app example.
139143
enable_nrf5_lock_app_build = enable_nrf5_builds
140144

@@ -157,16 +161,22 @@ if (current_toolchain != "${dir_pw_toolchain}/dummy:dummy") {
157161
enable_k32w_lock_app_build = enable_k32w_builds
158162
}
159163

160-
chip_build("host_clang") {
161-
toolchain = "//build/toolchain/host:${host_os}_${host_cpu}_clang"
164+
if (enable_host_clang_build) {
165+
chip_build("host_clang") {
166+
toolchain = "//build/toolchain/host:${host_os}_${host_cpu}_clang"
167+
}
162168
}
163169

164-
chip_build("host_gcc") {
165-
toolchain = "//build/toolchain/host:${host_os}_${host_cpu}_gcc"
170+
if (enable_host_gcc_build) {
171+
chip_build("host_gcc") {
172+
toolchain = "//build/toolchain/host:${host_os}_${host_cpu}_gcc"
173+
}
166174
}
167175

168-
chip_build("host_gcc_mbedtls") {
169-
toolchain = "${chip_root}/config/mbedtls/toolchain:${host_os}_${host_cpu}_gcc_mbedtls"
176+
if (enable_host_gcc_mbedtls_build) {
177+
chip_build("host_gcc_mbedtls") {
178+
toolchain = "${chip_root}/config/mbedtls/toolchain:${host_os}_${host_cpu}_gcc_mbedtls"
179+
}
170180
}
171181

172182
if (enable_android_builds) {
@@ -189,12 +199,25 @@ if (current_toolchain != "${dir_pw_toolchain}/dummy:dummy") {
189199

190200
standalone_toolchain = "${chip_root}/config/standalone/toolchain:standalone"
191201

192-
group("standalone_chip_tool") {
193-
deps = [ "${chip_root}/examples/chip-tool(${standalone_toolchain})" ]
202+
if (enable_standalone_chip_tool_build) {
203+
group("standalone_chip_tool") {
204+
deps = [ "${chip_root}/examples/chip-tool(${standalone_toolchain})" ]
205+
}
194206
}
195207

196-
group("standalone_shell") {
197-
deps = [ "${chip_root}/examples/shell/standalone(${standalone_toolchain})" ]
208+
if (enable_standalone_shell_build) {
209+
group("standalone_shell") {
210+
deps =
211+
[ "${chip_root}/examples/shell/standalone(${standalone_toolchain})" ]
212+
}
213+
}
214+
215+
if (enable_linux_lighting_app_build) {
216+
group("linux_lighting_app") {
217+
deps = [
218+
"${chip_root}/examples/lighting-app/linux(${standalone_toolchain})",
219+
]
220+
}
198221
}
199222

200223
if (enable_nrf5_lock_app_build) {
@@ -264,6 +287,9 @@ if (current_toolchain != "${dir_pw_toolchain}/dummy:dummy") {
264287
if (enable_standalone_shell_build) {
265288
deps += [ ":standalone_shell" ]
266289
}
290+
if (enable_linux_lighting_app_build) {
291+
deps += [ ":linux_lighting_app" ]
292+
}
267293
if (enable_nrf5_lock_app_build) {
268294
deps += [ ":nrf5_lock_app" ]
269295
}

examples/lighting-app/linux/BUILD.gn

+4
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,7 @@ executable("chip-tool-server") {
5050

5151
output_dir = root_out_dir
5252
}
53+
54+
group("linux") {
55+
deps = [ ":chip-tool-server" ]
56+
}

0 commit comments

Comments
 (0)