summaryrefslogtreecommitdiffstats
path: root/tinyusb/examples/device/hid_composite_freertos/CMakeLists.txt
blob: ed734b9543f7c95c8ffe010b5327b1f62844d4e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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()