Changes required to compile on emscripten target.

This commit is contained in:
chriseth 2015-09-14 18:36:39 +02:00
parent 4360e04596
commit 6b4e564b7c
2 changed files with 11 additions and 3 deletions

View File

@ -29,6 +29,8 @@ print_config()
add_subdirectory(libsolidity)
add_subdirectory(solc)
add_subdirectory(test)
if (NOT EMSCRIPTEN)
add_subdirectory(test)
endif()
# TODO installation and packaging rules

View File

@ -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()