comparison Applications/Samples/Deprecated/build-wasm.sh @ 1347:bfd77672d825 broker

Moved Application/Samples/* to Application/Samples/Deprecated/*
author Benjamin Golinvaux <bgo@osimis.io>
date Tue, 07 Apr 2020 14:29:01 +0200
parents Applications/Samples/build-wasm.sh@f417a0ae282b
children
comparison
equal deleted inserted replaced
1346:df8bf351c23f 1347:bfd77672d825
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