In the CMakeLists.txt file in each of the "thingx" directories I set EXTRA_COMPONENT_DIRS to ".." in the hope of referring to the common CMakeLists.txt in the directory above. However, this doesn't work, the contents of my common CMakeLists.txt never make it into the build, it is never listed in the list of components. What might I be doing wrong?
This is the CMakeLists.txt in the "thingx" directory:
Code: Select all
cmake_minimum_required(VERSION 3.5)
set(EXTRA_COMPONENT_DIRS "..")
# Empty the component list, main will bring in just what it needs
set(COMPONENTS "")
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(example)
Code: Select all
set(COMPONENT_ADD_INCLUDEDIRS "../../api" "../../cfg")
set(COMPONENT_SRCS "../../src/blah.c")
register_component()
Code: Select all
set(COMPONENT_SRCS "main.c")
set(COMPONENT_REQUIRES "esp32" "esptool_py")
register_component()
Thanks in advance for your help.