ESP_PLATFORM flag not set
Posted: Mon Oct 28, 2019 10:49 am
Hi,
I am trying to build my application for different targets which sometimes require different CMake commands. So I did the following:
1. Clone the esp-idf-template application from Github.
2. Create an empty component named test_component.
3. Change the CMakeLists.txt in test_component so it looks like the following:
When I run idf.py build from the projects root directory, the ESP_PLATFORM variable seems not to be set, but I would expect it to be set according to the docs: https://docs.espressif.com/projects/esp ... components . Do I need to configure anything differently or build the project in another way?
Thank you in advance!
I am trying to build my application for different targets which sometimes require different CMake commands. So I did the following:
1. Clone the esp-idf-template application from Github.
2. Create an empty component named test_component.
3. Change the CMakeLists.txt in test_component so it looks like the following:
Code: Select all
if(ESP_PLATFORM)
message("Building with esp-idf...")
idf_component_register(
SRCS
"component.cpp"
INCLUDE_DIRS
"."
)
else()
message("Not building with esp-idf...")
# do some stuff for other platforms
endif()
Thank you in advance!