I have an idf project with the following structure (ish):
components
--component_1
----CMakeLists.txt
----sourc.cpp
--component_2
----CMakeLists.txt
----sourc.cpp
main
--main.cpp
--CMakeLists.txt
CMakeLists.txt
sdkcofig
My components require some processor defines and so in the top level CMakeLists.txt I do something like this:
Code: Select all
cmake_minimum_required(VERSION 3.5)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(my_amazing_project)
add_compile_definitions(
"DO_THING_A"
"ENABLE_AWESOMENESS"
)
message(STATUS "Building: root")
#############################################
# Order-only phony target for my_amazing_project.elf
has the correct defines...but these defines dont seem to be making it to the components (the compile command line output only has the -DESP_PLATFORM and version define set)
Do I need to set these defines some other way or at some other level in the cmake lists?
Thanks!