Mercurial > hg > orthanc-stone
annotate Applications/Platforms/WebAssembly/SharedLibrary/CMakeLists.txt @ 1773:34eb41352dff
added missing Scene2D/CopyStyleConfigurator.cpp
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 12 May 2021 17:40:38 +0200 |
parents | 9ac2a65d4172 |
children | 3889ae96d2e9 |
rev | line source |
---|---|
1589
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1551
diff
changeset
|
1 # Stone of Orthanc |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1551
diff
changeset
|
2 # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1551
diff
changeset
|
3 # Department, University Hospital of Liege, Belgium |
1739
9ac2a65d4172
upgrade to year 2021
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1656
diff
changeset
|
4 # Copyright (C) 2017-2021 Osimis S.A., Belgium |
1589
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1551
diff
changeset
|
5 # |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1551
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:
1551
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:
1551
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:
1551
diff
changeset
|
9 # the License, or (at your option) any later version. |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1551
diff
changeset
|
10 # |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1551
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:
1551
diff
changeset
|
12 # WITHOUT ANY WARRANTY; without even the implied warranty of |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1551
diff
changeset
|
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1551
diff
changeset
|
14 # Affero General Public License for more details. |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1551
diff
changeset
|
15 # |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1551
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:
1551
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:
1551
diff
changeset
|
18 |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1551
diff
changeset
|
19 |
1549
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
20 cmake_minimum_required(VERSION 2.8.3) |
1592 | 21 cmake_policy(SET CMP0058 NEW) |
1549
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(OrthancStoneModule) |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
24 |
1550 | 25 |
26 # Warning message related to WebAssembly modules: We know that 1.38.41 | |
27 # DOES NOT work, but that 1.39.17 works. | |
28 message("") | |
29 message("=== IMPORTANT: Make sure to use a recent version of Emscripten (preferably >= 2.0.0) ===") | |
30 message("") | |
31 | |
32 | |
1592 | 33 set(ORTHANC_STONE_INSTALL_PREFIX "${CMAKE_SOURCE_DIR}/../../../../wasm-binaries/OrthancStoneModule" CACHE PATH "Where to put the WebAssembly binaries") |
1549
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
34 |
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 # Ask for the generation of a side module |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
37 set(WASM_FLAGS "-s SIDE_MODULE=1 -s EXPORT_ALL=1") # Must be before "Compiler.cmake" |
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 |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
43 set(USE_WASM ON CACHE BOOL "") |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
44 |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
45 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
|
46 if (CMAKE_BUILD_TYPE STREQUAL "Debug") |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
47 set(WASM_FLAGS "${WASM_FLAGS} -s SAFE_HEAP=1") |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
48 endif() |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
49 |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
50 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
|
51 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
|
52 add_definitions( |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
53 -DDISABLE_DEPRECATED_FIND_EVENT_TARGET_BEHAVIOR=1 |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
54 ) |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
55 |
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 # Stone of Orthanc configuration |
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 |
1591
5887a4f8594b
moving platform-specific files out of the "OrthancStone" folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1589
diff
changeset
|
60 include(${CMAKE_SOURCE_DIR}/../OrthancStoneWebAssemblyParameters.cmake) |
1549
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 SET(ENABLE_DCMTK ON) |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
63 SET(ENABLE_DCMTK_NETWORKING OFF) |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
64 SET(ENABLE_DCMTK_TRANSCODING OFF) |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
65 SET(ENABLE_GOOGLE_TEST OFF) |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
66 SET(ENABLE_LOCALE ON) # Necessary for text rendering |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
67 SET(ORTHANC_SANDBOXED ON) |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
68 |
1591
5887a4f8594b
moving platform-specific files out of the "OrthancStone" folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1589
diff
changeset
|
69 include(${CMAKE_SOURCE_DIR}/../OrthancStoneWebAssemblyConfiguration.cmake) |
1549
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 |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
72 |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
73 |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
74 ################################################################################ |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
75 |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
76 # The source files that register a callback cannot be part of a side |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
77 # module, and must be compiled in the main module. The following |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
78 # command can be used to identify such files: |
1550 | 79 # $ grep -lrE 'emscripten_' ../../Sources/ |
1549
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 set(SOURCES_WITH_EMSCRIPTEN_CALLBACKS |
1592 | 82 ${CMAKE_SOURCE_DIR}/../WebAssemblyOracle.cpp |
83 ${CMAKE_SOURCE_DIR}/../WebAssemblyViewport.cpp | |
84 ${CMAKE_SOURCE_DIR}/../WebAssemblyCairoViewport.cpp | |
1549
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 |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
87 list(REMOVE_ITEM ORTHANC_STONE_SOURCES |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
88 ${SOURCES_WITH_EMSCRIPTEN_CALLBACKS} |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
89 ) |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
90 |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
91 configure_file( |
1595
621e4e11783d
doxygen target, more consistent ORTHANC_STONE_ROOT
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1592
diff
changeset
|
92 ${ORTHANC_STONE_ROOT}/../SharedLibrary/OrthancStone.h.in |
1549
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
93 ${CMAKE_CURRENT_BINARY_DIR}/Include/orthanc-stone/OrthancStone.h |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
94 ) |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
95 |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
96 configure_file( |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
97 ${ORTHANC_FRAMEWORK_ROOT}/../SharedLibrary/OrthancFramework.h.in |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
98 ${CMAKE_CURRENT_BINARY_DIR}/Include/orthanc-framework/OrthancFramework.h |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
99 ) |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
100 |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
101 file( |
1592 | 102 COPY ${CMAKE_SOURCE_DIR}/../../../../OrthancStone/Sources/ |
1549
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
103 DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/Include/orthanc-stone |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
104 NO_SOURCE_PERMISSIONS |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
105 FILES_MATCHING |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
106 PATTERN "*.h" |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
107 PATTERN OrthancStone.h EXCLUDE |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
108 PATTERN "Deprecated*" EXCLUDE |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
109 ) |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
110 |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
111 file( |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
112 COPY ${ORTHANC_FRAMEWORK_ROOT}/ |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
113 DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/Include/orthanc-framework |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
114 NO_SOURCE_PERMISSIONS |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
115 FILES_MATCHING |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
116 PATTERN "*.h" |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
117 PATTERN OrthancFramework.h EXCLUDE |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
118 ) |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
119 |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
120 add_executable(OrthancStoneModule |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
121 ${ORTHANC_STONE_SOURCES} |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
122 ${AUTOGENERATED_SOURCES} |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
123 ${CAIRO_SOURCES} |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
124 ${PIXMAN_SOURCES} |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
125 ${FREETYPE_SOURCES} |
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 set_target_properties(OrthancStoneModule |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
129 PROPERTIES |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
130 COMPILE_FLAGS "${WASM_FLAGS}" |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
131 LINK_FLAGS "${WASM_LINKER_FLAGS}" |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
132 ) |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
133 |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
134 # CMake does not natively handle SIDE_MODULE, and believes that |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
135 # Emscripten produces a ".js" file (whereas it creates only the |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
136 # ".wasm"). Create a dummy ".js" for target to work. |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
137 add_custom_command( |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
138 TARGET OrthancStoneModule POST_BUILD |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
139 COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/OrthancStoneModule.js |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
140 ) |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
141 |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
142 file( |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
143 COPY ${BOOST_SOURCES_DIR}/boost/ |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
144 DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/Include/boost/ |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
145 NO_SOURCE_PERMISSIONS |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
146 FILES_MATCHING |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
147 PATTERN "*.h" |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
148 PATTERN "*.hpp" |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
149 PATTERN "*.ipp" |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
150 ) |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
151 |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
152 file( |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
153 COPY ${JSONCPP_SOURCES_DIR}/include/json/ |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
154 DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/Include/json/ |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
155 NO_SOURCE_PERMISSIONS |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
156 FILES_MATCHING |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
157 PATTERN "*.h" |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
158 ) |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
159 |
1551
c54bc5bffd01
software rendering
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1550
diff
changeset
|
160 file( |
c54bc5bffd01
software rendering
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1550
diff
changeset
|
161 COPY ${CAIRO_SOURCES_DIR}/src/ |
c54bc5bffd01
software rendering
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1550
diff
changeset
|
162 DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/Include/cairo/ |
c54bc5bffd01
software rendering
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1550
diff
changeset
|
163 NO_SOURCE_PERMISSIONS |
c54bc5bffd01
software rendering
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1550
diff
changeset
|
164 FILES_MATCHING |
c54bc5bffd01
software rendering
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1550
diff
changeset
|
165 PATTERN "*.h" |
c54bc5bffd01
software rendering
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1550
diff
changeset
|
166 ) |
c54bc5bffd01
software rendering
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1550
diff
changeset
|
167 |
1549
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
168 set(DCMTK_MODULES |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
169 dcmdata |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
170 config |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
171 ofstd |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
172 oflog |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
173 ) |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
174 |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
175 foreach (module IN LISTS DCMTK_MODULES) |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
176 file( |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
177 COPY ${DCMTK_SOURCES_DIR}/ofstd/include/dcmtk/${module}/ |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
178 DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/Include/dcmtk/${module}/ |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
179 NO_SOURCE_PERMISSIONS |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
180 FILES_MATCHING |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
181 PATTERN "*.h" |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
182 ) |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
183 endforeach() |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
184 |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
185 |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
186 install( |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
187 TARGETS OrthancStoneModule |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
188 DESTINATION ${ORTHANC_STONE_INSTALL_PREFIX}/lib |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
189 ) |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
190 |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
191 install(FILES |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
192 ${CMAKE_CURRENT_BINARY_DIR}/OrthancStoneModule.wasm |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
193 DESTINATION ${ORTHANC_STONE_INSTALL_PREFIX}/lib |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
194 ) |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
195 |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
196 install( |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
197 DIRECTORY |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
198 ${CMAKE_CURRENT_BINARY_DIR}/Include/boost |
1551
c54bc5bffd01
software rendering
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1550
diff
changeset
|
199 ${CMAKE_CURRENT_BINARY_DIR}/Include/cairo |
1549
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
200 ${CMAKE_CURRENT_BINARY_DIR}/Include/dcmtk |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
201 ${CMAKE_CURRENT_BINARY_DIR}/Include/json |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
202 ${CMAKE_CURRENT_BINARY_DIR}/Include/orthanc-framework |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
203 ${CMAKE_CURRENT_BINARY_DIR}/Include/orthanc-stone |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
204 DESTINATION ${ORTHANC_STONE_INSTALL_PREFIX}/include/ |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
205 ) |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
206 |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
207 install(FILES |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
208 ${SOURCES_WITH_EMSCRIPTEN_CALLBACKS} |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
209 DESTINATION ${ORTHANC_STONE_INSTALL_PREFIX}/src/orthanc-stone |
a48ae10857b1
packaging of the WebAssembly module
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
210 ) |