esp-idf/examples/protocols/mqtt/ssl_ds/CMakeLists.txt
Ivan Grokhotkov 6d87100a70
feat(examples): add local components via idf_component.yml
Specifying all the dependencies (managed and local) in the manifest
makes it easier for users to see every component the example
depends on.
2023-09-19 10:38:24 +02:00

17 lines
690 B
CMake

# The following four lines of boilerplate have to be in your project's CMakeLists
# in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.16)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(mqtt_ssl_ds)
# Flash the custom partition named `esp_secure_cert`.
set(partition esp_secure_cert)
idf_build_get_property(project_dir PROJECT_DIR)
set(image_file ${project_dir}/esp_secure_cert_data/${partition}.bin)
partition_table_get_partition_info(offset "--partition-name ${partition}" "offset")
esptool_py_flash_target_image(flash "${partition}" "${offset}" "${image_file}")
target_add_binary_data(${CMAKE_PROJECT_NAME}.elf "main/mosquitto.org.crt" TEXT)