summaryrefslogtreecommitdiff
path: root/examples/device
diff options
context:
space:
mode:
authorhathach <[email protected]>2021-01-22 14:58:32 +0700
committerhathach <[email protected]>2021-01-22 14:58:32 +0700
commitb6e9c42b0217124aaf47e1d65e4eac39c3d3d681 (patch)
tree4dec4c9c6500f2b315a024076018a056d9756cc4 /examples/device
parent67a9cdc35baf3767bd24c78c68e0b969d2d7c191 (diff)
update cmake build to work with esp32s2 and rp2040
Diffstat (limited to 'examples/device')
-rw-r--r--examples/device/board_test/CMakeLists.txt13
1 files changed, 7 insertions, 6 deletions
diff --git a/examples/device/board_test/CMakeLists.txt b/examples/device/board_test/CMakeLists.txt
index c09ffe215..ee0d7ef58 100644
--- a/examples/device/board_test/CMakeLists.txt
+++ b/examples/device/board_test/CMakeLists.txt
@@ -1,15 +1,16 @@
-# 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.5)
# TOP is absolute path to root directory of TinyUSB git repo
set(TOP "../../..")
get_filename_component(TOP "${TOP}" REALPATH)
-# Add example src and bsp directories
-set(EXTRA_COMPONENT_DIRS "src" "${TOP}/hw/bsp/esp32s2/boards" "${TOP}/hw/bsp/esp32s2/components")
+# Check for -DFAMILY=
+if(NOT DEFINED FAMILY)
+ message(FATAL_ERROR "Invalid FAMILY specified")
+endif()
-include($ENV{IDF_PATH}/tools/cmake/project.cmake)
-set(SUPPORTED_TARGETS esp32s2)
+include(${TOP}/hw/bsp/${FAMILY}/family.cmake)
project(board_test)
+
+include(${TOP}/hw/bsp/${FAMILY}/family_extra.cmake OPTIONAL)