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:
@@ -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"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user