annotate Applications/StoneWebViewer/WebAssembly/StoneModule/CMakeLists.txt @ 2029:0cb8796c2a9b deep-learning

measure time for deep learning
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 23 Dec 2022 16:58:13 +0100
parents 7053b8a0aaec
children a05b03f45289 07964689cb0b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1589
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1555
diff changeset
1 # Stone of Orthanc
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1555
diff changeset
2 # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1555
diff changeset
3 # Department, University Hospital of Liege, Belgium
1871
7053b8a0aaec upgrade to year 2022
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1870
diff changeset
4 # Copyright (C) 2017-2022 Osimis S.A., Belgium
7053b8a0aaec upgrade to year 2022
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1870
diff changeset
5 # Copyright (C) 2021-2022 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
1589
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1555
diff changeset
6 #
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1555
diff changeset
7 # This program is free software: you can redistribute it and/or
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1555
diff changeset
8 # modify it under the terms of the GNU Affero General Public License
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1555
diff changeset
9 # as published by the Free Software Foundation, either version 3 of
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1555
diff changeset
10 # the License, or (at your option) any later version.
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1555
diff changeset
11 #
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1555
diff changeset
12 # This program is distributed in the hope that it will be useful, but
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1555
diff changeset
13 # WITHOUT ANY WARRANTY; without even the implied warranty of
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1555
diff changeset
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1555
diff changeset
15 # Affero General Public License for more details.
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1555
diff changeset
16 #
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1555
diff changeset
17 # You should have received a copy of the GNU Affero General Public License
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1555
diff changeset
18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1555
diff changeset
19
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1555
diff changeset
20
1549
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21 cmake_minimum_required(VERSION 2.8.3)
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23 project(OrthancStone)
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 set(ORTHANC_STONE_MODULE_PREFIX "${CMAKE_SOURCE_DIR}/../../../../wasm-binaries/OrthancStoneModule" CACHE PATH "Where to find the precompiled WebAssembly module of Orthanc Stone")
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 set(ORTHANC_STONE_INSTALL_PREFIX "${CMAKE_SOURCE_DIR}/../../../../wasm-binaries/StoneWebViewer" CACHE PATH "Where to put the WebAssembly binaries")
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 set(EMSCRIPTEN_TARGET_MODE "wasm" CACHE STRING "Sets the target mode for Emscripten (can be \"wasm\" or \"asm.js\")")
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 mark_as_advanced(EMSCRIPTEN_TARGET_MODE)
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31 set(WASM_FLAGS "-s MAIN_MODULE=1") # Must be before "Compiler.cmake"
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 # https://github.com/emscripten-core/emscripten/issues/11407
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 set(WASM_FLAGS "${WASM_FLAGS} -s DEFAULT_LIBRARY_FUNCS_TO_INCLUDE=[\"_emscripten_fetch_xhr\",\"_emscripten_fetch_load_cached_data\",\"_emscripten_fetch_delete_cached_data\",\"_emscripten_fetch_cache_data\"]")
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 set(WASM_LINKER_FLAGS "${WASM_LINKER_FLAGS} -s RUNTIME_LINKED_LIBS='[\"OrthancStoneModule.wasm\"]'")
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40 # Configuration of the Emscripten compiler for WebAssembly target
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 # ---------------------------------------------------------------
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42 set(USE_WASM ON CACHE BOOL "")
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44 set(WASM_FLAGS "${WASM_FLAGS} -s WASM=1 -s FETCH=1")
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45 if (CMAKE_BUILD_TYPE STREQUAL "Debug")
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 set(WASM_FLAGS "${WASM_FLAGS} -s SAFE_HEAP=1")
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47 endif()
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49 set(WASM_LINKER_FLAGS "${WASM_LINKER_FLAGS} -s EXTRA_EXPORTED_RUNTIME_METHODS='[\"ccall\", \"cwrap\"]'")
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50 set(WASM_LINKER_FLAGS "${WASM_LINKER_FLAGS} -s ERROR_ON_UNDEFINED_SYMBOLS=1")
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51 set(WASM_LINKER_FLAGS "${WASM_LINKER_FLAGS} -s ASSERTIONS=1 -s DISABLE_EXCEPTION_CATCHING=0")
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52 set(WASM_LINKER_FLAGS "${WASM_LINKER_FLAGS} -s ALLOW_MEMORY_GROWTH=1 -s TOTAL_MEMORY=268435456") # 256MB + resize
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53 set(WASM_LINKER_FLAGS "${WASM_LINKER_FLAGS} -s DISABLE_DEPRECATED_FIND_EVENT_TARGET_BEHAVIOR=1")
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54 add_definitions(
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55 -DDISABLE_DEPRECATED_FIND_EVENT_TARGET_BEHAVIOR=1
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56 )
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
58
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
60 # Stone of Orthanc configuration, to be used as module
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
61 # ---------------------------------------------------------------
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
62
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
63
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
64 include(${CMAKE_SOURCE_DIR}/../../../../OrthancStone/Resources/Orthanc/CMake/Compiler.cmake)
1555
b894072b9e2f static JavaScript resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1551
diff changeset
65 include(${CMAKE_SOURCE_DIR}/../../../../OrthancStone/Resources/Orthanc/CMake/DownloadPackage.cmake)
1549
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
66
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
67 add_definitions(
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
68 -DORTHANC_STONE_MAX_TAG_LENGTH=256 # TODO => share with OrthancStone
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
69 )
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
70
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
71 include_directories(
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
72 ${ORTHANC_STONE_MODULE_PREFIX}/include
1551
c54bc5bffd01 software rendering
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1549
diff changeset
73 ${ORTHANC_STONE_MODULE_PREFIX}/include/cairo
1549
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
74 ${ORTHANC_STONE_MODULE_PREFIX}/include/orthanc-framework
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
75 ${ORTHANC_STONE_MODULE_PREFIX}/include/orthanc-stone
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
76 )
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
77
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
78
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
79
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
80 ################################################################################
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
81
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
82
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
83 # Create the wrapper to call C++ from JavaScript
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
84 # ---------------------------------------------------------------
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
85
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
86 set(LIBCLANG "libclang-4.0.so.1" CACHE PATH "Version of clang to generate the code model")
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
87 set(STONE_WRAPPER ${CMAKE_CURRENT_BINARY_DIR}/stone.js)
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
88
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
89 add_custom_command(
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
90 COMMAND
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
91 ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/../ParseWebAssemblyExports.py --libclang=${LIBCLANG} ${CMAKE_SOURCE_DIR}/../StoneWebViewer.cpp > ${STONE_WRAPPER}
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
92 DEPENDS
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
93 ${CMAKE_SOURCE_DIR}/../StoneWebViewer.cpp
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
94 ${CMAKE_SOURCE_DIR}/../ParseWebAssemblyExports.py
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
95 OUTPUT
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
96 ${STONE_WRAPPER}
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
97 )
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
98
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
99 add_custom_target(StoneWrapper
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
100 DEPENDS
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
101 ${STONE_WRAPPER}
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
102 )
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
103
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
104
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
105 # Define the WASM module
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
106 # ---------------------------------------------------------------
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
107
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
108 aux_source_directory(
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
109 ${ORTHANC_STONE_MODULE_PREFIX}/src/orthanc-stone/
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
110 ORTHANC_STONE_SOURCES)
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
111
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
112 add_executable(StoneWebViewer
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
113 ${AUTOGENERATED_SOURCES}
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
114 ${ORTHANC_STONE_SOURCES}
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
115 ../StoneWebViewer.cpp
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
116 )
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
117
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
118 set_target_properties(StoneWebViewer
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
119 PROPERTIES
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
120 COMPILE_FLAGS "${WASM_FLAGS}"
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
121 LINK_FLAGS "${WASM_LINKER_FLAGS}"
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
122 )
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
123
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
124 # Make sure to have the wrapper generated
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
125 add_dependencies(StoneWebViewer StoneWrapper)
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
126
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
127
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
128 # Declare installation files for the module
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
129 # ---------------------------------------------------------------
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
130
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
131 install(
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
132 TARGETS StoneWebViewer
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
133 RUNTIME DESTINATION ${ORTHANC_STONE_INSTALL_PREFIX}
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
134 )
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
135
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
136
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
137 # Declare installation files for the companion files (web scaffolding)
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
138 # please note that ${CMAKE_CURRENT_BINARY_DIR}/StoneWebViewer.js
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
139 # (the generated JS loader for the WASM module) is handled by the `install`
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
140 # section above: it is considered to be the binary output of
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
141 # the linker.
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
142 # ---------------------------------------------------------------
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
143 install(
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
144 FILES
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
145 ${CMAKE_CURRENT_BINARY_DIR}/StoneWebViewer.wasm
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
146 ${CMAKE_SOURCE_DIR}/../../WebApplication/app.css
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
147 ${CMAKE_SOURCE_DIR}/../../WebApplication/app.js
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
148 ${CMAKE_SOURCE_DIR}/../../WebApplication/index.html
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
149 ${ORTHANC_STONE_MODULE_PREFIX}/lib/OrthancStoneModule.wasm # NEW
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
150 ${STONE_WRAPPER}
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
151 DESTINATION ${ORTHANC_STONE_INSTALL_PREFIX}
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
152 )
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
153
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
154 install(
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
155 FILES
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
156 ${CMAKE_SOURCE_DIR}/../../WebApplication/img/grid1x1.png
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
157 ${CMAKE_SOURCE_DIR}/../../WebApplication/img/grid1x2.png
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
158 ${CMAKE_SOURCE_DIR}/../../WebApplication/img/grid2x1.png
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
159 ${CMAKE_SOURCE_DIR}/../../WebApplication/img/grid2x2.png
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
160 ${CMAKE_SOURCE_DIR}/../../WebApplication/img/loading.gif
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
161 DESTINATION ${ORTHANC_STONE_INSTALL_PREFIX}/img
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
162 )