diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2022-02-22 18:51:16 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-02-25 14:21:43 +0000 |
commit | ceaea83fbdc896b3aed780e39fb26bd3dbc9acb6 (patch) | |
tree | 7348c6a0467837b142400209146331ae0b18cf5f /qt_cmdline.cmake | |
parent | bcaa0fc0ec3829e36eeebab8e4cf19611c9fb8c2 (diff) |
configure: CMake: Add -no-prefix option
Introduce a new -no-prefix option that can be used to build Qt without
having to install it.
Currently, -no-prefix is already implied by -developer-build, but
-developer-build also implies -warnings-are-errors and
-feature-private-tests, which not everyone might want to use.
Some Qt builders likely use -developer-build for the no-prefix
behavior, hence we introduce a standalone -no-prefix option to offer
a nicer user experience without -Werror and friends.
Previously it was possible to achieve the same by specifying
-prefix $PWD, but that relies on $PWD expanding property in the used
shell.
The new -no-prefix doesn't depend on the type of the shell and
is shorter to type.
Internally this gets passed by configure as -DINPUT_no_prefix=yes to
CMake, and transformed into a -DQT_FEATURE_no_prefix=ON feature.
The feature also gets automatically auto-detected to ON if
developer-build is set, -prefix is either unset or $PWD.
CMake code should still query QT_WILL_INSTALL to decide whether
files need to be installed or not.
As a drive-by, we now also export QT_FEATURE_developer_build to
be available for querying during configuration of other repos
(previously it was only possible to query FEATURE_developer_build).
Change-Id: Iaa6c8d8ae2b736282e9949d2a5d7f412e290a253
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
(cherry picked from commit 32b596b7b10eac63293cf3bd3e04a15bd826fbf1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'qt_cmdline.cmake')
-rw-r--r-- | qt_cmdline.cmake | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/qt_cmdline.cmake b/qt_cmdline.cmake index 737cd9710b..d5774bb14c 100644 --- a/qt_cmdline.cmake +++ b/qt_cmdline.cmake @@ -8,6 +8,8 @@ qt_commandline_subconfig(src/printsupport) qt_commandline_subconfig(src/plugins/sqldrivers) qt_commandline_subconfig(src/testlib) qt_commandline_subconfig(src/tools) +# no-prefix needs to be placed before prefix +qt_commandline_option(no-prefix TYPE void) qt_commandline_option(prefix TYPE string) qt_commandline_option(extprefix TYPE string) qt_commandline_option(archdatadir TYPE string) |