how to add all include directory subfolder in CMakeLists.txt file ( for a stupid newbie !)
Posted: Sun Sep 29, 2024 4:51 pm
Hello guys !
I am new to esp-idf and I just build a project with arduino as components with the help of VisualGDB ( esp-idf v5.1.4 ) this working
Now I create a components and add some libraries inside.
But to compile I need to add header reference from arduino core and some from esp-idf ( https://docs.espressif.com/projects/esp ... explicitly )
Actually I made this by hand one by one in my CMakeLists.txt like that :
But I become crazy with this job and would like to add recursively all subfolder of ../arduino/libraries/
and all ../../../../../../../../SysGCC/esp32/esp-idf/v5.1.4/components/
..especially because I use ble and need to add all headers of esp-idf components bt (...esp-idf\v5.1.4\components\bt )
I read : https://docs.espressif.com/projects/esp ... ystem.html
but I didn't understand how to do that.. ( feel very stupid !!)
Could somebody show me ?
Thanks for help
I am new to esp-idf and I just build a project with arduino as components with the help of VisualGDB ( esp-idf v5.1.4 ) this working
Now I create a components and add some libraries inside.
But to compile I need to add header reference from arduino core and some from esp-idf ( https://docs.espressif.com/projects/esp ... explicitly )
Actually I made this by hand one by one in my CMakeLists.txt like that :
- idf_component_register(
- SRCS "libraries.cpp" PString/PString.cpp ESP32_BleSerial/BleSerial.cpp
- INCLUDE_DIRS "."
- INCLUDE_DIRS
- ../arduino/variants/alksesp32
- ../arduino/libraries/ArduinoOTA
- ../arduino/libraries/ArduinoOTA/src
- ../arduino/libraries/AsyncUDP
- ../arduino/libraries/AsyncUDP/src
- ../arduino/libraries/BLE
- ../arduino/libraries/BLE/src
- ../arduino/libraries/BluetoothSerial
- ../arduino/libraries/BluetoothSerial/src
- ../arduino/libraries/DNSServer
- ../arduino/libraries/DNSServer/src
- ../arduino/libraries/EEPROM
- ../arduino/libraries/EEPROM/src
- ../arduino/libraries/ESP32
- ../arduino/libraries/ESP32/src
- ../arduino/libraries/ESPmDNS
- ../../../../../../../../SysGCC/esp32/esp-idf/v5.1.4/components/esp_timer/src
- ../../../../../../../../SysGCC/esp32/esp-idf/v5.1.4/components/esp_timer/include
- (...)
- )
and all ../../../../../../../../SysGCC/esp32/esp-idf/v5.1.4/components/
..especially because I use ble and need to add all headers of esp-idf components bt (...esp-idf\v5.1.4\components\bt )
I read : https://docs.espressif.com/projects/esp ... ystem.html
but I didn't understand how to do that.. ( feel very stupid !!)
Could somebody show me ?
Thanks for help