mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2024-11-26 15:32:05 +00:00
cmake: Use CMAKE_BINARY_DIR instead of ${CMAKE_CURRENT_SOURCE_DIR}/build (#1410)
This commit is contained in:
parent
08eeeb748c
commit
d41543f829
|
@ -104,7 +104,7 @@ else()
|
|||
target_link_libraries (iwasm ${LLVM_AVAILABLE_LIBS} ${UV_A_LIBS} -lm -ldl -landroid -llog)
|
||||
endif()
|
||||
|
||||
set (distribution_DIR ${CMAKE_CURRENT_SOURCE_DIR}/build/distribution)
|
||||
set (distribution_DIR ${CMAKE_BINARY_DIR}/distribution)
|
||||
set_target_properties (iwasm PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${distribution_DIR}/wasm/lib")
|
||||
|
||||
add_custom_command (TARGET iwasm POST_BUILD
|
||||
|
|
|
@ -135,11 +135,11 @@ ExternalProject_Add(WASM_MODULE
|
|||
-S ${CMAKE_CURRENT_SOURCE_DIR}/wasm-apps
|
||||
BUILD_COMMAND ${CMAKE_COMMAND} --build .
|
||||
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy
|
||||
./mA.wasm ${CMAKE_CURRENT_SOURCE_DIR}/build/
|
||||
./mB.wasm ${CMAKE_CURRENT_SOURCE_DIR}/build/
|
||||
./mC.wasm ${CMAKE_CURRENT_SOURCE_DIR}/build/
|
||||
./mD.wasm ${CMAKE_CURRENT_SOURCE_DIR}/build/
|
||||
./mE.wasm ${CMAKE_CURRENT_SOURCE_DIR}/build/
|
||||
./mA.wasm ${CMAKE_BINARY_DIR}
|
||||
./mB.wasm ${CMAKE_BINARY_DIR}
|
||||
./mC.wasm ${CMAKE_BINARY_DIR}
|
||||
./mD.wasm ${CMAKE_BINARY_DIR}
|
||||
./mE.wasm ${CMAKE_BINARY_DIR}
|
||||
)
|
||||
|
||||
################ NATIVE
|
||||
|
|
|
@ -87,9 +87,9 @@ ExternalProject_Add(wasm-app
|
|||
${CMAKE_CURRENT_SOURCE_DIR}/wasm-src
|
||||
BUILD_COMMAND ${CMAKE_COMMAND} --build .
|
||||
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy
|
||||
tcp_client.wasm ${CMAKE_CURRENT_SOURCE_DIR}/build
|
||||
tcp_server.wasm ${CMAKE_CURRENT_SOURCE_DIR}/build
|
||||
send_recv.wasm ${CMAKE_CURRENT_SOURCE_DIR}/build
|
||||
tcp_client.wasm ${CMAKE_BINARY_DIR}
|
||||
tcp_server.wasm ${CMAKE_BINARY_DIR}
|
||||
send_recv.wasm ${CMAKE_BINARY_DIR}
|
||||
)
|
||||
|
||||
add_executable(tcp_server ${CMAKE_CURRENT_SOURCE_DIR}/wasm-src/tcp_server.c)
|
||||
|
|
|
@ -90,5 +90,5 @@ ExternalProject_Add(xnnpack
|
|||
//:f32_sqrt_ulp_eval.wasm
|
||||
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/xnnpack/bazel-out/wasm-opt/bin/
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/build/wasm-opt
|
||||
${CMAKE_BINARY_DIR}/wasm-opt
|
||||
)
|
||||
|
|
|
@ -42,5 +42,5 @@ ExternalProject_Add(bwa
|
|||
-DCMAKE_SYSROOT=${WASI_SDK_HOME}/share/wasi-sysroot
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bwa
|
||||
BUILD_COMMAND make bwa_wasm_opt
|
||||
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy ./bwa.opt.wasm ${CMAKE_CURRENT_SOURCE_DIR}/build/bwa.wasm
|
||||
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy ./bwa.opt.wasm ${CMAKE_BINARY_DIR}/bwa.wasm
|
||||
)
|
||||
|
|
|
@ -26,5 +26,5 @@ ExternalProject_Add(codecbench
|
|||
-DCMAKE_SYSROOT=${WASI_SDK_HOME}/share/wasi-sysroot
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/meshoptimizer
|
||||
BUILD_COMMAND make codecbench
|
||||
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy ./codecbench.wasm ${CMAKE_CURRENT_SOURCE_DIR}/build/codecbench.wasm
|
||||
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy ./codecbench.wasm ${CMAKE_BINARY_DIR}/codecbench.wasm
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue
Block a user