2020-04-07 16:35:02 +07:00
|
|
|
cmake_minimum_required(VERSION 3.5)
|
|
|
|
|
|
|
|
# TOP is absolute path to root directory of TinyUSB git repo
|
2023-03-30 10:41:11 +07:00
|
|
|
# needed for esp32sx build. TODO could be removed later on
|
2020-04-07 16:35:02 +07:00
|
|
|
set(TOP "../../..")
|
|
|
|
get_filename_component(TOP "${TOP}" REALPATH)
|
|
|
|
|
2023-03-30 10:41:11 +07:00
|
|
|
include(${CMAKE_CURRENT_SOURCE_DIR}/../../../hw/bsp/family_support.cmake)
|
|
|
|
|
|
|
|
# gets PROJECT name for the example (e.g. <BOARD>-<DIR_NAME>)
|
|
|
|
family_get_project_name(PROJECT ${CMAKE_CURRENT_LIST_DIR})
|
|
|
|
|
|
|
|
project(${PROJECT})
|
|
|
|
|
|
|
|
# Checks this example is valid for the family and initializes the project
|
|
|
|
family_initialize_project(${PROJECT} ${CMAKE_CURRENT_LIST_DIR})
|
|
|
|
|
2021-01-23 18:09:57 +07:00
|
|
|
# Check for -DFAMILY=
|
2023-03-30 10:41:11 +07:00
|
|
|
if(NOT FAMILY STREQUAL "espressif")
|
2021-03-09 11:29:07 +01:00
|
|
|
message(FATAL_ERROR "Invalid FAMILY specified: ${FAMILY}")
|
2021-01-23 18:09:57 +07:00
|
|
|
endif()
|