My files structure looks like:
Code: Select all
PROJECT
CMakeLists.txt
- main
main.c
component.mk
CMakeLists.txt
-- subfolder
file.c
file.h
component.mk
Code: Select all
set(COMPONENT_ADD_INCLUDEDIRS include)
#set(COMPONENT_ADD_INCLUDEDIRS ".")
set(MAIN_SRCS "main.c"
"subfolder/file.c")
set(COMPONENT_SRCS ${MAIN_SRCS})
add_executable(${PROJECT_NAME} ${MAIN_SRCS})
set(COMPONENT_REQUIRES driver sdmmc)
register_component()