[v5.1.2] ExternalProject unable to be used in component

Connor_Duval_S
Posts: 1
Joined: Fri Jan 19, 2024 1:07 am

[v5.1.2] ExternalProject unable to be used in component

Postby Connor_Duval_S » Fri Jan 19, 2024 1:30 am

I am attempting to make a component to wrap https://github.com/goToMain/libosdp, which needs to call multiple `add_subdirectory` commands. This can't be done while CMake is in script mode and I am searching for a way around this.

Reading through the Build System docs at https://docs.espressif.com/projects/esp ... ystem.html, it would appear using
  1. include(ExternalProject)
  2. ExternalProject_add(...)
in a component's CMakeLists.txt file was an available option to circumvent the restrictions of the ESP-IDF component system. This does not appear to be the case.

The error reads
CMake Error at
/opt/homebrew/Cellar/cmake/3.25.1/share/cmake/Modules/ExternalProject.cmake:1256
(define_property):

define_property command is not scriptable
It appears the "include" command is what trips the build-system error and not including "ExternalProject" will result in an "unknown command ExternalProject_add" error. CMake commands are case-insensitive. Are there any examples of a component wrapper for a non-component library or any examples of how a component can use "ExternalProject_add" in ESP-IDFv5.1.2+?

OS: Mac OS Sonoma 14.2.1
CMake version: 3.25.1
ESP-IDF version: v5.1.2-602-gdb1e54a0c53

Who is online

Users browsing this forum: No registered users and 93 guests