9 Commits

Author SHA1 Message Date
Joerg Bornemann
12b0f73a9e CMake: Don't hard-code "libexec" in qt-configure-module
If INSTALL_LIBEXECDIR was set to something != "libexec",
qt-configure-module contained the wrong path to qt-cmake.

Fixes: QTBUG-128137
Pick-to: 6.5 6.7 6.8
Change-Id: Ic095ff8cb804bbdd72e238e75ac867b7cc3bd478
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-08-16 12:36:35 +02:00
Alexandru Croitor
85f37700e8 CMake: Generate a config.redo script in per-repo build dirs
Before we only generated a 'config.redo' script in the build dir of
qtbase or a top-level build. After this change, we will also generate
one when configuring repos in a per-repo build of qt.

This allows quick fresh reconfiguration of a repo, without having to
remember how it was configured before.

To make that happen, we need to duplicate parts of the '-redo' code
that was initially added in configure, into qt-configure-module, both
for the Unix and Windows scripts.

Slight adjustments had to be made to account for the source repo path
argument, that needs to be skipped from being added into the
config.opt.in file.

We also need to modify the code that generates the config.redo file to
do it at the start of each repo configuration, rather than just when
configuring qtbase.

Amends 8ffb6ce64cb0183bf6805497b398463549c1ed8d

Change-Id: I76cd5296ea23ca5bfef6b8975c82416b628bc5d1
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-07-30 16:12:19 +02:00
Luca Di Sera
3388de698b Do not assume FHS in scripts
On systems that do not follow the Filesystem Hierarchy Standard, such as
guix, the hardcoded `/bin/pwd` will fail to be found so that the script
will fail.

Use `pwd`, instead, so that the command can be found through the normal
path search mechanism.

Change-Id: Ib5480aeda5ca9d241286be6d1f95e9a0810476a8
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2024-06-25 11:44:00 +02:00
Amir Masoud Abdol
9773f0175c Return qt-configure-module to bin/
We agreed that qt-configure-module needs to come back to bin/ as it's
user-facing.

Amends d77ce33082516234fd7bbb5335401a1f3af8ca27

[ChangeLog][CMake] Upon further consideration, qt-configure-module
was deemed user-facing, and was thus moved back to ./bin on
all platforms.

Task-number: QTBUG-107621
Change-Id: I1f7874436e5b3988242091fc0303ea828f29d5c6
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-12-13 10:02:25 +00:00
David Skoland
a0ecc14f30 Minor fixes for qt-configure-module
Put quotes around args var and add e and u flags, which
do the following:

e - terminates the script if an error occurs. This is
certainly desirable behavior. We don't want the script to chug
along with unpredictable behavior if an error occurred.

u - terminates the script if an undefined variable is encountered.
It is also desirable to terminate here because it might lead to
unexpected behavior.

Change-Id: Ia02196ef3eab64521e36771530d033a15bb40ecc
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-06-27 17:55:19 +02:00
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
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
da9e22f029 CMake: Fix running qt-configure-module without arguments
We need to make sure to create a config.opt file, even if it's empty.
This is the same fix we did for the .bat file in
dad9550305831784f124c44d08e1e20983415bda.

Change-Id: I79c507cfe0f9517d3033a773d3a5cf69eb13cfe6
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-10-22 20:47:10 +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