depot/third_party/nixpkgs/pkgs/development/tools/build-managers/meson/setup-hook.sh
Default email c594a97518 Project import generated by Copybara.
GitOrigin-RevId: 301aada7a64812853f2e2634a530ef5d34505048
2022-10-21 20:38:19 +02:00

37 lines
1.2 KiB
Bash
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

mesonConfigurePhase() {
runHook preConfigure
if [ -z "${dontAddPrefix-}" ]; then
mesonFlags="--prefix=$prefix $mesonFlags"
fi
# See multiple-outputs.sh and mesons coredata.py
mesonFlags="\
--libdir=${!outputLib}/lib --libexecdir=${!outputLib}/libexec \
--bindir=${!outputBin}/bin --sbindir=${!outputBin}/sbin \
--includedir=${!outputInclude}/include \
--mandir=${!outputMan}/share/man --infodir=${!outputInfo}/share/info \
--localedir=${!outputLib}/share/locale \
-Dauto_features=${mesonAutoFeatures:-enabled} \
-Dwrap_mode=${mesonWrapMode:-nodownload} \
$mesonFlags"
mesonFlags="${crossMesonFlags+$crossMesonFlags }--buildtype=${mesonBuildType:-plain} $mesonFlags"
echo "meson flags: $mesonFlags ${mesonFlagsArray[@]}"
meson setup build $mesonFlags "${mesonFlagsArray[@]}"
cd build
if ! [[ -v enableParallelBuilding ]]; then
enableParallelBuilding=1
echo "meson: enabled parallel building"
fi
runHook postConfigure
}
if [ -z "${dontUseMesonConfigure-}" -a -z "${configurePhase-}" ]; then
setOutputFlags=
configurePhase=mesonConfigurePhase
fi