Project

General

Profile

qt5check.sh

Ulrich von der Ohe, 07 Oct 2022 15:25

 
1
#!/usr/bin/env sh
2

    
3
if ! qmake -v; then
4
    printf '%s\n' 'ERROR: qmake not found, cannot build Qt GUI' > /dev/stderr
5
    exit 1
6
fi
7

    
8
rm -f .qmake.stash qt5check qt5check-makefile qt5check.o
9

    
10
# DARWIN_OPTS as in src/CoCoA-5/make-c5makefile.sh:
11
if [ "$SYS_TYPE" = "Darwin" ]; then
12
    DARWIN_OPTS="-spec macx-g++"
13
fi
14

    
15
qmake $DARWIN_OPTS qt5check.pro
16
make --file=qt5check-makefile
17

    
18
if ! ./qt5check; then
19
    printf '%s\n' 'ERROR: Insufficient Qt5 system' > /dev/stderr
20
    exit 1
21
fi
22

    
23
rm -f .qmake.stash qt5check qt5check-makefile qt5check.o
24

    
25
printf '%s\n' 'qt5check finished successfully'