Files
SharpKey/CMakeLists.txt

26 lines
1.1 KiB
CMake

# For more information about build system see
# https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/build-system.html
# The following five 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.5)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(main)
# Create the default filesystem with files loaded from the webserver directory.
littlefs_create_partition_image(filesys webfs)
idf_build_get_property(build_dir BUILD_DIR)
idf_build_get_property(elf_name EXECUTABLE_NAME GENERATOR_EXPRESSION)
# Post-build: version management, filepack creation, and release packaging.
add_custom_command (OUTPUT ${CMAKE_SOURCE_DIR}/updated
DEPENDS "${build_dir}/.bin_timestamp"
COMMAND bash -c "${CMAKE_SOURCE_DIR}/backup_version.sh"
COMMAND bash -c "${CMAKE_SOURCE_DIR}/update_version.sh"
COMMAND bash -c "${CMAKE_SOURCE_DIR}/make_filepack.sh"
COMMAND bash -c "${CMAKE_SOURCE_DIR}/make_release.sh"
)
add_custom_target(version ALL DEPENDS ${CMAKE_SOURCE_DIR}/updated)