change output filename to BOARD-Directory

This commit is contained in:
hathach
2021-01-26 12:46:24 +07:00
parent 0e585570a3
commit 4a0f5cbd63
57 changed files with 96 additions and 77 deletions

View File

@@ -1,18 +1,18 @@
cmake_minimum_required(VERSION 3.5)
# use directory name for project id
# 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(NOT DEFINED FAMILY)
if(FAMILY STREQUAL "esp32s2")
include(${TOP}/hw/bsp/${FAMILY}/family.cmake)
project(${PROJECT})
else()
message(FATAL_ERROR "Invalid FAMILY specified")
endif()
include(${TOP}/hw/bsp/${FAMILY}/family.cmake)
project(${PROJECT})
project(hid_composite_freertos)