Ken Van Hoeylandt 5565b77c7c Fixes
2026-01-22 21:31:35 +01:00

20 lines
482 B
CMake

cmake_minimum_required(VERSION 3.20)
file(GLOB_RECURSE SOURCES "Source/*.c**")
if (DEFINED ENV{ESP_IDF_VERSION})
idf_component_register(
SRCS ${SOURCES}
INCLUDE_DIRS "Include/"
REQUIRES TactilityKernel driver
)
else ()
add_library(PlatformEsp32 OBJECT)
target_sources(PlatformEsp32 PRIVATE ${SOURCES})
target_include_directories(PlatformEsp32 PUBLIC Include/)
target_link_libraries(PlatformEsp32 PUBLIC TactilityKernel)
endif ()