annotate Applications/Samples/build-wasm.sh.old @ 585:b9ce24c606ae

TextSceneLayer
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 19 Apr 2019 17:57:58 +0200
parents 40bb5eb247a5
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
518
40bb5eb247a5 Reverted a couple of files to AM version (wrong changes on my end)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
1 #!/bin/bash
40bb5eb247a5 Reverted a couple of files to AM version (wrong changes on my end)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
2 #
40bb5eb247a5 Reverted a couple of files to AM version (wrong changes on my end)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
3 # usage:
40bb5eb247a5 Reverted a couple of files to AM version (wrong changes on my end)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
4 # to build all targets:
40bb5eb247a5 Reverted a couple of files to AM version (wrong changes on my end)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
5 # ./build-wasm.sh
40bb5eb247a5 Reverted a couple of files to AM version (wrong changes on my end)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
6 #
40bb5eb247a5 Reverted a couple of files to AM version (wrong changes on my end)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
7 # to build a single target:
40bb5eb247a5 Reverted a couple of files to AM version (wrong changes on my end)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
8 # ./build-wasm.sh OrthancStoneSingleFrameEditor
40bb5eb247a5 Reverted a couple of files to AM version (wrong changes on my end)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
9
40bb5eb247a5 Reverted a couple of files to AM version (wrong changes on my end)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
10 set -e
40bb5eb247a5 Reverted a couple of files to AM version (wrong changes on my end)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
11
40bb5eb247a5 Reverted a couple of files to AM version (wrong changes on my end)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
12 target=${1:-all}
40bb5eb247a5 Reverted a couple of files to AM version (wrong changes on my end)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
13
40bb5eb247a5 Reverted a couple of files to AM version (wrong changes on my end)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
14 currentDir=$(pwd)
40bb5eb247a5 Reverted a couple of files to AM version (wrong changes on my end)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
15 samplesRootDir=$(pwd)
40bb5eb247a5 Reverted a couple of files to AM version (wrong changes on my end)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
16
40bb5eb247a5 Reverted a couple of files to AM version (wrong changes on my end)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
17 mkdir -p $samplesRootDir/build-wasm
40bb5eb247a5 Reverted a couple of files to AM version (wrong changes on my end)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
18 cd $samplesRootDir/build-wasm
40bb5eb247a5 Reverted a couple of files to AM version (wrong changes on my end)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
19
40bb5eb247a5 Reverted a couple of files to AM version (wrong changes on my end)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
20 source ~/apps/emsdk/emsdk_env.sh
40bb5eb247a5 Reverted a couple of files to AM version (wrong changes on my end)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
21 cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE=${EMSCRIPTEN}/cmake/Modules/Platform/Emscripten.cmake \
40bb5eb247a5 Reverted a couple of files to AM version (wrong changes on my end)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
22 -DCMAKE_BUILD_TYPE=Release \
40bb5eb247a5 Reverted a couple of files to AM version (wrong changes on my end)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
23 -DSTONE_SOURCES_DIR=$currentDir/../../../orthanc-stone \
40bb5eb247a5 Reverted a couple of files to AM version (wrong changes on my end)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
24 -DORTHANC_FRAMEWORK_SOURCE=path \
40bb5eb247a5 Reverted a couple of files to AM version (wrong changes on my end)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
25 -DORTHANC_FRAMEWORK_ROOT=$currentDir/../../../orthanc \
40bb5eb247a5 Reverted a couple of files to AM version (wrong changes on my end)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
26 -DALLOW_DOWNLOADS=ON .. \
40bb5eb247a5 Reverted a couple of files to AM version (wrong changes on my end)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
27 -DENABLE_WASM=ON
40bb5eb247a5 Reverted a couple of files to AM version (wrong changes on my end)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
28
40bb5eb247a5 Reverted a couple of files to AM version (wrong changes on my end)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
29 ninja $target
40bb5eb247a5 Reverted a couple of files to AM version (wrong changes on my end)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
30
40bb5eb247a5 Reverted a couple of files to AM version (wrong changes on my end)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
31 echo "-- building the web application -- "
40bb5eb247a5 Reverted a couple of files to AM version (wrong changes on my end)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
32 cd $currentDir
40bb5eb247a5 Reverted a couple of files to AM version (wrong changes on my end)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
33 ./build-web.sh