From 475ac94374f0b4bc7d63e7957f02a51b88ca17ee Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Wed, 13 Apr 2022 17:47:56 +0200 Subject: [PATCH] CMake: Fix no_prefix feature to take into account the staging prefix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Instead of complicating the condition even more, just use the value of QT_WILL_INSTALL which is determined in QtSetup before configure.cmake is loaded. The AUTODETECT part is needed to ensure that -developer-build implies -no-prefix. The CONDITION part is needed so that -extprefix /tmp/sysroot -no-prefix correctly errors out saying that this can't be a non-prefix build, unless -extprefix ${qtbase_build_dir} -no-prefix is passed. Pick-to: 6.2 6.3 Change-Id: Ie4f5a91281bf2fbe1bd0744de05d57f43fe992e7 Reviewed-by: Jörg Bornemann --- configure.cmake | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/configure.cmake b/configure.cmake index ffd79c7c3a1..af6568b370e 100644 --- a/configure.cmake +++ b/configure.cmake @@ -484,11 +484,8 @@ qt_feature("developer-build" PRIVATE ) qt_feature("no-prefix" PRIVATE LABEL "No prefix build" - # The var expansion on the right hand side is on purpose - # because the custom condition evaluator only expands the lhs - CONDITION (CMAKE_INSTALL_PREFIX STREQUAL "${QtBase_BINARY_DIR}") - OR CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT - AUTODETECT QT_FEATURE_developer_build + AUTODETECT NOT QT_WILL_INSTALL + CONDITION NOT QT_WILL_INSTALL ) qt_feature("private_tests" PRIVATE LABEL "Developer build: private_tests"