Mercurial > hg > orthanc-webviewer
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Resources/holy-build-box-internal.sh Thu Jan 23 18:59:52 2020 +0100 @@ -0,0 +1,42 @@ +#!/bin/bash +set -e + +# Activate Holy Build Box environment. +source /hbb_exe/activate + +set -x + +mkdir /tmp/build +cd /tmp/build + +# Holy Build Box defines LDFLAGS as "-L/hbb_exe/lib +# -static-libstdc++". The "-L/hbb_exe/lib" option results in linking +# errors "undefined reference" to `std::__once_callable', +# 'std::__once_call' and '__once_proxy'. +export LDFLAGS=-static-libstdc++ +unset LDPATHFLAGS +unset SHLIB_LDFLAGS +unset LD_LIBRARY_PATH +unset LIBRARY_PATH + +mkdir /tmp/source-writeable + +cp -r /source/CMakeLists.txt /tmp/source-writeable/ +cp -r /source/Plugin /tmp/source-writeable/ +cp -r /source/Resources /tmp/source-writeable/ +cp -r /source/UnitTestsSources /tmp/source-writeable/ +cp -r /source/WebApplication /tmp/source-writeable/ + +cmake /tmp/source-writeable \ + -DCMAKE_BUILD_TYPE=$1 -DSTATIC_BUILD=ON \ + -DORTHANC_FRAMEWORK_SOURCE=web \ + -DORTHANC_FRAMEWORK_VERSION=1.5.8 \ + -DCMAKE_INSTALL_PREFIX=/target + +make -j`nproc` + +if [ "$1" == "Release" ]; then + strip ./libOrthancWebViewer.so +fi + +make install