summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@gmail.com>2018-11-02 12:32:57 +0100
committerTobias Hunger <tobias.hunger@qt.io>2018-11-05 15:45:39 +0000
commit4769830034ee2cb503173229c79bd69042e4fffb (patch)
tree4bf185f165d4b932a1d555865be90edce2308c22 /util
parentcda5d06bd83141bef1b3caa10413d39598814b26 (diff)
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 <frederik.gladhorn@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'util')
-rwxr-xr-xutil/cmake/pro2cmake.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/util/cmake/pro2cmake.py b/util/cmake/pro2cmake.py
index 3053b36598..40043d15d5 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