aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/build-x86_64.sh
blob: b6de4d291bf0a0d4cd1a2ef08011110a0cc87b02 (plain)
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
#! /bin/sh

sdir=`dirname $(readlink -f $0)`
rootdir=`dirname $sdir`
logfile=`basename $0 .sh`.log
rm -f $logfile

export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64

doit() {
    echo rootdir $rootdir
    echo logfile $logfile

    cd $rootdir
    rm -rf dist-x86_64
    mkdir -p dist-x86_64/bin
    rm -rf build-x86_64
    mkdir -p build-x86_64
    cd build-x86_64
    cmake -DCMAKE_INSTALL_PREFIX=$rootdir/dist-x86_64 -DBUILDJAVA=ON -DBUILDEXAMPLES=ON -DBUILD_TESTING=ON ..
    #cmake -DCMAKE_INSTALL_PREFIX=$rootdir/dist-x86_64 -DBUILDJAVA=ON -DBUILDEXAMPLES=ON -DBUILD_TESTING=ON -DDEBUG=ON ..
    make
    make test
    make install
    cp -a examples/* $rootdir/dist-x86_64/bin

    cd $rootdir
}

doit 2>&1 | tee $logfile