web-wasi: Patch CMake with WASI platform

WASI.cmake taken from the wasi-sdk repository.

To address the build time warning:

  System is unknown to cmake, create:
  Platform/WASI to use this system, please post your config file on
  discourse.cmake.org so it can be added to cmake
This commit is contained in:
Matt McCormick 2021-10-13 15:40:49 -04:00
parent c994e33650
commit 93b23ec997
3 changed files with 3 additions and 2 deletions

View File

@ -26,6 +26,8 @@ ENV AR=${CROSS_ROOT}/bin/llvm-ar \
CXX=clang++-wasi-sysroot.sh \
LD=${CROSS_ROOT}/bin/wasm-ld
COPY WASI.cmake /usr/src/
RUN mv /usr/src/WASI.cmake /usr/share/cmake-*/Modules/Platform/
COPY Toolchain.cmake ${CROSS_ROOT}/
ENV CMAKE_TOOLCHAIN_FILE ${CROSS_ROOT}/Toolchain.cmake

View File

@ -1,5 +1,3 @@
set(WASI 1)
include($ENV{WASI_SDK_PATH}/share/cmake/wasi-sdk.cmake)
set(CMAKE_FIND_ROOT_PATH $ENV{CROSS_ROOT})

1
web-wasi/WASI.cmake Normal file
View File

@ -0,0 +1 @@
set(WASI 1)