diff options
author | Tobias Hunger <tobias.hunger@qt.io> | 2019-02-13 09:13:37 +0100 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@qt.io> | 2019-02-27 16:03:07 +0000 |
commit | 22dc78f41749d76df38ef1e17d6dc8c272d7cab0 (patch) | |
tree | 83c71c55c8018cca9977f9cf0fb0517c5ebd4cc4 /util | |
parent | 8c04d6c967b33a311fe17e69e9c5e2289a2fcd14 (diff) |
CMake: pro2cmake.py: Fix handling of TEMPLATE=subdir .pro-files
Change-Id: I52f575df199c4d9b38123ab5d838f2e85344835d
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
Diffstat (limited to 'util')
-rwxr-xr-x | util/cmake/pro2cmake.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/util/cmake/pro2cmake.py b/util/cmake/pro2cmake.py index 60e7f433bf..1d48d2ba58 100755 --- a/util/cmake/pro2cmake.py +++ b/util/cmake/pro2cmake.py @@ -676,7 +676,6 @@ def map_condition(condition: str) -> str: def handle_subdir(scope: Scope, cm_fh: typing.IO[str], *, indent: int = 0) -> None: - assert scope.TEMPLATE == 'subdirs' ind = ' ' * indent for sd in scope.get('SUBDIRS', []): full_sd = os.path.join(scope.basedir, sd) @@ -697,7 +696,7 @@ def handle_subdir(scope: Scope, cm_fh: typing.IO[str], *, else: print(' XXXX: SUBDIR {} in {}: Not found.'.format(sd, scope)) - for c in scope.children(): + for c in scope.children: cond = c.condition if cond == 'else': cm_fh.write('\n{}else()\n'.format(ind)) |