Handle "dependencies" from library and project when build libraries // Issue #709

This commit is contained in:
Ivan Kravets
2016-07-31 00:00:58 +03:00
parent b364389541
commit 74af8a5c39
4 changed files with 108 additions and 36 deletions
+9 -4
View File
@@ -39,10 +39,15 @@ How works Library Dependency Finder (LDF)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Library Dependency Finder is a part of PlatformIO Library Build System. It
operates with the header files (``*.h, *.hpp``) and looks for
``#include <...>`` directives. What is more, LDF interprets C Preprocessor
conditional macros (``#ifdef ...``, etc.). Library Dependency Finder starts
work from analyzing source files from :ref:`projectconf_pio_src_dir`.
operates with the C/C++ source files and looks for ``#include <...>``
directives. Also, LDF interprets C Preprocessor conditional macros
(``#if``, ``ifdef``, etc.). Library Dependency Finder starts
work from analyzing source files from :ref:`projectconf_pio_src_dir` by default.
If project or library contains own ``dependencies`` list (see
:ref:`libjson_dependencies`), the LDF will not looking for dependencies in
the source code. The specified libraries will be built automatically without
check.
There are different library storages where Library Dependency Finder looks for
dependencies. These storages/folders have priority. LDF operates in the next
+15 -1
View File
@@ -381,6 +381,7 @@ A list of dependent libraries. They will be installed automatically with
Allowed requirements for dependent library:
* ``name`` | Type: ``String``
* ``version`` | Type: ``String``
* ``authors`` | Type: ``String`` or ``Array``
* ``frameworks`` | Type: ``String`` or ``Array``
* ``platforms`` | Type: ``String`` or ``Array``
@@ -401,10 +402,23 @@ Example:
},
{
"name": "Library-Bar",
"frameworks": "FrameworkFoo, FrameworkBar"
"version": "~1.2.3"
},
{
"name": "lib-from-repo",
"version": "https://github.com/user/package.git#1.2.3"
}
]
A short definition of dependencies is allowed:
.. code-block:: javascript
"dependencies": {
"mylib": "1.2.3",
"lib-from-repo": "githubuser/package"
}
See more ``library.json`` :ref:`library_creating_examples`.