Files
SmartPetFeeder_STM32/CMakeLists.txt
wangbeihong ce8d6fd2eb feat: 添加MP3驱动模块并集成到系统初始化
新增MP3驱动模块,包含初始化、播放、暂停、停止、音量设置等功能
修改USART3波特率为9600以适配MP3模块
在系统启动时初始化MP3模块并播放启动音效
添加MP3播放索引定义文件
2026-02-23 14:31:55 +08:00

87 lines
2.2 KiB
CMake

cmake_minimum_required(VERSION 3.22)
#
# This file is generated only once,
# and is not re-generated if converter is called multiple times.
#
# User is free to modify the file as much as necessary
#
# Setup compiler settings
set(CMAKE_C_STANDARD 11)
set(CMAKE_C_STANDARD_REQUIRED ON)
set(CMAKE_C_EXTENSIONS ON)
# Define the build type
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Debug")
endif()
# Set the project name
set(CMAKE_PROJECT_NAME hahha)
# Enable compile command to ease indexing with e.g. clangd
set(CMAKE_EXPORT_COMPILE_COMMANDS TRUE)
# Core project settings
project(${CMAKE_PROJECT_NAME})
message("Build type: " ${CMAKE_BUILD_TYPE})
# Enable CMake support for ASM and C languages
enable_language(C ASM)
# Create an executable object type
add_executable(${CMAKE_PROJECT_NAME}
# Add user sources here
Core/Bsp/easylogger/inc/elog.h
Core/Bsp/easylogger/port/elog_port.c
Core/Bsp/easylogger/src/elog.c
Core/Bsp/easylogger/src/elog_utils.c
Core/Bsp/BSP_WF_24/dx_wf_24.c
Core/Bsp/BSP_Device/device_ctrl/device_ctrl.c
Core/Bsp/BSP_Device/spi_st7735s/spi_st7735s.c
Core/Bsp/BSP_Device/spi_st7735s/fonts.c
Core/Bsp/BSP_Device/bsp_mp3/mp3_driver.c
)
# Add STM32CubeMX generated sources
add_subdirectory(cmake/stm32cubemx)
# Link directories setup
target_link_directories(${CMAKE_PROJECT_NAME} PRIVATE
# Add user defined library search paths
)
# Add sources to executable
target_sources(${CMAKE_PROJECT_NAME} PRIVATE
# Add user sources here
)
# Add include paths
target_include_directories(${CMAKE_PROJECT_NAME} PRIVATE
# Add user defined include paths
Core/Bsp/easylogger
Core/Bsp/easylogger/inc
Core/Bsp/easylogger/port
Core/Bsp/easylogger/src
Core/Bsp/BSP_WF_24
Core/Bsp/BSP_Device/device_ctrl
Core/Bsp/BSP_Device/spi_st7735s
Core/Bsp/BSP_Device/bsp_mp3
)
# Add project symbols (macros)
target_compile_definitions(${CMAKE_PROJECT_NAME} PRIVATE
# Add user defined symbols
)
# Remove wrong libob.a library dependency when using cpp files
list(REMOVE_ITEM CMAKE_C_IMPLICIT_LINK_LIBRARIES ob)
# Add linked libraries
target_link_libraries(${CMAKE_PROJECT_NAME}
stm32cubemx
# Add user defined libraries
)