Skip to content

Commit

Permalink
Changes required to compile on emscripten target.
Browse files Browse the repository at this point in the history
  • Loading branch information
chriseth committed Sep 14, 2015
1 parent 4360e04 commit 6b4e564
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
10 changes: 8 additions & 2 deletions solc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()

0 comments on commit 6b4e564

Please sign in to comment.