qmake-hook.sh: qmakeFlags is an array

This commit is contained in:
Thomas Tuegel 2019-09-17 18:45:13 -05:00
parent e4e3419096
commit bddca5a91a
No known key found for this signature in database
GPG Key ID: 22CBF5249D4B4D59
2 changed files with 20 additions and 9 deletions

View File

@ -1,14 +1,25 @@
qmakeFlags=( $qmakeFlags )
qmakePrePhase() {
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:?}" \
"${qmakeFlags[@]}" \
)
}
prePhases+=" qmakePrePhase"
qmakeConfigurePhase() {
runHook preConfigure
qmake 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:?} \
$qmakeFlags
echo "QMAKEPATH=$QMAKEPATH"
echo qmake "${qmakeFlags[@]}"
qmake "${qmakeFlags[@]}"
if ! [[ -v enableParallelBuilding ]]; then
enableParallelBuilding=1

View File

@ -1 +1 @@
qmakeFlags="$qmakeFlags${qmakeFlags:+ }QMAKE_LRELEASE=@dev@/bin/lrelease"
qmakeFlags+=( "QMAKE_LRELEASE=@dev@/bin/lrelease" )