2017-08-01 22:17:42 +08:00
|
|
|
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE)
|
|
|
|
project(NONE)
|
|
|
|
|
|
|
|
FILE(GLOB app_sources src/*.c)
|
|
|
|
target_sources(app PRIVATE ${app_sources})
|
|
|
|
|
|
|
|
include($ENV{ZEPHYR_BASE}/samples/net/common/common.cmake)
|
|
|
|
|
|
|
|
set(gen_dir ${ZEPHYR_BINARY_DIR}/include/generated/)
|
|
|
|
|
|
|
|
# List of files that are used to generate .h file that can be included
|
|
|
|
# into .c file.
|
|
|
|
foreach(inc_file
|
|
|
|
echo-apps-cert.der
|
|
|
|
echo-apps-key.der
|
|
|
|
)
|
|
|
|
generate_inc_file_for_target(
|
|
|
|
app
|
|
|
|
src/${inc_file}
|
|
|
|
${gen_dir}/${inc_file}.inc
|
|
|
|
)
|
|
|
|
endforeach()
|
|
|
|
|
|
|
|
foreach(inc_file
|
|
|
|
index.html
|
|
|
|
style.css
|
|
|
|
favicon.ico
|
|
|
|
br.js
|
|
|
|
)
|
|
|
|
generate_inc_file_for_target(
|
|
|
|
app
|
|
|
|
src/${inc_file}
|
|
|
|
${gen_dir}/${inc_file}.gz.inc
|
|
|
|
--gzip
|
|
|
|
)
|
|
|
|
endforeach()
|
|
|
|
|
|
|
|
target_link_libraries_ifdef(CONFIG_MBEDTLS app mbedTLS)
|
2018-01-09 17:33:31 +08:00
|
|
|
target_include_directories(app PRIVATE $ENV{ZEPHYR_BASE}/subsys/net/ip)
|