depot/third_party/nixpkgs/pkgs/development/libraries/qt-6/hooks/qmake-hook.sh
Default email ae2dc6aea6 Project import generated by Copybara.
GitOrigin-RevId: 4c2fcb090b1f3e5b47eaa7bd33913b574a11e0a0
2024-10-11 07:15:48 +02:00

43 lines
1.2 KiB
Bash

. @fix_qmake_libtool@
qmakePrePhase() {
# These flags must be added _before_ the flags specified in the derivation.
# TODO: these flags also need a patch which isn't applied
# can we either remove these flags or update the qt5 patch?
# "NIX_OUTPUT_DOC=${!outputDev}/${qtDocPrefix:?}" \
prependToVar qmakeFlags \
"PREFIX=$out" \
"NIX_OUTPUT_OUT=$out" \
"NIX_OUTPUT_DEV=${!outputDev}" \
"NIX_OUTPUT_BIN=${!outputBin}" \
"NIX_OUTPUT_QML=${!outputBin}/${qtQmlPrefix:?}" \
"NIX_OUTPUT_PLUGIN=${!outputBin}/${qtPluginPrefix:?}"
}
appendToVar prePhases qmakePrePhase
qmakeConfigurePhase() {
runHook preConfigure
local flagsArray=()
concatTo flagsArray qmakeFlags
echo "QMAKEPATH=$QMAKEPATH"
echo qmake "${flagsArray[@]}"
qmake "${flagsArray[@]}"
if ! [[ -v enableParallelBuilding ]]; then
enableParallelBuilding=1
echo "qmake: enabled parallel building"
fi
if ! [[ -v enableParallelInstalling ]]; then
enableParallelInstalling=1
echo "qmake: enabled parallel installing"
fi
runHook postConfigure
}
if [ -z "${dontUseQmakeConfigure-}" -a -z "${configurePhase-}" ]; then
configurePhase=qmakeConfigurePhase
fi