Commit 625f426a authored by nagayama15's avatar nagayama15

📥 Import Binaryen v72 as a dependency.

parent d13c226b
...@@ -12,4 +12,7 @@ if (NOT CMAKE_BUILD_TYPE) ...@@ -12,4 +12,7 @@ if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release) set(CMAKE_BUILD_TYPE Release)
endif (NOT CMAKE_BUILD_TYPE) endif (NOT CMAKE_BUILD_TYPE)
include(ExternalProject)
include(cmake/binaryen.cmake)
add_subdirectory(src) add_subdirectory(src)
...@@ -10,7 +10,7 @@ OS: Ubuntu 18.04 ...@@ -10,7 +10,7 @@ OS: Ubuntu 18.04
Compilers: GCC, Clang, emcc Compilers: GCC, Clang, emcc
Libraries: binaryen Libraries: Binaryen v72
## 命名規約 ## 命名規約
...@@ -32,5 +32,5 @@ $ make ...@@ -32,5 +32,5 @@ $ make
## 実行方法 ## 実行方法
```shell ```shell
$ wasm-watermarker <input-wasm> $ wasm-watermarker <input-wasm> <watermark>
``` ```
ExternalProject_Add(
binaryen
URL https://github.com/WebAssembly/binaryen/archive/version_72.zip
PREFIX binaryen
INSTALL_COMMAND ""
TEST_COMMAND ""
LOG_DOWNLOAD ON
)
ExternalProject_Get_Property(binaryen source_dir)
ExternalProject_Get_Property(binaryen binary_dir)
add_library(binaryen_wasm STATIC IMPORTED)
add_dependencies(binaryen_wasm binaryen)
set_target_properties(binaryen_wasm
PROPERTIES
IMPORTED_LOCATION ${binary_dir}/lib/libwasm.a
INTERFACE_INCLUDE_DIRECTORIES ${source_dir}/src
)
add_executable(wasm-watermarker add_executable(kyut
wasm-watermarker.cpp kyut.cpp
)
target_link_libraries(kyut
binaryen_wasm
) )
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment