diff options
Diffstat (limited to 'util')
-rwxr-xr-x | util/cmake/pro2cmake.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/util/cmake/pro2cmake.py b/util/cmake/pro2cmake.py index 80a10bd944..33b8ffb6c0 100755 --- a/util/cmake/pro2cmake.py +++ b/util/cmake/pro2cmake.py @@ -346,6 +346,7 @@ class Scope: c.dump(indent=indent + 1) def get(self, key: str, default=None) -> typing.List[str]: + assert key != '_INCLUDED' # Special case things that may not recurse! result = [] # type: typing.List[str] if self._parent: @@ -378,6 +379,12 @@ class Scope: return self.getString('TARGET') \ or os.path.splitext(os.path.basename(self.file()))[0] + def getIncludes(self) -> typing.List[str]: + result = [] + for op in self._operations.get('_INCLUDED', []): + result = op.process(result) + return result + class QmakeParser: def __init__(self, *, debug: bool = False) -> None: @@ -844,7 +851,7 @@ def generate_cmakelists(scope: Scope) -> None: def do_include(scope: Scope, *, debug: bool = False) -> None: - for i in scope.get('_INCLUDED', []): + for i in scope.getIncludes(): dir = scope.basedir() include_file = map_to_file(i, dir, scope.currentdir(), want_absolute_path=True) |