-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
37 lines (34 loc) · 769 Bytes
/
Copy pathCMakeLists.txt
File metadata and controls
37 lines (34 loc) · 769 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
cmake_minimum_required(VERSION 3.20)
project(mucc LANGUAGES C)
add_executable(mucc
codegen.c
mmlcv.c
mucc.c
strsub.c
hash.c
msrcv.c
reserved.c
codegen.h
hash.h
mucc.h
reserved.h
)
if (EMSCRIPTEN)
## https://gitlab.kitware.com/cmake/cmake/issues/15826
set_target_properties(mucc PROPERTIES LINK_FLAGS
"--memory-init-file 0 \
-O2 \
--closure 1 \
-s EXPORTED_FUNCTIONS='[\"_conv\"]' \
-s EXTRA_EXPORTED_RUNTIME_METHODS='[\"ccall\", \"cwrap\", \"FS\"]' \
-s MODULARIZE=1"
)
set_target_properties(mucc PROPERTIES COMPILE_FLAGS
"--memory-init-file 0 \
-O2 \
--closure 1 \
-s EXPORTED_FUNCTIONS='[\"_conv\"]' \
-s EXTRA_EXPORTED_RUNTIME_METHODS='[\"ccall\", \"cwrap\", \"FS\"]' \
-s MODULARIZE=1"
)
endif(EMSCRIPTEN)