Add src_dir option to [platformio] section of platformio.ini which allows to redefine location to project’s source directory // Resolve #83

This commit is contained in:
Ivan Kravets
2015-02-22 22:24:22 +02:00
parent e17ce83499
commit 46ae4c1a83
9 changed files with 125 additions and 23 deletions

View File

@@ -19,6 +19,12 @@ The sections and their allowable values are described below.
A ``platformio`` section is used for overriding default configuration options
.. note::
Relative path is allowed for directory option:
* ``~`` will be expanded to user's home directory
* ``../`` or ``..\`` go up to one folder
Options
~~~~~~~
@@ -33,15 +39,27 @@ external libraries, service data and etc.
A default value is user's home directory: *Unix* - ``~/.platformio``,
Windows - ``%HOMEPATH%\.platformio``.
``lib_dir``
^^^^^^^^^^^^
^^^^^^^^^^^
This directory is used to store external libraries downloaded by
:ref:`librarymanager`.
A default value is ``$PIO_HOME_DIR/lib``.
``src_dir``
^^^^^^^^^^^
The path to project's source directory. PlatformIO uses it for :ref:`cmd_run`
command.
A default value is ``$PROJECT_DIR/src``.
.. note::
This option is useful for people who migrate from Arduino/Energia IDEs where
source directory should have the same name like the main source file.
See `example <https://github.com/ivankravets/platformio/tree/develop/examples/atmelavr-and-arduino/arduino-own-src_dir>`__ project with own source directory.
[env:NAME]
----------