Adding source folder to project
Posted: Sat Jul 15, 2023 11:20 am
I am trying to add a component ('common') to my project ('esp_project') which is in a folder outside the project folder. I have this folder structure:
The file esp_project/CMakeFiles.txt contains this
The file common/CMakeFiles.txt contains this
But the 'common' component is not compiled or linked. Can anyone tell me what I am doing wrong?
Code: Select all
esp_project/
main/
common/
Code: Select all
cmake_minimum_required(VERSION 3.5)
set(EXTRA_COMPONENT_DIRS ../common)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(esp_project)
Code: Select all
idf_component_register(
SRCS "crc.cpp"
INCLUDE_DIRS ".")