From 8fa646dbe2eba9674809042ff15e98f0eb1018d5 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Wed, 29 May 2019 16:56:49 +0200 Subject: Add basic support for compiling applications with qmake * Generate module .pri files * Generate qconfig.pri * Propagate MODULE_CONFIG from the .pro files This enables the basic use-case of simple application builds that for example use the moc. Omitted from the patch is support for private module configurations, prl files (should we do this?) and possibly more hidden gems that need to be implemented to for example support building Qt modules with qmake. Task-number: QTBUG-75666 Change-Id: Icbf0d9ccea4cd683e4c38340b9a2320bf7951d0d Reviewed-by: Qt CMake Build Bot Reviewed-by: Tobias Hunger --- util/cmake/pro2cmake.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'util') diff --git a/util/cmake/pro2cmake.py b/util/cmake/pro2cmake.py index 89bc844261..e2625af266 100755 --- a/util/cmake/pro2cmake.py +++ b/util/cmake/pro2cmake.py @@ -1575,6 +1575,10 @@ def write_module(cm_fh: typing.IO[str], scope: Scope, *, if 'no_module_headers' in scope.get('CONFIG'): extra.append('NO_MODULE_HEADERS') + module_config = scope.get("MODULE_CONFIG") + if len(module_config): + extra.append('QMAKE_MODULE_CONFIG {}'.format(" ".join(module_config))) + write_main_part(cm_fh, module_name[2:], 'Module', 'add_qt_module', scope, extra_lines=extra, indent=indent, known_libraries={}, extra_keys=[]) -- cgit v1.2.3