Commit bf248ea9 authored by nagayama15's avatar nagayama15

Fix link error

parent d7efd018
...@@ -12,6 +12,8 @@ if (NOT CMAKE_BUILD_TYPE) ...@@ -12,6 +12,8 @@ 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)
find_package(Threads REQUIRED)
include(ExternalProject) include(ExternalProject)
include(cmake/binaryen.cmake) include(cmake/binaryen.cmake)
include(cmake/fmt.cmake) include(cmake/fmt.cmake)
......
...@@ -17,14 +17,7 @@ file(MAKE_DIRECTORY ${source_dir}/src) ...@@ -17,14 +17,7 @@ file(MAKE_DIRECTORY ${source_dir}/src)
add_library(binaryen::binaryen STATIC IMPORTED) add_library(binaryen::binaryen STATIC IMPORTED)
add_dependencies(binaryen::binaryen binaryen) add_dependencies(binaryen::binaryen binaryen)
set_target_properties(binaryen::binaryen set(binaryen_LIBS
PROPERTIES
IMPORTED_LOCATION ${binary_dir}/lib/libpasses.a
INTERFACE_INCLUDE_DIRECTORIES ${source_dir}/src
INTERFACE_LINK_LIBRARIES "${binaryen_other_libraries}"
)
target_link_libraries(binaryen::binaryen INTERFACE
${binary_dir}/lib/libwasm.a ${binary_dir}/lib/libwasm.a
${binary_dir}/lib/libasmjs.a ${binary_dir}/lib/libasmjs.a
${binary_dir}/lib/libpasses.a ${binary_dir}/lib/libpasses.a
...@@ -32,4 +25,13 @@ target_link_libraries(binaryen::binaryen INTERFACE ...@@ -32,4 +25,13 @@ target_link_libraries(binaryen::binaryen INTERFACE
${binary_dir}/lib/libir.a ${binary_dir}/lib/libir.a
${binary_dir}/lib/libemscripten-optimizer.a ${binary_dir}/lib/libemscripten-optimizer.a
${binary_dir}/lib/libsupport.a ${binary_dir}/lib/libsupport.a
${binary_dir}/lib/libwasm.a
Threads::Threads
)
set_target_properties(binaryen::binaryen
PROPERTIES
IMPORTED_LOCATION ${binary_dir}/lib/libpasses.a
INTERFACE_INCLUDE_DIRECTORIES ${source_dir}/src
INTERFACE_LINK_LIBRARIES "${binaryen_LIBS}"
) )
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