blob: 2dc3301f87d651f0ab18581773e6d428b82e2161 [file] [log] [blame]
# Copyright (c) 2020 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import("//build_overrides/build.gni")
import("//build_overrides/chip.gni")
import("//build_overrides/openthread.gni")
import("//build_overrides/qpg6100_sdk.gni")
import("${build_root}/config/defaults.gni")
import("${qpg6100_sdk_build_root}/qpg6100_executable.gni")
import("${qpg6100_sdk_build_root}/qpg6100_sdk.gni")
assert(current_os == "freertos")
qpg6100_project_dir = "${chip_root}/examples/lighting-app/qpg6100"
examples_plat_dir = "${chip_root}/examples/platform/qpg6100"
qpg6100_sdk("sdk") {
include_dirs = [
"${chip_root}/src/platform/qpg6100",
"${examples_plat_dir}/project_include",
]
sources = [
"${examples_plat_dir}/app/include/Service.h",
"${examples_plat_dir}/project_include/CHIPProjectConfig.h",
]
defines = []
if (is_debug) {
defines += [ "BUILD_RELEASE=0" ]
} else {
defines += [ "BUILD_RELEASE=1" ]
}
}
qpg6100_executable("lighting_app") {
include_dirs = []
defines = []
output_name = "chip-qpg6100-lighting-example.out"
public_deps = [
":sdk",
"${chip_root}/examples/lighting-app/lighting-common/",
"${chip_root}/src/lib",
"${chip_root}/src/setup_payload",
"${chip_root}/third_party/openthread/platforms:libopenthread-platform",
"${chip_root}/third_party/openthread/platforms:libopenthread-platform-utils",
"${chip_root}/third_party/openthread/repo:libopenthread-cli-ftd",
"${chip_root}/third_party/openthread/repo:libopenthread-ftd",
]
include_dirs += [
"${qpg6100_project_dir}/include/",
"${chip_root}/src/app/util",
"${chip_root}/src/app/server",
"${examples_plat_dir}",
"${examples_plat_dir}/app/include",
]
sources = [
"${examples_plat_dir}/app/Service.cpp",
"src/AppTask.cpp",
"src/LightingManager.cpp",
"src/ZclCallbacks.cpp",
"src/main.cpp",
]
output_dir = root_out_dir
ldscript = "${qpg6100_sdk_root}/qpg6100/ldscripts/chip-qpg6100-example.ld"
ldflags = [ "-T" + rebase_path(ldscript, root_build_dir) ]
}
group("qpg6100") {
deps = [ ":lighting_app" ]
}
group("default") {
deps = [ ":qpg6100" ]
}