From df622304c87eae35818d1b4209b461ad26d0992c Mon Sep 17 00:00:00 2001 From: Mahavir Jain Date: Mon, 5 Nov 2018 14:21:07 +0530 Subject: [PATCH] Fix CMake example, main should be treated as component --- CMakeLists.txt | 2 -- main/CMakeLists.txt | 8 ++++++++ 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 main/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index eb3ddbe..bda6977 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,5 @@ # CMakeLists in this exact order for cmake to work correctly cmake_minimum_required(VERSION 3.5) -set(MAIN_SRCS main/main.c) - include($ENV{IDF_PATH}/tools/cmake/project.cmake) project(app-template) diff --git a/main/CMakeLists.txt b/main/CMakeLists.txt new file mode 100644 index 0000000..e6c20ac --- /dev/null +++ b/main/CMakeLists.txt @@ -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()