generated from hulk/gd32e23x_template
更改项目名称,增加编译结果文件名的版本与编译日期
This commit is contained in:
@@ -1,7 +1,13 @@
|
||||
cmake_minimum_required(VERSION 3.28)
|
||||
include(cmake/toolchain.cmake)
|
||||
|
||||
project(gd32e23x_template)
|
||||
project(xlsw_3dp_LDC1612)
|
||||
|
||||
set(VERSION_MAJOR 0)
|
||||
set(VERSION_MINOR 0)
|
||||
set(VERSION_PATCH 1)
|
||||
set(VERSION "V${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
|
||||
string(TIMESTAMP CURRENT_DATE "%Y-%m-%d")
|
||||
|
||||
enable_language(C)
|
||||
enable_language(CXX)
|
||||
@@ -21,11 +27,11 @@ set(TARGET_C_SRC
|
||||
${CMAKE_SOURCE_DIR}/src/peripheral.c
|
||||
)
|
||||
|
||||
add_executable(gd32e23x_template ${TARGET_C_SRC})
|
||||
add_executable(xlsw_3dp_LDC1612 ${TARGET_C_SRC})
|
||||
|
||||
target_link_libraries(gd32e23x_template GD32E23X_SDK)
|
||||
target_include_directories(gd32e23x_template PUBLIC inc)
|
||||
target_link_libraries(xlsw_3dp_LDC1612 GD32E23X_SDK)
|
||||
target_include_directories(xlsw_3dp_LDC1612 PUBLIC inc)
|
||||
|
||||
# Generate .bin and .hex
|
||||
generate_binary_file(gd32e23x_template)
|
||||
generate_hex_file(gd32e23x_template)
|
||||
generate_binary_file(xlsw_3dp_LDC1612 "XLSW_LDC1612_FW")
|
||||
generate_hex_file(xlsw_3dp_LDC1612 "XLSW_LDC1612_FW")
|
||||
|
Reference in New Issue
Block a user