Skip to content

Commit

Permalink
CMake: Fix top-level configure
Browse files Browse the repository at this point in the history
The working directory for CMake must be the top-level build dir, not the
qtbase one.

Change-Id: I1090aca8bf2617719e724f96b1fa356eb9fabb46
Reviewed-by: Alexandru Croitor <[email protected]>
  • Loading branch information
jobor committed Jul 16, 2020
1 parent b2504af commit 044cb3c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
14 changes: 10 additions & 4 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -921,13 +921,19 @@ if [ "$BUILD_WITH_CMAKE" = "yes" ]; then
checkTopLevelBuild "$@"
getOptAndQMakeCmdLines "$@"
if [ -z "$optfile" ]; then # only write optfile if not currently redoing
optfile=${outpathPrefix}config.opt
if [ -f "$optfile" ]; then rm "$optfile"; fi
optfilename=config.opt
optfilepath=${outpathPrefix}${optfilename}
if [ -f "$optfilepath" ]; then rm "$optfilepath"; fi
for arg in "$@"; do
echo $arg >> "$optfile"
echo $arg >> "$optfilepath"
done
fi
cmake "-DOPTFILE=$optfile" -P "$relpath/cmake/QtProcessConfigureArgs.cmake"

if [ -n "$CFG_TOPLEVEL" ]; then
cd ..
fi

cmake "-DOPTFILE=$optfilename" -P "$relpath/cmake/QtProcessConfigureArgs.cmake"
else
findPerl
findAwk
Expand Down
3 changes: 2 additions & 1 deletion configure.bat
Original file line number Diff line number Diff line change
Expand Up @@ -315,4 +315,5 @@ if "%rargs%" == "" (
)

rem Launch CMake-based configure
cmake -DOPTFILE="%TOPQTDIR%\config.opt" -P "%QTSRC%\cmake\QtProcessConfigureArgs.cmake"
cd "%TOPQTDIR%"
cmake -DOPTFILE=config.opt -P "%QTSRC%\cmake\QtProcessConfigureArgs.cmake"

0 comments on commit 044cb3c

Please sign in to comment.