mirror of
https://github.com/hathach/tinyusb.git
synced 2025-01-17 05:32:55 +08:00
f5e02e72ed
`hw\bsp` separate one family folder to esp32s2, esp32s3 add board specific board.cmake file to override board specific options(features) fix examples and test scripts to use new family approach
19 lines
512 B
CMake
19 lines
512 B
CMake
cmake_minimum_required(VERSION 3.5)
|
|
|
|
# use BOARD-Directory name for project id
|
|
get_filename_component(PROJECT ${CMAKE_CURRENT_SOURCE_DIR} NAME)
|
|
set(PROJECT ${BOARD}-${PROJECT})
|
|
|
|
# TOP is absolute path to root directory of TinyUSB git repo
|
|
set(TOP "../../..")
|
|
get_filename_component(TOP "${TOP}" REALPATH)
|
|
|
|
# Check for -DFAMILY=
|
|
if(FAMILY MATCHES "^(esp32s[2-3])*")
|
|
include(${TOP}/hw/bsp/${FAMILY}/family.cmake)
|
|
project(${PROJECT})
|
|
|
|
else()
|
|
message(FATAL_ERROR "Invalid FAMILY specified: ${FAMILY}")
|
|
endif()
|