1cmake_minimum_required(VERSION 3.20.0) 2 3find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) 4project(lwm2m_rd_client) 5 6set(APP_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src) 7 8# Add test sources 9target_sources(app PRIVATE ${APP_SRC_DIR}/main.c) 10target_sources(app PRIVATE ${APP_SRC_DIR}/stubs.c) 11target_sources(app PRIVATE ${ZEPHYR_BASE}/subsys/net/lib/lwm2m/lwm2m_rd_client.c) 12 13# Add includes directories 14target_include_directories(app PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src) 15target_include_directories(app PRIVATE ${ZEPHYR_BASE}/include/) 16target_include_directories(app PRIVATE ${ZEPHYR_BASE}/subsys/net/lib/lwm2m/) 17 18add_compile_definitions(CONFIG_LWM2M_ENGINE_MAX_PENDING=2) 19add_compile_definitions(CONFIG_LWM2M_ENGINE_MAX_REPLIES=2) 20add_compile_definitions(CONFIG_LWM2M_ENGINE_VALIDATION_BUFFER_SIZE=512) 21add_compile_definitions(CONFIG_LWM2M_ENGINE_MESSAGE_HEADER_SIZE=512) 22add_compile_definitions(CONFIG_LWM2M_RD_CLIENT_ENDPOINT_NAME_MAX_LENGTH=32) 23add_compile_definitions(CONFIG_LWM2M_RD_CLIENT_MAX_RETRIES=2) 24add_compile_definitions(CONFIG_LWM2M_COAP_BLOCK_SIZE=256) 25add_compile_definitions(CONFIG_LWM2M_COAP_MAX_MSG_SIZE=512) 26add_compile_definitions(CONFIG_LWM2M_ENGINE_DEFAULT_LIFETIME=20) 27add_compile_definitions(CONFIG_LWM2M_SECURITY_INSTANCE_COUNT=1) 28add_compile_definitions(CONFIG_LWM2M_SECONDS_TO_UPDATE_EARLY=10) 29add_compile_definitions(CONFIG_LWM2M_QUEUE_MODE_UPTIME=10) 30add_compile_definitions(CONFIG_LWM2M_LOG_LEVEL=4) 31add_compile_definitions(CONFIG_LWM2M_QUEUE_MODE_ENABLED=1) 32add_compile_definitions(CONFIG_LWM2M_TLS_SESSION_CACHING=1) 33add_compile_definitions(CONFIG_LWM2M_RD_CLIENT_LISTEN_AT_IDLE=1) 34add_compile_definitions(CONFIG_LWM2M_RD_CLIENT_SUPPORT_BOOTSTRAP=1) 35add_compile_definitions(CONFIG_LWM2M_UPDATE_PERIOD=0) 36