Commit ceece2f7 authored by Volker Hilsheimer's avatar Volker Hilsheimer

Generate qmake/qt-cmake wrappers after building Qt

Convenient, and needed by the build-project job.
parent 2339760e
......@@ -9,6 +9,21 @@ if NOT DEFINED JOBDIR (
exit /B 1
)
goto :main
REM Creates a batch wrapper in ~/bin (which is in the PATH) for qmake or cmake
:link_tool
set "toolname=%~n1"
set "toolext=%~x1"
if EXIST "%CD%\qtbase\bin\%1" (
echo @echo off > %USERPROFILE%\bin\!toolname!.bat
echo SET PATH=%CD%\qtbase\bin;%%PATH%% >> %USERPROFILE%\bin\!toolname!.bat
echo %CD%\qtbase\bin\!toolname! "%%*" >> %USERPROFILE%\bin\!toolname!.bat
)
exit /B
:main
REM set defaults
if "!PARAM_build!"=="" SET "PARAM_build=qt-build"
SET "build_dir=!PARAM_build!"
......@@ -66,4 +81,7 @@ if exist build.ninja (
)
)
call :link_tool qmake.exe
call :link_tool qt-cmake.bat
exit /B %error%
......@@ -24,6 +24,17 @@ function search_highest
export CC=${PARAM_cc:-$(search_highest "$(which gcc || which clang)")}
export CXX=${PARAM_cxx:-$(search_highest "$(which g++ || which clang++)")}
# create a build tool wrapper script in ~
function link_tool
{
toolname="$1"
if [ -f "$PWD/qtbase/bin/${toolname}" ]
then
echo "$PWD/qtbase/bin/${toolname} \"\$@\"" > "$HOME/${toolname}"
chmod +x "$HOME/${toolname}"
fi
}
# set defaults
build_dir=${PARAM_build:-"qt-build"}
target=$PARAM_target
......@@ -78,4 +89,7 @@ else
>&2 echo "No build system generated, aborting"
fi
link_tool qmake
link_tool qt-cmake
exit $error
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment