forked from platformio/platformio-core
Add "include" folder for project’s header files // Resolve issue #1107
This commit is contained in:
@ -9,6 +9,9 @@ PlatformIO 3.0
|
||||
|
||||
* PIO Home
|
||||
* Integration with `Jenkins CI <http://docs.platformio.org/en/latest/ci/jenkins.html>`_
|
||||
* Added `include <http://docs.platformio.org/en/latest/projectconf/section_platformio.html#include-dir>`__
|
||||
folder for project's header files
|
||||
(`issue #1107 <https://github.com/platformio/platformio-core/issues/1107>`_)
|
||||
* Allowed to depend on development platform using VSC URL (Git, Mercurial and Subversion)
|
||||
in `Project Configuration File "platformio.ini" <http://docs.platformio.org/en/latest/projectconf/section_env_general.html#platform>`__
|
||||
Dropped support for ``*_stage`` dev/platforms. Use VCS URL instead.
|
||||
|
2
docs
2
docs
Submodule docs updated: 157c1c9300...8e95f0d989
@ -87,6 +87,7 @@ DEFAULT_ENV_OPTIONS = dict(
|
||||
UNIX_TIME=int(time()),
|
||||
PIOHOME_DIR=util.get_home_dir(),
|
||||
PROJECT_DIR=util.get_project_dir(),
|
||||
PROJECTINCLUDE_DIR=util.get_projectinclude_dir(),
|
||||
PROJECTSRC_DIR=util.get_projectsrc_dir(),
|
||||
PROJECTTEST_DIR=util.get_projecttest_dir(),
|
||||
PROJECTDATA_DIR=util.get_projectdata_dir(),
|
||||
|
@ -154,8 +154,8 @@ class LibBuilderBase(object):
|
||||
|
||||
def get_inc_dirs(self):
|
||||
items = [self.src_dir]
|
||||
if all([isdir(join(self.path, d)) for d in ("inc", "src")]):
|
||||
items.append(join(self.path, "inc"))
|
||||
if all([isdir(join(self.path, d)) for d in ("include", "src")]):
|
||||
items.append(join(self.path, "include"))
|
||||
return items
|
||||
|
||||
@property
|
||||
@ -613,6 +613,11 @@ class ProjectAsLibBuilder(LibBuilderBase):
|
||||
def src_dir(self):
|
||||
return self.env.subst("$PROJECTSRC_DIR")
|
||||
|
||||
def get_inc_dirs(self):
|
||||
inc_dirs = LibBuilderBase.get_inc_dirs(self)
|
||||
inc_dirs.append(self.env.subst("$PROJECTINCLUDE_DIR"))
|
||||
return inc_dirs
|
||||
|
||||
@property
|
||||
def lib_ldf_mode(self):
|
||||
mode = LibBuilderBase.lib_ldf_mode.fget(self)
|
||||
|
@ -296,6 +296,11 @@ def get_projectsrc_dir():
|
||||
return get_project_optional_dir("src_dir", join(get_project_dir(), "src"))
|
||||
|
||||
|
||||
def get_projectinclude_dir():
|
||||
return get_project_optional_dir("include_dir",
|
||||
join(get_project_dir(), "include"))
|
||||
|
||||
|
||||
def get_projecttest_dir():
|
||||
return get_project_optional_dir("test_dir", join(get_project_dir(),
|
||||
"test"))
|
||||
|
Reference in New Issue
Block a user