linux_xanmod: 5.11.14 -> 5.11.15
[NixPkgs.git] / pkgs / development / libraries / qt-5 / hooks / qmake-hook.sh
blob741225a5aa810112657942877dc9a60b9619d78a
1 . @fix_qmake_libtool@
3 qmakeFlags=( ${qmakeFlags-} )
5 qmakePrePhase() {
6 qmakeFlags_orig=( "${qmakeFlags[@]}" )
8 # These flags must be added _before_ the flags specified in the derivation.
9 qmakeFlags=( \
10 "PREFIX=$out" \
11 "NIX_OUTPUT_OUT=$out" \
12 "NIX_OUTPUT_DEV=${!outputDev}" \
13 "NIX_OUTPUT_BIN=${!outputBin}" \
14 "NIX_OUTPUT_DOC=${!outputDev}/${qtDocPrefix:?}" \
15 "NIX_OUTPUT_QML=${!outputBin}/${qtQmlPrefix:?}" \
16 "NIX_OUTPUT_PLUGIN=${!outputBin}/${qtPluginPrefix:?}" \
19 if [ -n "@debug@" ]; then
20 qmakeFlags+=( "CONFIG+=debug" )
21 else
22 qmakeFlags+=( "CONFIG+=release" )
25 qmakeFlags+=( "${qmakeFlags_orig[@]}" )
27 prePhases+=" qmakePrePhase"
29 qmakeConfigurePhase() {
30 runHook preConfigure
32 echo "QMAKEPATH=$QMAKEPATH"
33 echo qmake "${qmakeFlags[@]}"
34 qmake "${qmakeFlags[@]}"
36 if ! [[ -v enableParallelBuilding ]]; then
37 enableParallelBuilding=1
38 echo "qmake: enabled parallel building"
41 runHook postConfigure
44 if [ -z "${dontUseQmakeConfigure-}" -a -z "${configurePhase-}" ]; then
45 configurePhase=qmakeConfigurePhase