Mercurial > hg > orthanc-stone
comparison Applications/Samples/Deprecated/build-wasm.sh @ 1381:f4a06ad1580b
Branch broker is now the new default
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Wed, 22 Apr 2020 14:05:47 +0200 |
parents | bfd77672d825 |
children |
comparison
equal
deleted
inserted
replaced
1375:4431ffdcc2a4 | 1381:f4a06ad1580b |
---|---|
1 #!/bin/bash | |
2 # | |
3 # usage: | |
4 # to build all targets in Debug: | |
5 # ./build-wasm.sh | |
6 # | |
7 # to build a single target in release: | |
8 # ./build-wasm.sh OrthancStoneSingleFrameEditor Release | |
9 | |
10 set -e | |
11 | |
12 target=${1:-all} | |
13 buildType=${2:-Debug} | |
14 | |
15 currentDir=$(pwd) | |
16 samplesRootDir=$(pwd) | |
17 | |
18 mkdir -p $samplesRootDir/build-wasm | |
19 cd $samplesRootDir/build-wasm | |
20 | |
21 source ~/apps/emsdk/emsdk_env.sh | |
22 cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE=~/apps/emsdk/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake -DCMAKE_BUILD_TYPE=$buildType -DSTONE_SOURCES_DIR=$currentDir/../../../orthanc-stone -DORTHANC_FRAMEWORK_SOURCE=path -DORTHANC_FRAMEWORK_ROOT=$currentDir/../../../orthanc -DALLOW_DOWNLOADS=ON .. -DENABLE_WASM=ON | |
23 ninja $target | |
24 | |
25 echo "-- building the web application -- " | |
26 cd $currentDir | |
27 ./build-web.sh |