You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
#!/bin/bash
|
|
|
|
# Shell wrapper for supporting installing with different backends for CMake < 3.13
|
|
|
|
|
|
|
|
# Collect arguments
|
|
|
|
__cmake_builddir="$(realpath $1)"
|
|
|
|
__cmake_destdir="$2"
|
|
|
|
|
|
|
|
if [ -f "${__cmake_builddir}/Makefile" ]; then
|
|
|
|
/usr/bin/make -C "${__cmake_builddir}" install DESTDIR="${__cmake_destdir}"
|
|
|
|
exit $?
|
|
|
|
elif [ -f "${__cmake_builddir}/build.ninja" ]; then
|
|
|
|
DESTDIR="${__cmake_destdir}" /usr/bin/ninja -C "${__cmake_builddir}" install -v
|
|
|
|
exit $?
|
|
|
|
else
|
|
|
|
echo "Unknown build format, exiting!"
|
|
|
|
exit 99
|
|
|
|
fi
|