diff options
-rwxr-xr-x | configure | 14 | ||||
-rw-r--r-- | configure.bat | 3 |
2 files changed, 12 insertions, 5 deletions
@@ -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 diff --git a/configure.bat b/configure.bat index f5f4a2b4cc..4bb78f9069 100644 --- a/configure.bat +++ b/configure.bat @@ -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" |