13 lines
572 B
CMake
13 lines
572 B
CMake
|
project (client)
|
||
|
cmake_minimum_required(VERSION 3.5.1)
|
||
|
|
||
|
add_definitions(-std=c++11 -O3 -pthread)
|
||
|
include_directories(include)
|
||
|
include_directories(eigen-3.4.0)
|
||
|
|
||
|
file(GLOB SOURCES src/main.cpp)
|
||
|
|
||
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/public")
|
||
|
add_executable(wasm-main ${SOURCES})
|
||
|
set_target_properties(wasm-main PROPERTIES LINK_FLAGS "-pthread -s INITIAL_MEMORY=52428800 -s PTHREAD_POOL_SIZE=navigator.hardwareConcurrency -s EXPORTED_FUNCTIONS=['_main','_malloc','_free'] -s EXPORTED_RUNTIME_METHODS=['ccall','cwrap'] -s EXPORT_ALL=1 -lembind")
|