summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmir Masoud Abdol <amir.abdol@qt.io>2023-06-06 14:09:02 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2023-06-07 23:32:34 +0000
commit760c9d6a6aabb669fc0aa79da109c58405aaff08 (patch)
tree2afe9734351a7438b55a712b50484943d7de8caf
parente14fe5f84843da3390bc13a8f057527fc2664e54 (diff)
Resolve an issue when running `/qt-configure-module .`v6.6.0-beta1
Accounting for the case where `MODULE_ROOT` is set to `.` which then makes the `get_filename_component` command to return an empty string; consequently, we cannot find the `config_file.txt`, and cannot process the features correctly. Amend f4bf7982a679312146546fabfb086e801c2bbc37 Fixes: QTBUG-114085 Change-Id: I55c7529be6caba4691adec80efca8021bd03c500 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 076b4bed9f418f97f9fb29fce4f948f0d98854c1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--cmake/QtProcessConfigureArgs.cmake5
1 files changed, 4 insertions, 1 deletions
diff --git a/cmake/QtProcessConfigureArgs.cmake b/cmake/QtProcessConfigureArgs.cmake
index 2bc0f71bd0..8dd72ca5ea 100644
--- a/cmake/QtProcessConfigureArgs.cmake
+++ b/cmake/QtProcessConfigureArgs.cmake
@@ -55,7 +55,10 @@ if("${MODULE_ROOT}" STREQUAL "")
set(qtbase_or_top_level_build TRUE)
else()
# If MODULE_ROOT is passed without drive letter, we try to add it to the path.
- get_filename_component(MODULE_ROOT "." REALPATH BASE_DIR "${MODULE_ROOT}")
+ # The check is necessary; otherwise, `get_filename_component` returns an empty string.
+ if(NOT MODULE_ROOT STREQUAL ".")
+ get_filename_component(MODULE_ROOT "." REALPATH BASE_DIR "${MODULE_ROOT}")
+ endif()
set(qtbase_or_top_level_build FALSE)
endif()
set(configure_filename "configure.cmake")