-
Notifications
You must be signed in to change notification settings - Fork 111
Expand file tree
/
Copy pathbuild_qt4.sh
More file actions
executable file
·42 lines (36 loc) · 847 Bytes
/
build_qt4.sh
File metadata and controls
executable file
·42 lines (36 loc) · 847 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/bash
echo "Trying to autobuild bearparser..."
#QT check
QT_VER=`qmake -v`
str=$QT_VER
substr="Qt version 4"
echo $QT_VER
if [[ $str == *"$substr"* ]]; then
echo "[+] Qt4 found!"
else
str2=`whereis qt4`
substr2="lib"
if [[ $str2 == *"$substr2"* ]]; then
echo "[+] Qt4 found!"
else
echo "Install Qt4 SDK first"
exit -1
fi
fi
CMAKE_VER=`cmake --version`
CMAKEV="cmake version"
if echo "$CMAKE_VER" | grep -q "$CMAKEV"; then
echo "[+] CMake found!"
else
echo "[-] CMake NOT found!"
echo "Install cmake first"
exit -1
fi
BUILD_DIR=build_qt4
rm build
mkdir $BUILD_DIR
echo "[+] build directory created"
ln -sf $BUILD_DIR build
cd $BUILD_DIR
cmake -G "CodeLite - Unix Makefiles" -DUSE_QT4=ON -DUSE_QT5=OFF -DCMAKE_INSTALL_PREFIX:PATH=$(pwd) ..
cmake --build . --target install