annotate Applications/StoneWebViewer/WebAssembly/CMakeLists.txt @ 1592:0d4b11ba86df

fix
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 23 Oct 2020 15:15:32 +0200
parents 5887a4f8594b
children b782f78aed42
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: 1585
diff changeset
1 # Stone of Orthanc
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1585
diff changeset
2 # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1585
diff changeset
3 # Department, University Hospital of Liege, Belgium
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1585
diff changeset
4 # Copyright (C) 2017-2020 Osimis S.A., Belgium
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1585
diff changeset
5 #
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1585
diff changeset
6 # This program is free software: you can redistribute it and/or
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1585
diff changeset
7 # modify it under the terms of the GNU Affero General Public License
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1585
diff changeset
8 # as published by the Free Software Foundation, either version 3 of
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1585
diff changeset
9 # the License, or (at your option) any later version.
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1585
diff changeset
10 #
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1585
diff changeset
11 # This program is distributed in the hope that it will be useful, but
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1585
diff changeset
12 # WITHOUT ANY WARRANTY; without even the implied warranty of
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1585
diff changeset
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1585
diff changeset
14 # Affero General Public License for more details.
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1585
diff changeset
15 #
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1585
diff changeset
16 # You should have received a copy of the GNU Affero General Public License
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1585
diff changeset
17 # along with this program. If not, see <http://www.gnu.org/licenses/>.
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1585
diff changeset
18
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1585
diff changeset
19
1495
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20 cmake_minimum_required(VERSION 2.8.3)
1592
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1591
diff changeset
21 cmake_policy(SET CMP0058 NEW)
1495
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23 project(OrthancStone)
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24
1548
65eccce95882 unifying the default install prefix for WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1544
diff changeset
25 set(ORTHANC_STONE_INSTALL_PREFIX "${CMAKE_SOURCE_DIR}/../../../wasm-binaries/StoneWebViewer" CACHE PATH "Where to put the WebAssembly binaries")
65eccce95882 unifying the default install prefix for WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1544
diff changeset
26
65eccce95882 unifying the default install prefix for WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1544
diff changeset
27
1495
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 # Configuration of the Emscripten compiler for WebAssembly target
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 # ---------------------------------------------------------------
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 set(USE_WASM ON CACHE BOOL "")
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32 set(EMSCRIPTEN_SET_LLVM_WASM_BACKEND ON CACHE BOOL "")
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33
1549
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1548
diff changeset
34 set(WASM_FLAGS "${WASM_FLAGS} -s WASM=1 -s FETCH=1")
1495
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 if (CMAKE_BUILD_TYPE STREQUAL "Debug")
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 set(WASM_FLAGS "${WASM_FLAGS} -s SAFE_HEAP=1")
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 endif()
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38
1549
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1548
diff changeset
39 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: 1548
diff changeset
40 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: 1548
diff changeset
41 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: 1548
diff changeset
42 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: 1548
diff changeset
43 set(WASM_LINKER_FLAGS "${WASM_LINKER_FLAGS} -s DISABLE_DEPRECATED_FIND_EVENT_TARGET_BEHAVIOR=1")
1495
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44 add_definitions(
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45 -DDISABLE_DEPRECATED_FIND_EVENT_TARGET_BEHAVIOR=1
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 )
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47
1549
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1548
diff changeset
48
1495
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49 # Stone of Orthanc configuration
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50 # ---------------------------------------------------------------
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51 set(ALLOW_DOWNLOADS ON)
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52
1591
5887a4f8594b moving platform-specific files out of the "OrthancStone" folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1589
diff changeset
53 include(${CMAKE_SOURCE_DIR}/../../Platforms/WebAssembly/OrthancStoneWebAssemblyParameters.cmake)
1495
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55 SET(ENABLE_DCMTK ON)
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56 SET(ENABLE_DCMTK_NETWORKING OFF)
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57 SET(ENABLE_DCMTK_TRANSCODING OFF)
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
58 SET(ENABLE_GOOGLE_TEST OFF)
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59 SET(ENABLE_LOCALE ON) # Necessary for text rendering
1585
94edbfa64c97 enable pugixml in samples
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1562
diff changeset
60 SET(ENABLE_PUGIXML ON) # Necessary for OsiriX annotations
1495
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
61 SET(ORTHANC_SANDBOXED ON)
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
62
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
63 # this will set up the build system for Stone of Orthanc and will
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
64 # populate the ORTHANC_STONE_SOURCES CMake variable
1591
5887a4f8594b moving platform-specific files out of the "OrthancStone" folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1589
diff changeset
65 include(${CMAKE_SOURCE_DIR}/../../Platforms/WebAssembly/OrthancStoneWebAssemblyConfiguration.cmake)
1495
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
66
1549
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1548
diff changeset
67 include_directories(
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1548
diff changeset
68 ${CMAKE_SOURCE_DIR}/../../../OrthancStone/Sources/
1591
5887a4f8594b moving platform-specific files out of the "OrthancStone" folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1589
diff changeset
69 ${CMAKE_SOURCE_DIR}/../../Platforms/WebAssembly/
1549
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1548
diff changeset
70 )
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1548
diff changeset
71
1518
433cf964838d prevents random config. names + typofix + doc
Benjamin Golinvaux <bgo@osimis.io>
parents: 1516
diff changeset
72 if (CMAKE_BUILD_TYPE MATCHES Debug)
433cf964838d prevents random config. names + typofix + doc
Benjamin Golinvaux <bgo@osimis.io>
parents: 1516
diff changeset
73 # specific flags go here
433cf964838d prevents random config. names + typofix + doc
Benjamin Golinvaux <bgo@osimis.io>
parents: 1516
diff changeset
74 elseif (CMAKE_BUILD_TYPE MATCHES RelWithDebInfo)
433cf964838d prevents random config. names + typofix + doc
Benjamin Golinvaux <bgo@osimis.io>
parents: 1516
diff changeset
75 # specific flags go here
433cf964838d prevents random config. names + typofix + doc
Benjamin Golinvaux <bgo@osimis.io>
parents: 1516
diff changeset
76 elseif (CMAKE_BUILD_TYPE MATCHES Release)
433cf964838d prevents random config. names + typofix + doc
Benjamin Golinvaux <bgo@osimis.io>
parents: 1516
diff changeset
77 # specific flags go here
433cf964838d prevents random config. names + typofix + doc
Benjamin Golinvaux <bgo@osimis.io>
parents: 1516
diff changeset
78 else()
433cf964838d prevents random config. names + typofix + doc
Benjamin Golinvaux <bgo@osimis.io>
parents: 1516
diff changeset
79 message(FATAL_ERROR "CMAKE_BUILD_TYPE must match either Debug, RelWithDebInfo or Release" )
433cf964838d prevents random config. names + typofix + doc
Benjamin Golinvaux <bgo@osimis.io>
parents: 1516
diff changeset
80 endif()
1495
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
81
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
82 ################################################################################
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
83
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
84
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
85 # Create the wrapper to call C++ from JavaScript
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
86 # ---------------------------------------------------------------
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
87
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
88 set(LIBCLANG "libclang-4.0.so.1" CACHE PATH "Version of clang to generate the code model")
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
89 set(STONE_WRAPPER ${CMAKE_CURRENT_BINARY_DIR}/stone.js)
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
90
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
91 add_custom_command(
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
92 COMMAND
1516
2b7d34cb764f rename file
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1512
diff changeset
93 ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/ParseWebAssemblyExports.py --libclang=${LIBCLANG} ${CMAKE_SOURCE_DIR}/StoneWebViewer.cpp > ${STONE_WRAPPER}
1495
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
94 DEPENDS
1516
2b7d34cb764f rename file
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1512
diff changeset
95 ${CMAKE_SOURCE_DIR}/StoneWebViewer.cpp
1495
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
96 ${CMAKE_SOURCE_DIR}/ParseWebAssemblyExports.py
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
97 OUTPUT
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
98 ${STONE_WRAPPER}
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
99 )
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
100
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
101 add_custom_target(StoneWrapper
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
102 DEPENDS
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
103 ${STONE_WRAPPER}
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
104 )
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
105
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
106
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
107 # Define the WASM module
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
108 # ---------------------------------------------------------------
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
109
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
110 add_executable(StoneWebViewer
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
111 ${ORTHANC_STONE_SOURCES}
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
112 ${AUTOGENERATED_SOURCES}
1516
2b7d34cb764f rename file
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1512
diff changeset
113 StoneWebViewer.cpp
1495
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
114 )
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
115
1549
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1548
diff changeset
116 set_target_properties(StoneWebViewer
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1548
diff changeset
117 PROPERTIES
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1548
diff changeset
118 COMPILE_FLAGS "${WASM_FLAGS}"
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1548
diff changeset
119 LINK_FLAGS "${WASM_LINKER_FLAGS}"
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1548
diff changeset
120 )
a48ae10857b1 packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1548
diff changeset
121
1495
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
122 # Make sure to have the wrapper generated
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
123 add_dependencies(StoneWebViewer StoneWrapper)
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
124
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
125
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
126 # Declare installation files for the module
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
127 # ---------------------------------------------------------------
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
128
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
129 install(
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
130 TARGETS StoneWebViewer
1548
65eccce95882 unifying the default install prefix for WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1544
diff changeset
131 RUNTIME DESTINATION ${ORTHANC_STONE_INSTALL_PREFIX}
1495
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
132 )
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
133
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
134
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
135 # Declare installation files for the companion files (web scaffolding)
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
136 # please note that ${CMAKE_CURRENT_BINARY_DIR}/StoneWebViewer.js
1518
433cf964838d prevents random config. names + typofix + doc
Benjamin Golinvaux <bgo@osimis.io>
parents: 1516
diff changeset
137 # (the generated JS loader for the WASM module) is handled by the `install`
1495
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
138 # section above: it is considered to be the binary output of
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
139 # the linker.
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
140 # ---------------------------------------------------------------
1555
b894072b9e2f static JavaScript resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1549
diff changeset
141 include(${CMAKE_SOURCE_DIR}/JavaScriptLibraries.cmake)
b894072b9e2f static JavaScript resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1549
diff changeset
142
1495
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
143 install(
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
144 FILES
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
145 ${CMAKE_CURRENT_BINARY_DIR}/StoneWebViewer.wasm
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
146 ${CMAKE_SOURCE_DIR}/../WebApplication/app.css
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
147 ${CMAKE_SOURCE_DIR}/../WebApplication/app.js
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
148 ${CMAKE_SOURCE_DIR}/../WebApplication/index.html
1562
2a4a6b967053 starting work on print
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1555
diff changeset
149 ${CMAKE_SOURCE_DIR}/../WebApplication/print.js
2a4a6b967053 starting work on print
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1555
diff changeset
150 ${CMAKE_SOURCE_DIR}/../WebApplication/ua-parser.js # TODO => Package this from https://github.com/faisalman/ua-parser-js/releases
1495
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
151 ${STONE_WRAPPER}
1548
65eccce95882 unifying the default install prefix for WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1544
diff changeset
152 DESTINATION ${ORTHANC_STONE_INSTALL_PREFIX}
1495
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
153 )
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
154
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
155 install(
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
156 FILES
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
157 ${CMAKE_SOURCE_DIR}/../WebApplication/img/grid1x1.png
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
158 ${CMAKE_SOURCE_DIR}/../WebApplication/img/grid1x2.png
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
159 ${CMAKE_SOURCE_DIR}/../WebApplication/img/grid2x1.png
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
160 ${CMAKE_SOURCE_DIR}/../WebApplication/img/grid2x2.png
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
161 ${CMAKE_SOURCE_DIR}/../WebApplication/img/loading.gif
1548
65eccce95882 unifying the default install prefix for WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1544
diff changeset
162 DESTINATION ${ORTHANC_STONE_INSTALL_PREFIX}/img
1495
fb74ed5d8c22 initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
163 )