Mercurial > hg > orthanc-stone
comparison Applications/Samples/build-wasm.sh @ 518:40bb5eb247a5 bgo-commands-codegen
Reverted a couple of files to AM version (wrong changes on my end)
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Tue, 12 Mar 2019 09:19:06 +0100 |
parents | 801d2697a1b1 |
children | f417a0ae282b |
comparison
equal
deleted
inserted
replaced
517:64ee3033e1ca | 518:40bb5eb247a5 |
---|---|
1 #!/bin/bash | 1 #!/bin/bash |
2 # | 2 # |
3 # usage: | 3 # usage: |
4 # to build all targets: | 4 # to build all targets in Debug: |
5 # ./build-wasm.sh | 5 # ./build-wasm.sh |
6 # | 6 # |
7 # to build a single target: | 7 # to build a single target in release: |
8 # ./build-wasm.sh OrthancStoneSingleFrameEditor | 8 # ./build-wasm.sh OrthancStoneSingleFrameEditor Release |
9 | 9 |
10 set -e | 10 set -e |
11 | 11 |
12 target=${1:-all} | 12 target=${1:-all} |
13 buildType=${2:-Debug} | |
13 | 14 |
14 currentDir=$(pwd) | 15 currentDir=$(pwd) |
15 samplesRootDir=$(pwd) | 16 samplesRootDir=$(pwd) |
16 | 17 |
17 mkdir -p $samplesRootDir/build-wasm | 18 mkdir -p $samplesRootDir/build-wasm |
18 cd $samplesRootDir/build-wasm | 19 cd $samplesRootDir/build-wasm |
19 | 20 |
20 source ~/apps/emsdk/emsdk_env.sh | 21 source ~/apps/emsdk/emsdk_env.sh |
21 cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE=${EMSCRIPTEN}/cmake/Modules/Platform/Emscripten.cmake \ | 22 cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE=${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 |
22 -DCMAKE_BUILD_TYPE=Release \ | |
23 -DSTONE_SOURCES_DIR=$currentDir/../../../orthanc-stone \ | |
24 -DORTHANC_FRAMEWORK_SOURCE=path \ | |
25 -DORTHANC_FRAMEWORK_ROOT=$currentDir/../../../orthanc \ | |
26 -DALLOW_DOWNLOADS=ON .. \ | |
27 -DENABLE_WASM=ON | |
28 | |
29 ninja $target | 23 ninja $target |
30 | 24 |
31 echo "-- building the web application -- " | 25 echo "-- building the web application -- " |
32 cd $currentDir | 26 cd $currentDir |
33 ./build-web.sh | 27 ./build-web.sh |