b97d0ba9ebc4ac6ab3b878b994e317b8aedd90f4
[platform/upstream/connectedhomeip.git] / examples / lock-app / nrfconnect / CMakeLists.txt
1 #
2 #    Copyright (c) 2020 Project CHIP Authors
3 #
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
7 #
8 #        http://www.apache.org/licenses/LICENSE-2.0
9 #
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.
15 #
16 cmake_minimum_required(VERSION 3.13.1)
17
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)
21
22 set(CONF_FILE ${CHIP_ROOT}/config/nrfconnect/app/sample-defaults.conf prj.conf)
23
24 # Load NCS/Zephyr build system
25 list(APPEND ZEPHYR_EXTRA_MODULES ${CHIP_ROOT}/config/nrfconnect/chip-module)
26 find_package(Zephyr HINTS $ENV{ZEPHYR_BASE})
27
28 target_compile_options(app PRIVATE -Werror)
29
30 project(chip-nrfconnect-lock-example)
31
32 target_include_directories(app PRIVATE 
33                            main/include 
34                            ${LOCK_COMMON} 
35                            ${NRFCONNECT_COMMON}/util/include 
36                            ${NRFCONNECT_COMMON}/app/include)
37
38 target_sources(app PRIVATE
39                main/AppTask.cpp
40                main/BoltLockManager.cpp
41                main/main.cpp
42                main/ZclCallbacks.cpp
43                ${LOCK_COMMON}/gen/call-command-handler.cpp
44                ${LOCK_COMMON}/gen/callback-stub.cpp
45                ${NRFCONNECT_COMMON}/util/LEDWidget.cpp
46                ${NRFCONNECT_COMMON}/util/NFCWidget.cpp
47                ${NRFCONNECT_COMMON}/util/ThreadUtil.cpp
48                ${NRFCONNECT_COMMON}/app/Service.cpp
49                ${CHIP_ROOT}/src/app/server/DataModelHandler.cpp
50                ${CHIP_ROOT}/src/app/reporting/reporting-default-configuration.cpp
51                ${CHIP_ROOT}/src/app/reporting/reporting.cpp
52                ${CHIP_ROOT}/src/app/util/af-event.cpp
53                ${CHIP_ROOT}/src/app/util/af-main-common.cpp
54                ${CHIP_ROOT}/src/app/util/attribute-size.cpp
55                ${CHIP_ROOT}/src/app/util/attribute-storage.cpp
56                ${CHIP_ROOT}/src/app/util/attribute-table.cpp
57                ${CHIP_ROOT}/src/app/util/binding-table.cpp
58                ${CHIP_ROOT}/src/app/util/chip-message-send.cpp
59                ${CHIP_ROOT}/src/app/util/client-api.cpp
60                ${CHIP_ROOT}/src/app/util/ember-print.cpp
61                ${CHIP_ROOT}/src/app/util/message.cpp
62                ${CHIP_ROOT}/src/app/util/process-cluster-message.cpp
63                ${CHIP_ROOT}/src/app/util/process-global-message.cpp
64                ${CHIP_ROOT}/src/app/util/util.cpp
65                ${CHIP_ROOT}/src/app/clusters/bindings/bindings.cpp
66                ${CHIP_ROOT}/src/app/clusters/on-off-server/on-off.cpp)