Files
lucky-cat/CMakeLists.txt
T

23 lines
873 B
CMake

# The following 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)
# "Trim" the build. Include the minimal set of components, main, and anything it depends on.
idf_build_set_property(MINIMAL_BUILD ON)
project(TQ_Cat_Code)
idf_build_get_property(TQ_PROJECT_VERSION PROJECT_VER)
set(TQ_VERSIONED_FIRMWARE
"${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}-${TQ_PROJECT_VERSION}.bin")
add_custom_target(versioned_firmware ALL
COMMAND ${CMAKE_COMMAND} -E copy_if_different
"${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}.bin"
"${TQ_VERSIONED_FIRMWARE}"
DEPENDS app
BYPRODUCTS "${TQ_VERSIONED_FIRMWARE}"
COMMENT "Creating versioned firmware ${CMAKE_PROJECT_NAME}-${TQ_PROJECT_VERSION}.bin"
VERBATIM
)