Skip to content

Commit

Permalink
Resolve an issue when running /qt-configure-module .
Browse files Browse the repository at this point in the history
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 f4bf798

Fixes: QTBUG-114085
Change-Id: I55c7529be6caba4691adec80efca8021bd03c500
Reviewed-by: Alexandru Croitor <[email protected]>
(cherry picked from commit 076b4be)
Reviewed-by: Qt Cherry-pick Bot <[email protected]>
  • Loading branch information
amirmasoudabdol authored and Qt Cherry-pick Bot committed Jun 7, 2023
1 parent e14fe5f commit 760c9d6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmake/QtProcessConfigureArgs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 760c9d6

Please sign in to comment.