revk / ESP32-RevK

My tools for ESP32 projects under ESP-IDF
GNU General Public License v3.0
7 stars 6 forks source link

CMakeLists: Proper check for ESP8266 #8

Closed Sonic-Amiga closed 1 year ago

Sonic-Amiga commented 1 year ago

There's a catch: CONFIG_* vars aren't evaluated yet when dependencies are collected. We can only test whether some files exist, let's use an already established, albeit crude, approach.

Sonic-Amiga commented 1 year ago

Hello! This one seems to work. Based on technique you invented.

There's definitely something weird going on. I tried a simple thing:

if (true)
message(WARNING, "here")
else()
message(WARNING, "there")
endif()

And during dependency collection i see NOTHING. It does fire, but on the second pass, after " Building ESP-IDF components for target" has been completed. I have no idea how it's done, apparently some cmake black magic.

Just in case, please test that it builds in your env before merging. Nothing would surprise me any more...