2 # Copyright (c) 2020 Project CHIP Authors
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
16 cmake_minimum_required(VERSION 3.13.1)
18 get_filename_component(CHIP_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/third_party/connectedhomeip REALPATH)
19 get_filename_component(NRFCONNECT_COMMON ${CHIP_ROOT}/examples/platform/nrfconnect REALPATH)
20 get_filename_component(LOCK_COMMON ${CHIP_ROOT}/examples/lock-app/lock-common REALPATH)
22 include(${CHIP_ROOT}/config/nrfconnect/app/check-nrfconnect-version.cmake)
24 # Load NCS/Zephyr build system
25 set(CONF_FILE ${CHIP_ROOT}/config/nrfconnect/app/sample-defaults.conf prj.conf)
26 list(APPEND ZEPHYR_EXTRA_MODULES ${CHIP_ROOT}/config/nrfconnect/chip-module)
27 find_package(Zephyr HINTS $ENV{ZEPHYR_BASE})
29 target_compile_options(app PRIVATE -Werror)
31 project(chip-nrfconnect-lock-example)
33 target_include_directories(app PRIVATE
37 ${NRFCONNECT_COMMON}/util/include
38 ${NRFCONNECT_COMMON}/app/include)
40 target_sources(app PRIVATE
42 main/BoltLockManager.cpp
45 ${LOCK_COMMON}/gen/call-command-handler.cpp
46 ${LOCK_COMMON}/gen/callback-stub.cpp
47 ${NRFCONNECT_COMMON}/util/LEDWidget.cpp
48 ${NRFCONNECT_COMMON}/util/NFCWidget.cpp
49 ${NRFCONNECT_COMMON}/util/ThreadUtil.cpp
50 ${NRFCONNECT_COMMON}/app/Service.cpp
51 ${CHIP_ROOT}/src/app/server/DataModelHandler.cpp
52 ${CHIP_ROOT}/src/app/reporting/reporting-default-configuration.cpp
53 ${CHIP_ROOT}/src/app/reporting/reporting.cpp
54 ${CHIP_ROOT}/src/app/util/af-event.cpp
55 ${CHIP_ROOT}/src/app/util/af-main-common.cpp
56 ${CHIP_ROOT}/src/app/util/attribute-size.cpp
57 ${CHIP_ROOT}/src/app/util/attribute-storage.cpp
58 ${CHIP_ROOT}/src/app/util/attribute-table.cpp
59 ${CHIP_ROOT}/src/app/util/binding-table.cpp
60 ${CHIP_ROOT}/src/app/util/chip-message-send.cpp
61 ${CHIP_ROOT}/src/app/util/client-api.cpp
62 ${CHIP_ROOT}/src/app/util/ember-print.cpp
63 ${CHIP_ROOT}/src/app/util/message.cpp
64 ${CHIP_ROOT}/src/app/util/process-cluster-message.cpp
65 ${CHIP_ROOT}/src/app/util/process-global-message.cpp
66 ${CHIP_ROOT}/src/app/util/util.cpp
67 ${CHIP_ROOT}/src/app/clusters/bindings/bindings.cpp
68 ${CHIP_ROOT}/src/app/clusters/network-commissioning/network-commissioning-ember.cpp
69 ${CHIP_ROOT}/src/app/clusters/network-commissioning/network-commissioning.cpp
70 ${CHIP_ROOT}/src/app/clusters/on-off-server/on-off.cpp)