20 lines
436 B
CMake
20 lines
436 B
CMake
cmake_minimum_required(VERSION 3.0)
|
|
|
|
set(EMO libmad.bc)
|
|
function(em_file name)
|
|
execute_process(COMMAND
|
|
emcc --bind
|
|
${CMAKE_SOURCE_DIR}/libmad.bc
|
|
${CMAKE_SOURCE_DIR}/decoder.cpp
|
|
${CMAKE_SOURCE_DIR}/${name}.cpp
|
|
-o ${CMAKE_BINARY_DIR}/${name}.js
|
|
-s WASM=0
|
|
-g4
|
|
)
|
|
endfunction(em_file)
|
|
|
|
configure_file(index.html index.html)
|
|
|
|
em_file(wrapper)
|
|
|