Files
JoyD/ESP32/my_usb_project/CMakeLists.txt

17 lines
604 B
CMake
Raw Normal View History

# 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.16)
# 强制使用 Ninja 构建系统
set(CMAKE_GENERATOR "Ninja")
# 生成 compile_commands.json 用于 clangd
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(my_usb_project)
2026-04-01 09:19:32 +08:00
# 添加额外的链接器选项
idf_build_executable(${CMAKE_PROJECT_NAME}.elf)