Mercurial > hg > orthanc-stone
annotate OrthancStone/Resources/WebAssemblySharedLibrary/CMakeLists.txt @ 2115:de049fd88697 deep-learning
integration mainline->deep-learning
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 24 Jan 2024 16:44:40 +0100 |
parents | fdb012c86a75 c23eef785569 |
children | 2e050ec85379 |
rev | line source |
---|---|
1900 | 1 # Stone of Orthanc |
2 # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics | |
3 # Department, University Hospital of Liege, Belgium | |
2114
c23eef785569
update year to 2024
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2077
diff
changeset
|
4 # Copyright (C) 2017-2024 Osimis S.A., Belgium |
c23eef785569
update year to 2024
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2077
diff
changeset
|
5 # Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium |
1900 | 6 # |
7 # This program is free software: you can redistribute it and/or | |
8 # modify it under the terms of the GNU Lesser General Public License | |
9 # as published by the Free Software Foundation, either version 3 of | |
10 # the License, or (at your option) any later version. | |
11 # | |
12 # This program is distributed in the hope that it will be useful, but | |
13 # WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
15 # Lesser General Public License for more details. | |
16 # | |
17 # You should have received a copy of the GNU Lesser General Public | |
18 # License along with this program. If not, see | |
19 # <http://www.gnu.org/licenses/>. | |
20 | |
1899
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
21 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
22 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
23 cmake_minimum_required(VERSION 2.8.3) |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
24 cmake_policy(SET CMP0058 NEW) |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
25 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
26 project(OrthancStoneModule) |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
27 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
28 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
29 # Warning message related to WebAssembly modules: We know that 1.38.41 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
30 # DOES NOT work, but that 1.39.17 works. |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
31 message("") |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
32 message("=== IMPORTANT: Make sure to use a recent version of Emscripten (preferably >= 2.0.0) ===") |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
33 message("") |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
34 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
35 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
36 set(ORTHANC_STONE_INSTALL_PREFIX "${CMAKE_SOURCE_DIR}/../../../../wasm-binaries/OrthancStoneModule" CACHE PATH "Where to put the WebAssembly binaries") |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
37 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
38 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
39 # Ask for the generation of a side module |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
40 set(WASM_FLAGS "-s SIDE_MODULE=1 -s EXPORT_ALL=1") # Must be before "Compiler.cmake" |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
41 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
42 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
43 # Configuration of the Emscripten compiler for WebAssembly target |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
44 # --------------------------------------------------------------- |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
45 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
46 set(USE_WASM ON CACHE BOOL "") |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
47 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
48 set(WASM_FLAGS "${WASM_FLAGS} -s WASM=1 -s FETCH=1") |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
49 if (CMAKE_BUILD_TYPE STREQUAL "Debug") |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
50 set(WASM_FLAGS "${WASM_FLAGS} -s SAFE_HEAP=1") |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
51 endif() |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
52 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
53 set(WASM_LINKER_FLAGS "${WASM_LINKER_FLAGS} -s ASSERTIONS=1 -s DISABLE_EXCEPTION_CATCHING=0") |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
54 set(WASM_LINKER_FLAGS "${WASM_LINKER_FLAGS} -s DISABLE_DEPRECATED_FIND_EVENT_TARGET_BEHAVIOR=1") |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
55 add_definitions( |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
56 -DDISABLE_DEPRECATED_FIND_EVENT_TARGET_BEHAVIOR=1 |
2069
5956d7357098
macro ORTHANC_HAS_WASM_SIMD has to be manually defined
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2048
diff
changeset
|
57 -DORTHANC_HAS_WASM_SIMD=0 |
2048
a05b03f45289
added ORTHANC_WEBGL2_HEAP_COMPAT
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1901
diff
changeset
|
58 -DORTHANC_WEBGL2_HEAP_COMPAT=0 |
1899
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
59 ) |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
60 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
61 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
62 # Stone of Orthanc configuration |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
63 # --------------------------------------------------------------- |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
64 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
65 include(${CMAKE_SOURCE_DIR}/../OrthancStoneWebAssemblyParameters.cmake) |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
66 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
67 SET(ENABLE_DCMTK ON) |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
68 SET(ENABLE_DCMTK_NETWORKING OFF) |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
69 SET(ENABLE_DCMTK_TRANSCODING OFF) |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
70 SET(ENABLE_GOOGLE_TEST OFF) |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
71 SET(ENABLE_LOCALE ON) # Necessary for text rendering |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
72 SET(ORTHANC_SANDBOXED ON) |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
73 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
74 include(${CMAKE_SOURCE_DIR}/../OrthancStoneWebAssemblyConfiguration.cmake) |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
75 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
76 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
77 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
78 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
79 ################################################################################ |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
80 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
81 # The source files that register a callback cannot be part of a side |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
82 # module, and must be compiled in the main module. The following |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
83 # command can be used to identify such files: |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
84 # $ grep -lrE 'emscripten_' ../../Sources/ |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
85 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
86 set(SOURCES_WITH_EMSCRIPTEN_CALLBACKS |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
87 ${CMAKE_SOURCE_DIR}/../WebAssemblyOracle.cpp |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
88 ${CMAKE_SOURCE_DIR}/../WebAssemblyViewport.cpp |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
89 ${CMAKE_SOURCE_DIR}/../WebAssemblyCairoViewport.cpp |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
90 ) |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
91 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
92 list(REMOVE_ITEM ORTHANC_STONE_SOURCES |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
93 ${SOURCES_WITH_EMSCRIPTEN_CALLBACKS} |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
94 ) |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
95 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
96 configure_file( |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
97 ${ORTHANC_STONE_ROOT}/../SharedLibrary/OrthancStone.h.in |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
98 ${CMAKE_CURRENT_BINARY_DIR}/Include/orthanc-stone/OrthancStone.h |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
99 ) |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
100 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
101 configure_file( |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
102 ${ORTHANC_FRAMEWORK_ROOT}/../SharedLibrary/OrthancFramework.h.in |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
103 ${CMAKE_CURRENT_BINARY_DIR}/Include/orthanc-framework/OrthancFramework.h |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
104 ) |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
105 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
106 file( |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
107 COPY ${CMAKE_SOURCE_DIR}/../../../../OrthancStone/Sources/ |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
108 DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/Include/orthanc-stone |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
109 NO_SOURCE_PERMISSIONS |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
110 FILES_MATCHING |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
111 PATTERN "*.h" |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
112 PATTERN OrthancStone.h EXCLUDE |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
113 PATTERN "Deprecated*" EXCLUDE |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
114 ) |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
115 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
116 file( |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
117 COPY ${ORTHANC_FRAMEWORK_ROOT}/ |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
118 DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/Include/orthanc-framework |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
119 NO_SOURCE_PERMISSIONS |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
120 FILES_MATCHING |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
121 PATTERN "*.h" |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
122 PATTERN OrthancFramework.h EXCLUDE |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
123 ) |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
124 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
125 add_executable(OrthancStoneModule |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
126 ${ORTHANC_STONE_SOURCES} |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
127 ${AUTOGENERATED_SOURCES} |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
128 ${CAIRO_SOURCES} |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
129 ${PIXMAN_SOURCES} |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
130 ${FREETYPE_SOURCES} |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
131 ) |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
132 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
133 set_target_properties(OrthancStoneModule |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
134 PROPERTIES |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
135 COMPILE_FLAGS "${WASM_FLAGS}" |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
136 LINK_FLAGS "${WASM_LINKER_FLAGS}" |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
137 ) |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
138 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
139 # CMake does not natively handle SIDE_MODULE, and believes that |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
140 # Emscripten produces a ".js" file (whereas it creates only the |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
141 # ".wasm"). Create a dummy ".js" for target to work. |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
142 add_custom_command( |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
143 TARGET OrthancStoneModule POST_BUILD |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
144 COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/OrthancStoneModule.js |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
145 ) |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
146 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
147 file( |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
148 COPY ${BOOST_SOURCES_DIR}/boost/ |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
149 DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/Include/boost/ |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
150 NO_SOURCE_PERMISSIONS |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
151 FILES_MATCHING |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
152 PATTERN "*.h" |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
153 PATTERN "*.hpp" |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
154 PATTERN "*.ipp" |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
155 ) |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
156 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
157 file( |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
158 COPY ${JSONCPP_SOURCES_DIR}/include/json/ |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
159 DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/Include/json/ |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
160 NO_SOURCE_PERMISSIONS |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
161 FILES_MATCHING |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
162 PATTERN "*.h" |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
163 ) |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
164 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
165 file( |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
166 COPY ${CAIRO_SOURCES_DIR}/src/ |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
167 DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/Include/cairo/ |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
168 NO_SOURCE_PERMISSIONS |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
169 FILES_MATCHING |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
170 PATTERN "*.h" |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
171 ) |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
172 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
173 set(DCMTK_MODULES |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
174 dcmdata |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
175 config |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
176 ofstd |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
177 oflog |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
178 ) |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
179 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
180 foreach (module IN LISTS DCMTK_MODULES) |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
181 file( |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
182 COPY ${DCMTK_SOURCES_DIR}/ofstd/include/dcmtk/${module}/ |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
183 DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/Include/dcmtk/${module}/ |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
184 NO_SOURCE_PERMISSIONS |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
185 FILES_MATCHING |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
186 PATTERN "*.h" |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
187 ) |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
188 endforeach() |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
189 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
190 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
191 install( |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
192 TARGETS OrthancStoneModule |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
193 DESTINATION ${ORTHANC_STONE_INSTALL_PREFIX}/lib |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
194 ) |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
195 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
196 install(FILES |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
197 ${CMAKE_CURRENT_BINARY_DIR}/OrthancStoneModule.wasm |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
198 DESTINATION ${ORTHANC_STONE_INSTALL_PREFIX}/lib |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
199 ) |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
200 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
201 install( |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
202 DIRECTORY |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
203 ${CMAKE_CURRENT_BINARY_DIR}/Include/boost |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
204 ${CMAKE_CURRENT_BINARY_DIR}/Include/cairo |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
205 ${CMAKE_CURRENT_BINARY_DIR}/Include/dcmtk |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
206 ${CMAKE_CURRENT_BINARY_DIR}/Include/json |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
207 ${CMAKE_CURRENT_BINARY_DIR}/Include/orthanc-framework |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
208 ${CMAKE_CURRENT_BINARY_DIR}/Include/orthanc-stone |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
209 DESTINATION ${ORTHANC_STONE_INSTALL_PREFIX}/include/ |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
210 ) |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
211 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
212 install(FILES |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
213 ${SOURCES_WITH_EMSCRIPTEN_CALLBACKS} |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
214 DESTINATION ${ORTHANC_STONE_INSTALL_PREFIX}/src/orthanc-stone |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
215 ) |