CLion: Add paths to libraries specified via lib_extra_dirs option (#3463)

* Add paths to libraries specified via lib_extra_dirs option

Besides, global folders in SRC_LIST seem a bit unnecessary
since there might be unused libraries in these folders

* Refactor processing of includes when exporting IDE/Editor projects

Split includes according to their source. That will help export includes in a more flexible way.
For example some IDEs don't need include paths from toolchains

* Add new record to history log

* Typo fix
This commit is contained in:
Valerii Koval authored and GitHub committed 2020-04-21 17:37:55 +03:00
1 parent 2960b73da5
commit 24c04057e9
17 files changed
+87 -72

No files matched your search

+16 -1
View File
@@ -57,6 +57,20 @@ class ProjectGenerator(object):
return envname
@staticmethod
def filter_includes(includes_map, ignore_scopes=None, to_unix_path=True):
ignore_scopes = ignore_scopes or []
result = []
for scope, includes in includes_map.items():
if scope in ignore_scopes:
continue
for include in includes:
if to_unix_path:
include = fs.to_unix_path(include)
if include not in result:
result.append(include)
return result
def _load_tplvars(self):
tpl_vars = {
"config": self.config,
@@ -92,12 +106,13 @@ class ProjectGenerator(object):
for key, value in tpl_vars.items():
if key.endswith(("_path", "_dir")):
tpl_vars[key] = fs.to_unix_path(value)
for key in ("includes", "src_files", "libsource_dirs"):
for key in ("src_files", "libsource_dirs"):
if key not in tpl_vars:
continue
tpl_vars[key] = [fs.to_unix_path(inc) for inc in tpl_vars[key]]
tpl_vars["to_unix_path"] = fs.to_unix_path
tpl_vars["filter_includes"] = self.filter_includes
return tpl_vars
def get_src_files(self):