Search code examples
cmakebuildesp32esp-idfkconfig

Change default location of sdkconfig file


The project is based on ESP-IDF v4. It can be built for several platforms.

Currently I'm trying to enable full out-of-source build approach and sdkconfig is the only auto-generated file that remains in the source tree. By default it is saved in the root directory of a cmake project.

Is there any way to change the default location of sdkconfig file?


Solution

  • You can use the SDKCONFIG variable to set the path you need.

    Set it in your CMakeLists.txt file like this :

    set(SDKCONFIG "C:/path/to/your/folder/sdkconfig")