2025-07-04 22:14:51 +08:00
|
|
|
#!/bin/bash
|
|
|
|
|
current_user=$(whoami)
|
|
|
|
|
qt_path="/home/${current_user}/Qt5.14.2/5.14.2/gcc_64"
|
|
|
|
|
|
|
|
|
|
if [ -d "$qt_path" ]; then
|
|
|
|
|
echo "Found Qt directory: $qt_path"
|
|
|
|
|
|
2025-11-09 14:40:06 +08:00
|
|
|
cmake -B../build -S../ -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$qt_path" -DQT_DEFAULT_MAJOR_VERSION=5 -DCOMPILE_GUI=ON -DRELEASE_MARK=ON
|
2025-07-06 23:51:45 +08:00
|
|
|
cmake --build ../build --config Release
|
|
|
|
|
|
2025-07-04 22:14:51 +08:00
|
|
|
if [ $? -eq 0 ]; then
|
2025-07-06 23:51:45 +08:00
|
|
|
echo "cmake command executed successfully"
|
2025-07-04 22:14:51 +08:00
|
|
|
else
|
2025-07-06 23:51:45 +08:00
|
|
|
echo "cmake command failed"
|
2025-07-04 22:14:51 +08:00
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
else
|
|
|
|
|
echo "Error: Qt directory not found - $qt_path"
|
|
|
|
|
echo "Please ensure Qt5.14.2 is properly installed in the default location"
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|