Cmake is not looking for components in EXTRA_COMPONENT_DIRS
Posted: Tue Mar 31, 2020 5:06 pm
This is our folder structure
I'm trying to make project_a and project_b search for the minmea component in "common" instead of having two copies to mantain.
I tried modifying the projects CMakeLists.txt as follows:
but I'm getting an error
I'm running idf v4.0 in vs-code windows
Code: Select all
common
minmea
project_a
components
GPS_logger
...
main
project_b
components
GPS_visualizer
...
I tried modifying the projects CMakeLists.txt as follows:
Code: Select all
# The following five lines of boilerplate have to be in your project's
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.5)
set(EXTRA_COMPONENT_DIRS, "PROJECT_DIR/../common")
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(project_a)
Code: Select all
⚠️ CMake Error at C:/Users/Gunar/esp-idf/tools/cmake/build.cmake:185 (message):
⚠️ Failed to resolve component 'minmea'.
Call Stack (most recent call first):
C:/Users/Gunar/esp-idf/tools/cmake/build.cmake:211 (__build_resolve_and_add_req)
C:/Users/Gunar/esp-idf/tools/cmake/build.cmake:425 (__build_expand_requirements)
C:/Users/Gunar/esp-idf/tools/cmake/project.cmake:337 (idf_build_process)
CMakeLists.txt:8 (project)
-- Configuring incomplete, errors occurred!