nixpkgs/pkgs/development/tools/build-managers/meson/setup-hook.sh
Lukas Werling f0a1ab78b4 meson/ninja: add setup hooks (#28444)
* Add setupHook for meson/ninja build

* libhttpseverywhere: Use meson/ninja setupHooks

* jamomacore: Remove superfluous ninja buildInput

* Remove obsolete ninja buildPhases

These are all handled by ninja's setup hook.

* lean2, xcbuild: fix build with ninja setup hook

Ninja is a runtime dependency here. However, cmake can generate Ninja
build files as well to satisfy the setup hook.

* qtwebengine: fix build with ninja setup hook
2017-08-27 19:42:21 +02:00

23 lines
527 B
Bash

mesonConfigurePhase() {
runHook preConfigure
if [ -z "$dontAddPrefix" ]; then
mesonFlags="--prefix=$prefix $mesonFlags"
fi
# Build release by default.
mesonFlags="--buildtype=${mesonBuildType:-release} $mesonFlags"
echo "meson flags: $mesonFlags ${mesonFlagsArray[@]}"
meson build $mesonFlags "${mesonFlagsArray[@]}"
cd build
runHook postConfigure
}
if [ -z "$dontUseMesonConfigure" -a -z "$configurePhase" ]; then
setOutputFlags=
configurePhase=mesonConfigurePhase
fi