What is the variable name for the projects directory?

Hi, I have my libraries placed in my default PIO projects dir and I am trying to link to them by using the project path variable.

So basically, right now i have this in my platformio.ini:
lib_deps =

(D:\PIO is where is set the default locations for my PIO projects)

Which works perfectly fine, but I don’t want to use an absolute path so i’m trying this:

lib_deps =

which doesn’t work, i tried various other variable names like ${PLATFORMIO_SETTING_PROJECTS_DIR} or ${env.projects_dir}, but I just can’t seem to find the right one, so what is the correct variable name that points to the projects directory?


Don’t try to guess variable names, try and reference them from the code.

There currently exists no built-in variable to get the default project directory (as output by pio settings get project_dir). Either use relative paths (e.g., if you always create your project in D:\PIO\<project name> you can use lib_deps = ../Libraries/MyLibrary) or open an issue at Issues · platformio/platformio-core · GitHub.