Populate lib_dirs

pull/7183/head
Jimmy Brisson 2018-06-18 11:32:19 -05:00
parent 001c2d3b3b
commit d8ddfdc5a5
1 changed files with 10 additions and 0 deletions

View File

@ -431,6 +431,11 @@ class Resources(object):
".bld": FileType.BLD_REF,
}
_DIR_EXT = {
".a": FileType.LIB_DIR,
".ar": FileType.LIB_DIR,
}
def _add_file(self, file_path, base_path, into_path):
""" Add a single file into the resources object that was found by
scanning starting as base_path
@ -448,6 +453,11 @@ class Resources(object):
self.add_file_ref(file_type, fake_path, file_path)
except KeyError:
pass
try:
dir_type = self._DIR_EXT[ext.lower()]
self.add_file_ref(dir_type, dirname(fake_path), dirname(file_path))
except KeyError:
pass
def scan_with_toolchain(self, src_paths, toolchain, dependencies_paths=None,