1# SPDX-License-Identifier: Apache-2.0 2 3cmake_minimum_required(VERSION 3.20.0) 4 5find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) 6project(aws_iot_mqtt) 7 8if(USE_DUMMY_CREDS) 9 set(creds "src/creds/dummy.c") 10else() 11 if(NOT EXISTS ${APPLICATION_SOURCE_DIR}/src/creds/key.c OR 12 NOT EXISTS ${APPLICATION_SOURCE_DIR}/src/creds/cert.c OR 13 NOT EXISTS ${APPLICATION_SOURCE_DIR}/src/creds/ca.c) 14 message(FATAL_ERROR 15 "Credentials not found. Please run " 16 "'python3 src/creds/convert_keys.py' before building" 17 ) 18 endif() 19 20 set(creds "src/creds/ca.c" "src/creds/key.c" "src/creds/cert.c") 21endif() 22 23target_sources(app PRIVATE "src/main.c" ${creds}) 24