summaryrefslogtreecommitdiffstats
path: root/util/cmake
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@qt.io>2019-01-29 12:07:24 +0100
committerTobias Hunger <tobias.hunger@qt.io>2019-01-31 10:02:24 +0000
commit4d4bf61f9fbd10a48f43a99d43a667b0ac3323f0 (patch)
treeddb81e0552c19ed1ed02d28aea4ca692c6cd38c6 /util/cmake
parentf80a37dcca2d2ef4d238e248e3fb267e679317fd (diff)
CMake: pro2cmake.py: Convert more settings from .pro-file to CMake
Convert QMAKE_USE, QMAKE_CXX_FLAGS and QMAKE_LFLAGS into CMake. Change-Id: I53a5b91664b6ab71892d4381c00f8d744d7d7abd Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
Diffstat (limited to 'util/cmake')
-rwxr-xr-xutil/cmake/pro2cmake.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/util/cmake/pro2cmake.py b/util/cmake/pro2cmake.py
index 6aab8ddd70..fc5bda6854 100755
--- a/util/cmake/pro2cmake.py
+++ b/util/cmake/pro2cmake.py
@@ -708,7 +708,7 @@ def write_sources_section(cm_fh: typing.IO[str], scope: Scope, *,
if map_qt_library(q) not in known_libraries]
dependencies += [map_qt_library(q) for q in scope.get('QT_FOR_PRIVATE')
if map_qt_library(q) not in known_libraries]
- dependencies += scope.get('QMAKE_USE_PRIVATE') \
+ dependencies += scope.get('QMAKE_USE_PRIVATE') + scope.get('QMAKE_USE') \
+ scope.get('LIBS_PRIVATE') + scope.get('LIBS')
if dependencies:
cm_fh.write('{} LIBRARIES\n'.format(ind))
@@ -729,6 +729,18 @@ def write_sources_section(cm_fh: typing.IO[str], scope: Scope, *,
cm_fh.write('{} {}\n'.format(ind, d))
is_framework = False
+ compile_options = scope.get('QMAKE_CXXFLAGS')
+ if compile_options:
+ cm_fh.write('{} COMPILE_OPTIONS\n'.format(ind))
+ for co in compile_options:
+ cm_fh.write('{} "{}"\n'.format(ind, co))
+
+ link_options = scope.get('QMAKE_LFLAGS')
+ if link_options:
+ cm_fh.write('{} LINK_OPTIONS\n'.format(ind))
+ for lo in link_options:
+ cm_fh.write('{} "{}"\n'.format(ind, lo))
+
return set(scope.keys) - scope.visited_keys