Build error on latest lv_micropython. "add_executable command is not scriptable". Fix workaround provided, not sure how to suggest long term fix or something else

Hi all,

Posting here as perhaps I’m not the only one having this trouble. I’ve been having a rough go at building the latest lv_micropython. I’ve installed this on a fresh debian stable build, with ESP-IDF v4.2. I’m able to pull the repo and build mpy-cross, but when it comes to building the esp32 firmware, I get the above error. I’ve found, however, that updating cmake from buster-backports from version 3.13 to 3.16 fixes the cmake errors and builds the image properly.

I’m not sure at this point if this is just a documentation change, or if it’s the intent of the lv_micropython repo maintainers to keep things current with Debian (and perhaps other derivative distributions). If any of the repo maintainers read this and would like some further details, screenshots, whatever, let me know.

As far as I know, you are expected to update CMake for the build to work properly, however, I’m not sure that this is documented clearly enough. I couldn’t find a mention of it on the main README or on the ports/esp32 README. @amirgon?

Currently the minimal required version of CMake is 3.12:

Maybe it should be set to a higher version, but I’m not sure yet.
add_executable command is supported by CMake 3.12 and higher so I’m not sure why you are getting this error.

@aseelye Could you show us the full error you are getting including line numbers etc.? Maybe there were some previous errors you missed? Does it happen only with lv_micropython or also with upstream micropython?

Mainline micropython builds successfully. Both outputs linked.

Build output for lv_micropython: lv_micropython build fail · GitHub

Build output for mainline micropython (successful): micropython build · GitHub

Thanks you for the logs @aseelye.

It may be related to this problem:

Could you try their suggestion?
Just wrap the include to mkrules.cmake with this:

# Include LVGL bindings rules

The wrapper seems to have done the trick, thank you.

Thank you for confirming this.
I’ve pushed this fix to lv_micropython.