summaryrefslogtreecommitdiff
path: root/fw/app/CMakeLists.txt
blob: 47f75f630fdd99accf9a62cb51619fe4902b1172 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# This Source Code Form is subject to the terms of the Mozilla Public License,
# v. 2.0. If a copy of the MPL was not distributed with this file, You can
# obtain one at https://mozilla.org/MPL/2.0/.

cmake_minimum_required(VERSION 3.20.0)

find_package(Zephyr
	REQUIRED
	HINTS
		"${ZEPHYR_BASE}"
)

project(iot-contact-app)

target_sources(app
	PRIVATE
		"${CMAKE_CURRENT_SOURCE_DIR}/src/syslog.c"
		"${CMAKE_CURRENT_SOURCE_DIR}/src/network.c"
		"${CMAKE_CURRENT_SOURCE_DIR}/src/http.c"
		"${CMAKE_CURRENT_SOURCE_DIR}/src/ws.c"
		"${CMAKE_CURRENT_SOURCE_DIR}/src/heart.c"
)

zephyr_linker_sources(SECTIONS sections-rom.ld)
zephyr_linker_section(NAME http_resource_desc_http_service
                      KVMA RAM_REGION GROUP RODATA_REGION
                      SUBALIGN ${CONFIG_LINKER_ITERABLE_SUBALIGN})

generate_inc_file_for_target(
	app
	src/index.html
	${ZEPHYR_BINARY_DIR}/include/generated/index.html.gz.inc
	--gzip
)

generate_inc_file_for_target(
	app
	src/iot-contact.js
	${ZEPHYR_BINARY_DIR}/include/generated/iot-contact.js.gz.inc
	--gzip
)