annotate OrthancFramework/Resources/CMake/EmscriptenParameters.cmake @ 4862:0a5d05637701 openssl-3.x

added missing copyright
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 24 Dec 2021 17:16:04 +0100
parents 7053502fbf97
children 43e613a7756b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4120
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4075
diff changeset
1 # Orthanc - A Lightweight, RESTful DICOM Store
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4075
diff changeset
2 # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4075
diff changeset
3 # Department, University Hospital of Liege, Belgium
4437
d9473bd5ed43 upgrade to year 2021
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4120
diff changeset
4 # Copyright (C) 2017-2021 Osimis S.A., Belgium
4831
7053502fbf97 added copyright UCLouvain
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
5 # Copyright (C) 2021-2021 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
4120
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4075
diff changeset
6 #
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4075
diff changeset
7 # This program is free software: you can redistribute it and/or
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4075
diff changeset
8 # modify it under the terms of the GNU Lesser General Public License
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4075
diff changeset
9 # as published by the Free Software Foundation, either version 3 of
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4075
diff changeset
10 # the License, or (at your option) any later version.
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4075
diff changeset
11 #
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4075
diff changeset
12 # This program is distributed in the hope that it will be useful, but
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4075
diff changeset
13 # WITHOUT ANY WARRANTY; without even the implied warranty of
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4075
diff changeset
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4075
diff changeset
15 # Lesser General Public License for more details.
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4075
diff changeset
16 #
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4075
diff changeset
17 # You should have received a copy of the GNU Lesser General Public
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4075
diff changeset
18 # License along with this program. If not, see
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4075
diff changeset
19 # <http://www.gnu.org/licenses/>.
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4075
diff changeset
20
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4075
diff changeset
21
4075
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4070
diff changeset
22 # https://github.com/emscripten-core/emscripten/blob/master/src/settings.js
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4070
diff changeset
23
4063
e00f3d089991 shared library of orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 if (NOT "${EMSCRIPTEN_TRAP_MODE}" STREQUAL "")
e00f3d089991 shared library of orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s BINARYEN_TRAP_MODE='\"${EMSCRIPTEN_TRAP_MODE}\"'")
e00f3d089991 shared library of orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 endif()
e00f3d089991 shared library of orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27
4075
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4070
diff changeset
28 # "DISABLE_EXCEPTION_CATCHING" is a "compile+link" option. HOWEVER,
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4070
diff changeset
29 # setting it inside "WASM_FLAGS" creates link errors, at least with
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4070
diff changeset
30 # side modules. TODO: Understand why
4069
cf454aabfc19 improving EmscriptenParameters.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4067
diff changeset
31 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s DISABLE_EXCEPTION_CATCHING=0")
4075
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4070
diff changeset
32 #set(WASM_FLAGS "${WASM_FLAGS} -s DISABLE_EXCEPTION_CATCHING=0")
4069
cf454aabfc19 improving EmscriptenParameters.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4067
diff changeset
33
4063
e00f3d089991 shared library of orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 if (EMSCRIPTEN_TARGET_MODE STREQUAL "wasm")
e00f3d089991 shared library of orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 # WebAssembly
4070
f1e82dd6acb1 fixed emscripten options
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4069
diff changeset
36 set(WASM_FLAGS "${WASM_FLAGS} -s WASM=1")
4063
e00f3d089991 shared library of orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37
e00f3d089991 shared library of orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 elseif (EMSCRIPTEN_TARGET_MODE STREQUAL "asm.js")
e00f3d089991 shared library of orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39 # asm.js targeting IE 11
4070
f1e82dd6acb1 fixed emscripten options
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4069
diff changeset
40 set(WASM_FLAGS "-s WASM=0 -s ASM_JS=2 -s LEGACY_VM_SUPPORT=1")
4063
e00f3d089991 shared library of orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41
e00f3d089991 shared library of orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42 else()
e00f3d089991 shared library of orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43 message(FATAL_ERROR "Bad value for EMSCRIPTEN_TARGET_MODE: ${EMSCRIPTEN_TARGET_MODE}")
e00f3d089991 shared library of orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44 endif()
e00f3d089991 shared library of orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45
e00f3d089991 shared library of orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 if (CMAKE_BUILD_TYPE STREQUAL "Debug")
4069
cf454aabfc19 improving EmscriptenParameters.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4067
diff changeset
47 set(WASM_FLAGS "${WASM_FLAGS} -s SAFE_HEAP=1 -s ASSERTIONS=1")
4063
e00f3d089991 shared library of orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48 endif()
e00f3d089991 shared library of orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49
e00f3d089991 shared library of orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WASM_FLAGS}")
e00f3d089991 shared library of orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WASM_FLAGS}")