2019-09-18 21:19:31 +01:00
|
|
|
. @fix_qmake_libtool@
|
|
|
|
|
2019-11-08 00:39:03 +00:00
|
|
|
qmakeFlags=( ${qmakeFlags-} )
|
2019-09-18 00:45:13 +01:00
|
|
|
|
|
|
|
qmakePrePhase() {
|
2019-10-12 17:17:02 +01:00
|
|
|
qmakeFlags_orig=( "${qmakeFlags[@]}" )
|
|
|
|
|
|
|
|
# These flags must be added _before_ the flags specified in the derivation.
|
2019-09-18 00:45:13 +01:00
|
|
|
qmakeFlags=( \
|
|
|
|
"PREFIX=$out" \
|
|
|
|
"NIX_OUTPUT_OUT=$out" \
|
|
|
|
"NIX_OUTPUT_DEV=${!outputDev}" \
|
|
|
|
"NIX_OUTPUT_BIN=${!outputBin}" \
|
|
|
|
"NIX_OUTPUT_DOC=${!outputDev}/${qtDocPrefix:?}" \
|
|
|
|
"NIX_OUTPUT_QML=${!outputBin}/${qtQmlPrefix:?}" \
|
|
|
|
"NIX_OUTPUT_PLUGIN=${!outputBin}/${qtPluginPrefix:?}" \
|
|
|
|
)
|
2019-10-12 17:17:02 +01:00
|
|
|
|
|
|
|
if [ -n "@debug@" ]; then
|
|
|
|
qmakeFlags+=( "CONFIG+=debug" )
|
|
|
|
else
|
|
|
|
qmakeFlags+=( "CONFIG+=release" )
|
|
|
|
fi
|
|
|
|
|
|
|
|
qmakeFlags+=( "${qmakeFlags_orig[@]}" )
|
2019-09-18 00:45:13 +01:00
|
|
|
}
|
|
|
|
prePhases+=" qmakePrePhase"
|
|
|
|
|
2017-10-24 12:39:54 +01:00
|
|
|
qmakeConfigurePhase() {
|
|
|
|
runHook preConfigure
|
|
|
|
|
2019-09-18 00:45:13 +01:00
|
|
|
echo "QMAKEPATH=$QMAKEPATH"
|
|
|
|
echo qmake "${qmakeFlags[@]}"
|
|
|
|
qmake "${qmakeFlags[@]}"
|
2017-10-24 12:39:54 +01:00
|
|
|
|
2017-12-02 06:59:31 +00:00
|
|
|
if ! [[ -v enableParallelBuilding ]]; then
|
|
|
|
enableParallelBuilding=1
|
|
|
|
echo "qmake: enabled parallel building"
|
|
|
|
fi
|
|
|
|
|
2017-10-24 12:39:54 +01:00
|
|
|
runHook postConfigure
|
|
|
|
}
|
|
|
|
|
2019-10-31 17:59:18 +00:00
|
|
|
if [ -z "${dontUseQmakeConfigure-}" -a -z "${configurePhase-}" ]; then
|
2017-10-24 12:39:54 +01:00
|
|
|
configurePhase=qmakeConfigurePhase
|
|
|
|
fi
|