qmake: Select debug or release build

The qmake hook sets its own `CONFIG+=debug` or `CONFIG+=release` depending on
how `qtbase` was built. We no longer rely on using the custom deriver for this
feature.
This commit is contained in:
Thomas Tuegel
2021-01-24 09:51:34 -06:00
parent c49c0928ed
commit b80ce0aeca
5 changed files with 14 additions and 4 deletions
@@ -3,6 +3,9 @@
qmakeFlags=( ${qmakeFlags-} )
qmakePrePhase() {
qmakeFlags_orig=( "${qmakeFlags[@]}" )
# These flags must be added _before_ the flags specified in the derivation.
qmakeFlags=( \
"PREFIX=$out" \
"NIX_OUTPUT_OUT=$out" \
@@ -11,8 +14,15 @@ qmakePrePhase() {
"NIX_OUTPUT_DOC=${!outputDev}/${qtDocPrefix:?}" \
"NIX_OUTPUT_QML=${!outputBin}/${qtQmlPrefix:?}" \
"NIX_OUTPUT_PLUGIN=${!outputBin}/${qtPluginPrefix:?}" \
"${qmakeFlags[@]}" \
)
if [ -n "@debug@" ]; then
qmakeFlags+=( "CONFIG+=debug" )
else
qmakeFlags+=( "CONFIG+=release" )
fi
qmakeFlags+=( "${qmakeFlags_orig[@]}" )
}
prePhases+=" qmakePrePhase"