aboutsummaryrefslogtreecommitdiffstats
path: root/solc/CMakeLists.txt
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2015-09-15 00:36:39 +0800
committerchriseth <c@ethdev.com>2015-09-15 00:36:39 +0800
commit6b4e564b7c8f2a47cafa743e786d8873f2c04078 (patch)
tree048129b165a3bfd9d5fd67d28bc06da2c4c88407 /solc/CMakeLists.txt
parent4360e0459622e7843ca9f8d7fb5113da0b8a044e (diff)
downloaddexon-solidity-6b4e564b7c8f2a47cafa743e786d8873f2c04078.tar.gz
dexon-solidity-6b4e564b7c8f2a47cafa743e786d8873f2c04078.tar.zst
dexon-solidity-6b4e564b7c8f2a47cafa743e786d8873f2c04078.zip
Changes required to compile on emscripten target.
Diffstat (limited to 'solc/CMakeLists.txt')
-rw-r--r--solc/CMakeLists.txt10
1 files changed, 8 insertions, 2 deletions
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()