forked from platformio/platformio-core
Use a root of library when filtering source code using library.json and srcFilter field
This commit is contained in:
@@ -521,6 +521,15 @@ class PlatformIOLibBuilder(LibBuilderBase):
|
||||
def _is_arduino_manifest(self):
|
||||
return isfile(join(self.path, "library.properties"))
|
||||
|
||||
@property
|
||||
def src_dir(self):
|
||||
if all([
|
||||
"srcFilter" in self._manifest.get("build", {}) or
|
||||
self.env['SRC_FILTER'], not self._is_arduino_manifest()
|
||||
]):
|
||||
return self.path
|
||||
return LibBuilderBase.src_dir.fget(self)
|
||||
|
||||
@property
|
||||
def src_filter(self):
|
||||
if "srcFilter" in self._manifest.get("build", {}):
|
||||
|
Reference in New Issue
Block a user