abinfo "Determining LLVM installation directory ..."
_LLVMDIR=$(realpath /usr/bin/clang)
_LLVMDIR=$(dirname "$_LLVMDIR")
_LLVMDIR=$(realpath "$_LLVMDIR"/..)

if [ ! -x "$_LLVMDIR"/bin/clang ] ; then
	abdie "Expecting a LLVM installation at $_LLVMDIR, but we can't find one!"
fi

# Let CMake (or, the CMake scripts from PySide6) use the correct LLVM version.
abinfo "Setting the correct path of LLVM installation ..."
export CLANG_INSTALL_DIR="$_LLVMDIR"

# One of the build stages makes use of shiboken module.
# Make sure the build sysem uses the just-built modules instead of searching
# from the system site-packages.
abinfo "Adding path to the built modules in BLDDIR to PYTHONPATH ..."
export PYTHONPATH="$BLDDIR"/sources
