Verified Commit fc366fb6 authored by nagayama15's avatar nagayama15

build: import binaryen

import binaryen version_97
parent a3c19c9c
...@@ -18,8 +18,10 @@ project(wasm-watermarker VERSION 0.1.0 LANGUAGES CXX) ...@@ -18,8 +18,10 @@ project(wasm-watermarker VERSION 0.1.0 LANGUAGES CXX)
enable_testing() enable_testing()
find_package(Threads)
include(ExternalProject) include(ExternalProject)
include(cmake/boost.cmake) include(cmake/boost.cmake)
include(cmake/binaryen.cmake)
include(cmake/fmt.cmake) include(cmake/fmt.cmake)
include(cmake/googletest.cmake) include(cmake/googletest.cmake)
......
ExternalProject_Add(binaryen
URL "https://github.com/WebAssembly/binaryen/archive/version_97.tar.gz"
PREFIX "${CMAKE_CURRENT_BINARY_DIR}/binaryen"
SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/binaryen/src"
BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/binaryen/build"
STAMP_DIR "${CMAKE_CURRENT_BINARY_DIR}/binaryen/stamp"
# UPDATE_COMMAND ""
INSTALL_COMMAND ""
TEST_COMMAND ""
CMAKE_ARGS
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
-DBUILD_STATIC_LIB=ON
-DCMAKE_BUILD_TYPE=Release
)
ExternalProject_Get_Property(binaryen source_dir)
ExternalProject_Get_Property(binaryen binary_dir)
add_library(binaryen::binaryen STATIC IMPORTED)
make_directory("${source_dir}/src") # To suppress non-exist directory warnings
set_target_properties(binaryen::binaryen PROPERTIES
IMPORTED_LOCATION "${binary_dir}/lib/libbinaryen.a"
INTERFACE_INCLUDE_DIRECTORIES "${source_dir}/src"
)
add_dependencies(binaryen::binaryen binaryen)
...@@ -13,7 +13,6 @@ ExternalProject_Add(fmt ...@@ -13,7 +13,6 @@ ExternalProject_Add(fmt
-DCMAKE_BUILD_TYPE=Release -DCMAKE_BUILD_TYPE=Release
-DFMT_DOC=OFF -DFMT_DOC=OFF
-DFMT_TEST=OFF -DFMT_TEST=OFF
) )
ExternalProject_Get_Property(fmt source_dir) ExternalProject_Get_Property(fmt source_dir)
......
...@@ -5,6 +5,7 @@ add_executable(test_kyut ...@@ -5,6 +5,7 @@ add_executable(test_kyut
) )
target_link_libraries(test_kyut target_link_libraries(test_kyut
Threads::Threads
fmtlib::fmt fmtlib::fmt
googletest::gtest googletest::gtest
googletest::gtest_main googletest::gtest_main
......
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