Mercurial > hg > orthanc-stone
comparison Applications/Samples/WebAssembly/CMakeLists.txt @ 1548:65eccce95882
unifying the default install prefix for WebAssembly
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 13 Aug 2020 09:57:35 +0200 |
parents | 6e0da8370270 |
children | a48ae10857b1 |
comparison
equal
deleted
inserted
replaced
1547:bf195fc0797e | 1548:65eccce95882 |
---|---|
1 cmake_minimum_required(VERSION 2.8.3) | 1 cmake_minimum_required(VERSION 2.8.3) |
2 | 2 |
3 project(OrthancStone) | 3 project(OrthancStone) |
4 | |
5 set(ORTHANC_STONE_INSTALL_PREFIX "${CMAKE_SOURCE_DIR}/../../../wasm-binaries/" CACHE PATH "Where to put the WebAssembly binaries") | |
6 | |
4 | 7 |
5 # Configuration of the Emscripten compiler for WebAssembly target | 8 # Configuration of the Emscripten compiler for WebAssembly target |
6 # --------------------------------------------------------------- | 9 # --------------------------------------------------------------- |
7 set(USE_WASM ON CACHE BOOL "") | 10 set(USE_WASM ON CACHE BOOL "") |
8 | 11 |
79 | 82 |
80 # Declare installation files for the module | 83 # Declare installation files for the module |
81 # --------------------------------------------------------------- | 84 # --------------------------------------------------------------- |
82 install( | 85 install( |
83 TARGETS RtViewerWasm | 86 TARGETS RtViewerWasm |
84 RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/RtViewer/ | 87 RUNTIME DESTINATION ${ORTHANC_STONE_INSTALL_PREFIX}/RtViewer/ |
85 ) | 88 ) |
86 | 89 |
87 # Declare installation files for the companion files (web scaffolding) | 90 # Declare installation files for the companion files (web scaffolding) |
88 # please note that ${CMAKE_CURRENT_BINARY_DIR}/RtViewerWasm.js | 91 # please note that ${CMAKE_CURRENT_BINARY_DIR}/RtViewerWasm.js |
89 # (the generated JS loader for the WASM module) is handled by the `install1` | 92 # (the generated JS loader for the WASM module) is handled by the `install1` |
93 install( | 96 install( |
94 FILES | 97 FILES |
95 ${CMAKE_SOURCE_DIR}/RtViewer/RtViewerWasmApp.js | 98 ${CMAKE_SOURCE_DIR}/RtViewer/RtViewerWasmApp.js |
96 ${CMAKE_SOURCE_DIR}/RtViewer/index.html | 99 ${CMAKE_SOURCE_DIR}/RtViewer/index.html |
97 ${CMAKE_CURRENT_BINARY_DIR}/RtViewerWasm.wasm | 100 ${CMAKE_CURRENT_BINARY_DIR}/RtViewerWasm.wasm |
98 DESTINATION ${CMAKE_INSTALL_PREFIX}/RtViewer/ | 101 DESTINATION ${ORTHANC_STONE_INSTALL_PREFIX}/RtViewer/ |
99 ) | 102 ) |
100 | 103 |
101 ################################################################################ | 104 ################################################################################ |
102 | 105 |
103 # Define the WASM module | 106 # Define the WASM module |
113 | 116 |
114 # Declare installation files for the module | 117 # Declare installation files for the module |
115 # --------------------------------------------------------------- | 118 # --------------------------------------------------------------- |
116 install( | 119 install( |
117 TARGETS SingleFrameViewerWasm | 120 TARGETS SingleFrameViewerWasm |
118 RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/SingleFrameViewer/ | 121 RUNTIME DESTINATION ${ORTHANC_STONE_INSTALL_PREFIX}/SingleFrameViewer/ |
119 ) | 122 ) |
120 | 123 |
121 # Declare installation files for the companion files (web scaffolding) | 124 # Declare installation files for the companion files (web scaffolding) |
122 # please note that ${CMAKE_CURRENT_BINARY_DIR}/RtViewerWasm.js | 125 # please note that ${CMAKE_CURRENT_BINARY_DIR}/RtViewerWasm.js |
123 # (the generated JS loader for the WASM module) is handled by the `install1` | 126 # (the generated JS loader for the WASM module) is handled by the `install1` |
127 install( | 130 install( |
128 FILES | 131 FILES |
129 ${CMAKE_SOURCE_DIR}/SingleFrameViewer/SingleFrameViewerApp.js | 132 ${CMAKE_SOURCE_DIR}/SingleFrameViewer/SingleFrameViewerApp.js |
130 ${CMAKE_SOURCE_DIR}/SingleFrameViewer/index.html | 133 ${CMAKE_SOURCE_DIR}/SingleFrameViewer/index.html |
131 ${CMAKE_CURRENT_BINARY_DIR}/SingleFrameViewerWasm.wasm | 134 ${CMAKE_CURRENT_BINARY_DIR}/SingleFrameViewerWasm.wasm |
132 DESTINATION ${CMAKE_INSTALL_PREFIX}/SingleFrameViewer/ | 135 DESTINATION ${ORTHANC_STONE_INSTALL_PREFIX}/SingleFrameViewer/ |
133 ) | 136 ) |