From 4769830034ee2cb503173229c79bd69042e4fffb Mon Sep 17 00:00:00 2001 From: Tobias Hunger Date: Fri, 2 Nov 2018 12:32:57 +0100 Subject: [PATCH] pro2cmake.py: Do not try to add libraries that qmake substracts Add a comment that a library was removed when running into "QT -= gui" and similar lines. Change-Id: I17b7922827f228c6b45e1e6867fdc5e316af3781 Reviewed-by: Frederik Gladhorn Reviewed-by: Simon Hausmann --- util/cmake/pro2cmake.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/util/cmake/pro2cmake.py b/util/cmake/pro2cmake.py index 3053b365988..40043d15d54 100755 --- a/util/cmake/pro2cmake.py +++ b/util/cmake/pro2cmake.py @@ -522,7 +522,11 @@ def write_sources_section(cm_fh: IO[str], scope: Scope, *, indent: int=0, d = '${FW%s}' % d if d.startswith('-l'): d = d[2:] - d = substitute_libs(d) + + if d.startswith('-'): + d = '# Remove: {}'.format(d[1:]) + else: + d = substitute_libs(d) cm_fh.write('{} {}\n'.format(ind, d)) is_framework = False