2018-12-27 15:29:06 +00:00
|
|
|
cmake_minimum_required(VERSION 3.0)
|
2019-01-14 02:19:37 +00:00
|
|
|
|
|
|
|
set(EMO libmad.bc)
|
2018-12-27 15:29:06 +00:00
|
|
|
function(em_file name)
|
|
|
|
execute_process(COMMAND
|
|
|
|
emcc --bind
|
|
|
|
${CMAKE_SOURCE_DIR}/libmad.bc
|
2019-01-14 02:19:37 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/decoder.cpp
|
2018-12-27 15:29:06 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/${name}.cpp
|
|
|
|
-o ${CMAKE_BINARY_DIR}/${name}.js
|
|
|
|
-s WASM=0
|
2018-12-29 12:39:49 +00:00
|
|
|
-g4
|
2018-12-27 15:29:06 +00:00
|
|
|
)
|
|
|
|
endfunction(em_file)
|
|
|
|
|
|
|
|
configure_file(index.html index.html)
|
|
|
|
|
|
|
|
em_file(wrapper)
|
2019-01-14 02:19:37 +00:00
|
|
|
|