comparison StoneWebViewer/WebAssembly/docker-internal.sh @ 1495:fb74ed5d8c22

initial commit of the Stone Web viewer
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 25 Jun 2020 16:51:10 +0200
parents
children 15f2edef7e7c
comparison
equal deleted inserted replaced
1494:5a3ef478deb6 1495:fb74ed5d8c22
1 #!/bin/bash
2 set -ex
3
4 source /opt/emsdk/emsdk_env.sh
5
6 # Use a folder that is writeable by non-root users for the Emscripten cache
7 export EM_CACHE=/tmp/emscripten-cache
8
9 # Get the Orthanc framework
10 cd /tmp/
11 hg clone https://hg.orthanc-server.com/orthanc/
12
13 # Make a copy of the read-only folder containing the source code into
14 # a writeable folder, because of "DownloadPackage.cmake" that writes
15 # to the "ThirdPartyDownloads" folder next to the "CMakeLists.txt"
16 cd /source
17 hg clone /source /tmp/source-writeable
18
19 mkdir /tmp/build
20 cd /tmp/build
21
22 cmake /tmp/source-writeable/StoneWebViewer/WebAssembly \
23 -DCMAKE_BUILD_TYPE=$1 \
24 -DCMAKE_INSTALL_PREFIX=/target/StoneWebViewer \
25 -DCMAKE_TOOLCHAIN_FILE=${EMSDK}/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake \
26 -DORTHANC_FRAMEWORK_ROOT=/tmp/orthanc \
27 -DSTATIC_BUILD=ON \
28 -G Ninja
29
30 ninja -j2 install