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:
parent
c49c0928ed
commit
b80ce0aeca
@ -197,6 +197,7 @@ let
|
||||
qmake = makeSetupHook {
|
||||
deps = [ self.qtbase.dev ];
|
||||
substitutions = {
|
||||
inherit debug;
|
||||
fix_qmake_libtool = ../hooks/fix-qmake-libtool.sh;
|
||||
};
|
||||
} ../hooks/qmake-hook.sh;
|
||||
|
@ -199,6 +199,7 @@ let
|
||||
qmake = makeSetupHook {
|
||||
deps = [ self.qtbase.dev ];
|
||||
substitutions = {
|
||||
inherit debug;
|
||||
fix_qmake_libtool = ../hooks/fix-qmake-libtool.sh;
|
||||
};
|
||||
} ../hooks/qmake-hook.sh;
|
||||
|
@ -179,6 +179,7 @@ let
|
||||
qmake = makeSetupHook {
|
||||
deps = [ self.qtbase.dev ];
|
||||
substitutions = {
|
||||
inherit debug;
|
||||
fix_qmake_libtool = ../hooks/fix-qmake-libtool.sh;
|
||||
};
|
||||
} ../hooks/qmake-hook.sh;
|
||||
|
@ -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"
|
||||
|
||||
|
@ -9,9 +9,6 @@ args:
|
||||
let
|
||||
args_ = {
|
||||
|
||||
qmakeFlags = [ ("CONFIG+=" + (if debug then "debug" else "release")) ]
|
||||
++ (args.qmakeFlags or []);
|
||||
|
||||
NIX_CFLAGS_COMPILE = toString (
|
||||
optional (!debug) "-DQT_NO_DEBUG"
|
||||
++ lib.toList (args.NIX_CFLAGS_COMPILE or []));
|
||||
|
Loading…
Reference in New Issue
Block a user