CMakeLists.txt 713 B

12345678910111213141516171819202122
  1. cmake_minimum_required(VERSION 3.5)
  2. # TOP is absolute path to root directory of TinyUSB git repo
  3. # needed for esp32sx build. TODO could be removed later on
  4. set(TOP "../../..")
  5. get_filename_component(TOP "${TOP}" REALPATH)
  6. include(${CMAKE_CURRENT_SOURCE_DIR}/../../../hw/bsp/family_support.cmake)
  7. # gets PROJECT name for the example (e.g. <BOARD>-<DIR_NAME>)
  8. family_get_project_name(PROJECT ${CMAKE_CURRENT_LIST_DIR})
  9. project(${PROJECT})
  10. # Checks this example is valid for the family and initializes the project
  11. family_initialize_project(${PROJECT} ${CMAKE_CURRENT_LIST_DIR})
  12. # Check for -DFAMILY=
  13. if(FAMILY MATCHES "^esp32s[2-3]")
  14. else()
  15. message(FATAL_ERROR "Invalid FAMILY specified: ${FAMILY}")
  16. endif()