Commit Graph

8 Commits

Author SHA1 Message Date
Joerg Bornemann
1ac947e3af Add missing -help argument to qt-configure-module
Now it's possible to display a configure help screen per module with
  qt-configure-module <module-source-dir> -help

Pick-to: 6.2
Fixes: QTBUG-95943
Change-Id: I7d26006246af4b38b5a2ec6deca3f45c5313afec
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-08-20 19:44:43 +02:00
Joerg Bornemann
57ad532e75 Fix our usage of CMake script mode in Windows configure
This is a preparation for adding the -help argument to
qt-configure-module.bat.

Consider the call
  qt-configure-module.bat path/to/qt-module -help
Internally, we called
  cmake ... -P .../QtWriteArgsFile.cmake path/to/qt-module -help
which was supposed to separate the arguments and write them into
config.opt.

However, passing arbitrary arguments after "-P script.cmake" only worked
by accident and is not supported.  As soon as arguments are passed that
are valid CMake arguments, like -help or -G, the CMake call would fail.

Now, we let configure.bat and qt-configure-module.bat write the
arguments as is into config.opt.in and let QtWriteArgsFile.cmake read
this file, separate the arguments and write config.opt.

Pick-to: 6.2
Task-number: QTBUG-95943
Change-Id: I80f298a2aaf55b0f79fed86320a055eb2d2b6faa
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-08-20 19:44:43 +02:00
Joerg Bornemann
2a29426e39 CMake: Fix argument passing for configure.bat / qt-configure-module.bat
Passing arguments with equal signs was broken for configure.bat and
qt-configure-module.bat. An argument FOO=BAR was split at = and written
as
    FOO
    BAR
to config.opt, breaking every attempt of assigning CMake variables.

We must not iterate over %* in batch files to avoid splitting arguments
at equal signs. Instead, pass %* unmodified to a CMake script that
writes config.opt.

Fixes: QTBUG-88019
Change-Id: I7c743a206961d1ed168f2313f864905f6b345b49
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-10-30 08:22:30 +01:00
Joerg Bornemann
de3bd64425 CMake: Prepare configure/qt-configure-module for calling more scripts
In a subsequent change we will call another CMake script from
qt-configure-module.bat. Write the location of qtbase/cmake into the
generated scripts instead of the path to QtProcessConfigureArgs.cmake.

Change-Id: Ie333b16d310b215c6e49efa27740c7525453d28f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-10-30 08:22:26 +01:00
Joerg Bornemann
115ead8fe4 CMake: Remove superfluous del call in qt-configure-module.bat
We're ensuring its existence right in the next line.

Change-Id: If7a55511c9ef839a9f9ae70a7928b58ad768ae65
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-10-22 20:47:10 +02:00
Joerg Bornemann
4c0ca7dd26 Allow paths with backslashes in qt-configure-module.bat
Fixes: QTBUG-87730
Change-Id: I93172062ec8dfd86529491ffb031edbd2e24592a
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2020-10-22 20:47:09 +02:00
Joerg Bornemann
dad9550305 CMake: Fix running qt-configure-module.bat without arguments
We need to make sure to create a config.opt file, even if it's empty.

Change-Id: If1e41cea2f3b5f3ce67f30285b77c58f7376546a
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2020-09-11 17:11:02 +02:00
Joerg Bornemann
457cf10f7e CMake: Introduce qt-configure-module
Add a convenience script to configure a Qt module separately.
This script reads and interprets the qt_cmdline.cmake files of the
Qt module to be configured and eventually calls qt-cmake-private.

Example usage:
<install-prefix>/bin/qt-configure-module <source-root>/qtdeclarative
  -qml-network -- --trace-expand --trace-redirect=cmake.trace

Change-Id: I026f1a050cd3f4df740611c32ba8c03161bba7a3
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-09-11 00:41:10 +02:00