From 6b4e564b7c8f2a47cafa743e786d8873f2c04078 Mon Sep 17 00:00:00 2001 From: chriseth Date: Mon, 14 Sep 2015 18:36:39 +0200 Subject: Changes required to compile on emscripten target. --- solc/CMakeLists.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'solc') diff --git a/solc/CMakeLists.txt b/solc/CMakeLists.txt index 2d23dab1..40ab0e21 100644 --- a/solc/CMakeLists.txt +++ b/solc/CMakeLists.txt @@ -17,5 +17,11 @@ else() eth_install_executable(${EXECUTABLE}) endif() -add_library(soljson jsonCompiler.cpp ${HEADERS}) -target_link_libraries(soljson solidity) +if (EMSCRIPTEN) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s EXPORTED_FUNCTIONS='[\"_compileJSON\",\"_version\"]'") + add_executable(soljson jsonCompiler.cpp ${HEADERS}) + eth_use(soljson REQUIRED Solidity) +else() + add_library(soljson jsonCompiler.cpp ${HEADERS}) + target_link_libraries(soljson solidity) +endif() -- cgit v1.2.3