cmake: Use CMAKE_BINARY_DIR instead of ${CMAKE_CURRENT_SOURCE_DIR}/build (#1410)

This commit is contained in:
YAMAMOTO Takashi 2022-08-24 16:57:03 +09:00 committed by GitHub
parent 08eeeb748c
commit d41543f829
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 12 additions and 12 deletions

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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
)

View File

@ -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
)

View File

@ -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
)