cmake_minimum_required(VERSION 3.16) set(DEVICE_LAB_BOARD "m5stack_stopwatch" CACHE STRING "Device Lab board component") set(SUPPORTED_BOARDS "m5stack_stopwatch") if(NOT DEVICE_LAB_BOARD IN_LIST SUPPORTED_BOARDS) message(FATAL_ERROR "Unsupported board '${DEVICE_LAB_BOARD}'. Supported now: ${SUPPORTED_BOARDS}") endif() set(EXTRA_COMPONENT_DIRS "${CMAKE_CURRENT_LIST_DIR}/../boards/common" "${CMAKE_CURRENT_LIST_DIR}/../boards/${DEVICE_LAB_BOARD}" ) include($ENV{IDF_PATH}/tools/cmake/project.cmake) project(device_lab VERSION 0.6.1) # The vendor compat headers select class members using __has_include(M5GFX.h). # Board consumers see M5GFX; the driver TUs must see it too. Otherwise IOE's # constructor/initialization writes eight bytes past the board's object into PM1. foreach(vendor M5PM1 M5IOE1) idf_component_get_property(vendor_lib ${vendor} COMPONENT_LIB) target_link_libraries(${vendor_lib} PRIVATE idf::M5GFX) endforeach()