2018-07-19 23:00:56 +08:00
|
|
|
macro(set_conf_file)
|
|
|
|
if(EXISTS ${APPLICATION_SOURCE_DIR}/prj_${BOARD}.conf)
|
|
|
|
set(CONF_FILE "${APPLICATION_SOURCE_DIR}/prj_${BOARD}.conf")
|
|
|
|
elseif(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()
|
|
|
|
|
2017-10-27 21:43:34 +08:00
|
|
|
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE)
|
|
|
|
project(NONE)
|
|
|
|
|
|
|
|
target_sources( app PRIVATE src/echo-server.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)
|