Fix CMake example, main should be treated as component

This commit is contained in:
Mahavir Jain 2018-11-05 14:21:07 +05:30
parent ee338b5633
commit df622304c8
2 changed files with 8 additions and 2 deletions

View File

@ -2,7 +2,5 @@
# CMakeLists in this exact order for cmake to work correctly # CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.5) cmake_minimum_required(VERSION 3.5)
set(MAIN_SRCS main/main.c)
include($ENV{IDF_PATH}/tools/cmake/project.cmake) include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(app-template) project(app-template)

8
main/CMakeLists.txt Normal file
View File

@ -0,0 +1,8 @@
# Edit following two lines to set component requirements (see docs)
set(COMPONENT_REQUIRES )
set(COMPONENT_PRIV_REQUIRES )
set(COMPONENT_SRCS "main.c")
set(COMPONENT_ADD_INCLUDEDIRS "")
register_component()