init-repository: Check for cmake

And bail out with proper warning if cmake is missing

Change-Id: I39a9e340f873f8de05264d57b2a80fb754b30fbe
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
This commit is contained in:
Fabian Kosmale
2024-03-25 09:03:50 +01:00
parent b1a9c94a19
commit 61dc233044

View File

@@ -10,6 +10,12 @@ script_dir_path=`(cd "$script_dir_path"; /bin/pwd)`
optfile=init-repository.opt
opttmpfile=init-repository.opt.in
# check whether cmake exists
if ! [ -x "$(command -v cmake)" ]; then
echo "Error: cmake was not found. You need to install it before configuring Qt."
exit 1
fi
# Posix compatible way to truncate file
: > "$optfile"
: > "$opttmpfile"