CMake: pro2cmake.py: Move defines from QMAKE_CXX_FLAGS into DEFINES
Change-Id: If3bfe715032b21dc046e63a79b0318a161d7a371 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This commit is contained in:
parent
3cf92ab183
commit
3bc9586e61
@ -996,6 +996,7 @@ def write_sources_section(cm_fh: typing.IO[str], scope: Scope, *,
|
||||
cm_fh.write('{} "{}"\n'.format(ind, '" "'.join(dbus_interface_flags)))
|
||||
|
||||
defines = scope.expand('DEFINES')
|
||||
defines += [d[2:] for d in scope.expand('QMAKE_CXXFLAGS') if d.startswith('-D')]
|
||||
if defines:
|
||||
cm_fh.write('{} DEFINES\n'.format(ind))
|
||||
for d in defines:
|
||||
@ -1015,12 +1016,10 @@ def write_sources_section(cm_fh: typing.IO[str], scope: Scope, *,
|
||||
['QT',],
|
||||
indent=indent, known_libraries=known_libraries)
|
||||
|
||||
compile_options = scope.get('QMAKE_CXXFLAGS')
|
||||
compile_options = [d for d in scope.expand('QMAKE_CXXFLAGS') if not d.startswith('-D')]
|
||||
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')
|
||||
|
Loading…
x
Reference in New Issue
Block a user