CMake: pro2cmake.py: Strip '-D' from compile options

Change-Id: I8239d36dc6af1b5eeded7f293dd6c151c10e289f
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This commit is contained in:
Tobias Hunger 2019-04-08 14:00:59 +02:00
parent 9d83b54015
commit 8c28c85465

View File

@ -982,6 +982,8 @@ def write_sources_section(cm_fh: typing.IO[str], scope: Scope, *,
if compile_options:
cm_fh.write('{} COMPILE_OPTIONS\n'.format(ind))
for co in compile_options:
if co.startswith('-D'):
co = co[2:]
cm_fh.write('{} "{}"\n'.format(ind, co))
link_options = scope.get('QMAKE_LFLAGS')