forked from platformio/platformio-core
Add "include" folder for project’s header files // Resolve issue #1107
This commit is contained in:
1 parent
0bd103a46d
commit
ca8bc3819f
5 files changed
+17
-3
No files matched your search
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user