2016-07-16 21:01:35 +01:00
|
|
|
qmakeConfigurePhase() {
|
|
|
|
runHook preConfigure
|
2016-04-17 00:22:45 +01:00
|
|
|
|
2016-07-16 21:01:35 +01:00
|
|
|
qmake PREFIX=$out $qmakeFlags
|
2016-04-17 00:22:45 +01:00
|
|
|
|
2016-07-16 21:01:35 +01:00
|
|
|
runHook postConfigure
|
2016-04-17 00:22:45 +01:00
|
|
|
}
|
|
|
|
|
2016-07-16 21:01:35 +01:00
|
|
|
if [ -z "$dontUseQmakeConfigure" -a -z "$configurePhase" ]; then
|
|
|
|
configurePhase=qmakeConfigurePhase
|
|
|
|
fi
|
2016-04-17 00:22:45 +01:00
|
|
|
|
2016-07-16 21:01:35 +01:00
|
|
|
_qtModuleMultioutDevsPre() {
|
2016-04-17 00:22:45 +01:00
|
|
|
# We cannot simply set these paths in configureFlags because libQtCore retains
|
|
|
|
# references to the paths it was built with.
|
|
|
|
moveToOutput "bin" "${!outputDev}"
|
|
|
|
moveToOutput "include" "${!outputDev}"
|
|
|
|
|
|
|
|
# The destination directory must exist or moveToOutput will do nothing
|
|
|
|
mkdir -p "${!outputDev}/share"
|
|
|
|
moveToOutput "share/doc" "${!outputDev}"
|
2016-07-16 21:01:35 +01:00
|
|
|
}
|
2016-04-26 20:20:32 +01:00
|
|
|
|
2016-07-16 21:01:35 +01:00
|
|
|
_qtModuleMultioutDevsPost() {
|
2017-05-17 20:25:42 +01:00
|
|
|
local -a findopts=(-name '*.a' -o -name '*.la')
|
|
|
|
if [ -z "@isDarwin@" ]; then
|
|
|
|
findopts+=(-o -name '*.prl')
|
|
|
|
fi
|
|
|
|
|
2016-04-26 20:20:32 +01:00
|
|
|
# Move libtool archives and qmake project files to $dev/lib
|
|
|
|
if [ "z${!outputLib}" != "z${!outputDev}" ]; then
|
|
|
|
pushd "${!outputLib}"
|
2016-05-04 11:58:02 +01:00
|
|
|
if [ -d "lib" ]; then
|
2017-05-17 20:25:42 +01:00
|
|
|
find lib \( "${findopts[@]}" \) -print0 | \
|
2016-05-04 11:58:02 +01:00
|
|
|
while read -r -d $'\0' file; do
|
|
|
|
mkdir -p "${!outputDev}/$(dirname "$file")"
|
|
|
|
mv "${!outputLib}/$file" "${!outputDev}/$file"
|
|
|
|
done
|
|
|
|
fi
|
2016-04-26 20:20:32 +01:00
|
|
|
popd
|
|
|
|
fi
|
2016-04-17 00:22:45 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
if [ -n "$NIX_QT_SUBMODULE" ]; then
|
2016-07-16 21:01:35 +01:00
|
|
|
preFixupHooks+=(_qtModuleMultioutDevsPre)
|
|
|
|
postFixupHooks+=(_qtModuleMultioutDevsPost)
|
2016-04-17 00:22:45 +01:00
|
|
|
fi
|