26 lines
768 B
CMake
26 lines
768 B
CMake
cmake_minimum_required(VERSION 3.8.2)
|
|
macro(set_conf_file)
|
|
if(EXISTS ${APPLICATION_SOURCE_DIR}/boards/${BOARD}.conf)
|
|
set(CONF_FILE "prj.conf ${APPLICATION_SOURCE_DIR}/boards/${BOARD}.conf")
|
|
else()
|
|
set(CONF_FILE "prj.conf")
|
|
endif()
|
|
endmacro()
|
|
|
|
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE)
|
|
project(NONE)
|
|
|
|
target_sources( app PRIVATE src/echo-client.c)
|
|
target_sources_ifdef(CONFIG_NET_UDP app PRIVATE src/udp.c)
|
|
target_sources_ifdef(CONFIG_NET_TCP app PRIVATE src/tcp.c)
|
|
|
|
include($ENV{ZEPHYR_BASE}/samples/net/common/common.cmake)
|
|
|
|
set(gen_dir ${ZEPHYR_BINARY_DIR}/include/generated/)
|
|
|
|
generate_inc_file_for_target(
|
|
app
|
|
src/echo-apps-cert.der
|
|
${gen_dir}/echo-apps-cert.der.inc
|
|
)
|