Skip to content

gukazma/webassembly-minimal-cmake-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

webassembly-minimal-cmake-project

emscripten minimal cmake project

Download and install emscripten SDK

emscripten document

Build with cmake

cd webassembly-minimal-cmake-project

mkdir build

cd build

Windows

Emscripten only support mingw32-make build toolchain,please install mingw before

cmake .. -DCMAKE_TOOLCHAIN_FILE=path to\emsdk\upstream\emscripten\cmake\Modules\Platform\Emscripten.cmake -DCMAKE_CROSSCOMPILING_EMULATOR=path to/emsdk/node/14.18.2_64bit/bin/node.exe -G "MinGW Makefiles"

mingw32-make

or

emcmake cmake ..

mingw32-make

Linux

ubuntu example

sudo apt-get install build-essential
emcmake cmake ..
make

Run

open index.html

you will see browser console below.

Screenshot

Screenshot

About

emscripten minimal cmake project

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published