termux-packages/scripts/build/configure/termux_step_configure.sh
Henrik Grimler 12e395d3a9 step_configure_cmake: mv cmake and ninja setup functions to step_configure
Only keep actual configure steps in termux_step_configure_cmake. This
way we can skip termux_step_configure_cmake on a continued build.
2021-08-24 21:40:46 +02:00

30 lines
930 B
Bash

termux_step_configure() {
[ "$TERMUX_PKG_METAPACKAGE" = "true" ] && return
if [ "$TERMUX_PKG_FORCE_CMAKE" = "false" ] && [ -f "$TERMUX_PKG_SRCDIR/configure" ]; then
if [ "$TERMUX_CONTINUE_BUILD" == "true" ]; then
return;
fi
termux_step_configure_autotools
elif [ "$TERMUX_PKG_FORCE_CMAKE" = "true" ] || [ -f "$TERMUX_PKG_SRCDIR/CMakeLists.txt" ]; then
termux_setup_cmake
if [ "$TERMUX_CMAKE_BUILD" = Ninja ]; then
termux_setup_ninja
fi
# Some packages, for example swift, uses cmake
# internally, but cannot be configured with our
# termux_step_configure_cmake function (CMakeLists.txt
# is not in src dir)
if [ -f "$TERMUX_PKG_SRCDIR/CMakeLists.txt" ] && \
[ "$TERMUX_CONTINUE_BUILD" == "false" ]; then
termux_step_configure_cmake
fi
elif [ -f "$TERMUX_PKG_SRCDIR/meson.build" ]; then
if [ "$TERMUX_CONTINUE_BUILD" == "true" ]; then
return;
fi
termux_step_configure_meson
fi
}