Mercurial > hg > orthanc-stone
comparison Applications/Platforms/WebAssembly/OrthancStoneWebAssemblyConfiguration.cmake @ 1591:5887a4f8594b
moving platform-specific files out of the "OrthancStone" folder
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 23 Oct 2020 13:15:03 +0200 |
parents | |
children | 621e4e11783d |
comparison
equal
deleted
inserted
replaced
1590:7b963bccafef | 1591:5887a4f8594b |
---|---|
1 # Stone of Orthanc | |
2 # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics | |
3 # Department, University Hospital of Liege, Belgium | |
4 # Copyright (C) 2017-2020 Osimis S.A., Belgium | |
5 # | |
6 # This program is free software: you can redistribute it and/or | |
7 # modify it under the terms of the GNU Affero General Public License | |
8 # as published by the Free Software Foundation, either version 3 of | |
9 # the License, or (at your option) any later version. | |
10 # | |
11 # This program is distributed in the hope that it will be useful, but | |
12 # WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
14 # Affero General Public License for more details. | |
15 # | |
16 # You should have received a copy of the GNU Affero General Public License | |
17 # along with this program. If not, see <http://www.gnu.org/licenses/>. | |
18 | |
19 | |
20 | |
21 ##################################################################### | |
22 ## Sanity check of the configuration | |
23 ##################################################################### | |
24 | |
25 set(ENABLE_WEB_CLIENT OFF) | |
26 include(${ORTHANC_STONE_ROOT}/Resources/CMake/OrthancStoneConfiguration.cmake) | |
27 | |
28 if (NOT ORTHANC_SANDBOXED) | |
29 message(FATAL_ERROR "WebAssembly target must me configured as sandboxed") | |
30 endif() | |
31 | |
32 if (NOT CMAKE_SYSTEM_NAME STREQUAL "Emscripten") | |
33 message(FATAL_ERROR "WebAssembly target requires the emscripten compiler") | |
34 endif() | |
35 | |
36 add_definitions( | |
37 -DORTHANC_ENABLE_SDL=0 | |
38 -DORTHANC_ENABLE_WASM=1 | |
39 ) | |
40 | |
41 | |
42 ##################################################################### | |
43 ## Additional source files for WebAssembly | |
44 ##################################################################### | |
45 | |
46 list(APPEND ORTHANC_STONE_SOURCES | |
47 ${CMAKE_CURRENT_LIST_DIR}/WebAssemblyCairoViewport.cpp | |
48 ${CMAKE_CURRENT_LIST_DIR}/WebAssemblyLoadersContext.cpp | |
49 ${CMAKE_CURRENT_LIST_DIR}/WebAssemblyOracle.cpp | |
50 ${CMAKE_CURRENT_LIST_DIR}/WebAssemblyViewport.cpp | |
51 ) | |
52 | |
53 if (ENABLE_OPENGL) | |
54 list(APPEND ORTHANC_STONE_SOURCES | |
55 ${CMAKE_CURRENT_LIST_DIR}/WebAssemblyOpenGLContext.cpp | |
56 ${CMAKE_CURRENT_LIST_DIR}/WebGLViewport.cpp | |
57 ${CMAKE_CURRENT_LIST_DIR}/WebGLViewportsRegistry.cpp | |
58 ) | |
59 endif() |