Skip to content

typical build environment configuration #213

Answered by UncleRus
digiexchris asked this question in Q&A
Discussion options

You must be logged in to vote

ESP-IDF project contains at least two CMakeList.txt: one for the project and one for the main component:

  • YourProject/main/CMakeList.txt
  • YourProject/CMakeList.txt

CMakeLists.txt in main usually contains only the sources of your project:

idf_component_register(
        INCLUDE_DIRS .
        SRCS main.c settings.c ....
        EMBED_TXTFILES web/jquery.js web/styles.css ...
        EMBED_FILES gifs/heart.gif gifs/heart2.gif ...
)

And your project CMakeList.txt can contains links to other libaries, for example:

cmake_minimum_required(VERSION 3.5)

set(EXTRA_COMPONENT_DIRS C:/Users/chris/Desktop/esp-idf/esp-idf-lib/components/)

include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(MyP…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@digiexchris
Comment options

@UncleRus
Comment options

Answer selected by digiexchris
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants