CMake: pro2cmake.py: Fix handling of TEMPLATE=subdir .pro-files
Change-Id: I52f575df199c4d9b38123ab5d838f2e85344835d Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
This commit is contained in:
parent
8c04d6c967
commit
22dc78f417
@ -676,7 +676,6 @@ def map_condition(condition: str) -> str:
|
|||||||
|
|
||||||
def handle_subdir(scope: Scope, cm_fh: typing.IO[str], *,
|
def handle_subdir(scope: Scope, cm_fh: typing.IO[str], *,
|
||||||
indent: int = 0) -> None:
|
indent: int = 0) -> None:
|
||||||
assert scope.TEMPLATE == 'subdirs'
|
|
||||||
ind = ' ' * indent
|
ind = ' ' * indent
|
||||||
for sd in scope.get('SUBDIRS', []):
|
for sd in scope.get('SUBDIRS', []):
|
||||||
full_sd = os.path.join(scope.basedir, sd)
|
full_sd = os.path.join(scope.basedir, sd)
|
||||||
@ -697,7 +696,7 @@ def handle_subdir(scope: Scope, cm_fh: typing.IO[str], *,
|
|||||||
else:
|
else:
|
||||||
print(' XXXX: SUBDIR {} in {}: Not found.'.format(sd, scope))
|
print(' XXXX: SUBDIR {} in {}: Not found.'.format(sd, scope))
|
||||||
|
|
||||||
for c in scope.children():
|
for c in scope.children:
|
||||||
cond = c.condition
|
cond = c.condition
|
||||||
if cond == 'else':
|
if cond == 'else':
|
||||||
cm_fh.write('\n{}else()\n'.format(ind))
|
cm_fh.write('\n{}else()\n'.format(ind))
|
||||||
|
Loading…
Reference in New Issue
Block a user