comparison Resources/holy-build-box-internal.sh @ 224:8f30b077cdb8

compilation using holy-build-box
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 23 Jan 2020 18:59:52 +0100
parents
children 7097d0eaac76
comparison
equal deleted inserted replaced
223:c49107ed5af8 224:8f30b077cdb8
1 #!/bin/bash
2 set -e
3
4 # Activate Holy Build Box environment.
5 source /hbb_exe/activate
6
7 set -x
8
9 mkdir /tmp/build
10 cd /tmp/build
11
12 # Holy Build Box defines LDFLAGS as "-L/hbb_exe/lib
13 # -static-libstdc++". The "-L/hbb_exe/lib" option results in linking
14 # errors "undefined reference" to `std::__once_callable',
15 # 'std::__once_call' and '__once_proxy'.
16 export LDFLAGS=-static-libstdc++
17 unset LDPATHFLAGS
18 unset SHLIB_LDFLAGS
19 unset LD_LIBRARY_PATH
20 unset LIBRARY_PATH
21
22 mkdir /tmp/source-writeable
23
24 cp -r /source/CMakeLists.txt /tmp/source-writeable/
25 cp -r /source/Plugin /tmp/source-writeable/
26 cp -r /source/Resources /tmp/source-writeable/
27 cp -r /source/UnitTestsSources /tmp/source-writeable/
28 cp -r /source/WebApplication /tmp/source-writeable/
29
30 cmake /tmp/source-writeable \
31 -DCMAKE_BUILD_TYPE=$1 -DSTATIC_BUILD=ON \
32 -DORTHANC_FRAMEWORK_SOURCE=web \
33 -DORTHANC_FRAMEWORK_VERSION=1.5.8 \
34 -DCMAKE_INSTALL_PREFIX=/target
35
36 make -j`nproc`
37
38 if [ "$1" == "Release" ]; then
39 strip ./libOrthancWebViewer.so
40 fi
41
42 make install