forked from rime/librime
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwasm_notes.txt
More file actions
49 lines (28 loc) · 938 Bytes
/
wasm_notes.txt
File metadata and controls
49 lines (28 loc) · 938 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
38
39
40
41
42
43
44
45
46
47
48
49
emcmake cmake \
. -Bbuild \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DBUILD_SHARED_LIBS:BOOL=OFF \
-DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} -s WASM=1 -s ASSERTIONS=1 -s DISABLE_EXCEPTION_CATCHING=0 --memory-init-file 0"
In build/data/CMakeFiles/Dictionaries.dir/build.make
replace
\"/home/ztl8702/emsdk-portable/node/8.9.1_64bit/bin/node\"
with
/home/ztl8702/emsdk-portable/node/8.9.1_64bit/bin/node
in opencc_dict.js
replace
wasmBinaryFile="opencc_dict.wasm";
with
wasmBinaryFile=__dirname+"/"+"opencc_dict.wasm";
===================
emcmake cmake \
. -Bbuild \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} -s WASM=1 -s ASSERTIONS=1" \
&& cmake --build build -- VERBOSE=1
====================
Commented out
#set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
#set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
#set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
in Emscripten.cmake