From bf1ef49681a87c970d9c68ace70a16a9ee5d246f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Fri, 21 Feb 2020 12:40:17 +0100 Subject: [PATCH] Build library target with WASI support (#108) Fixes #107 --- source/CMakeLists.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index 8a1304c..a6b7372 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -43,3 +43,13 @@ else() # GCC specific flags here endif() endif() + +option(BUILD_WASI_SUPPORT "Build with WASI support" OFF) + +if (BUILD_WASI_SUPPORT) + if (WASIENV) + target_compile_definitions(m3 PUBLIC d_m3HasMetaWASI) + elseif (NOT EMSCRIPTEN) + target_compile_definitions(m3 PUBLIC d_m3HasWASI) + endif() +endif()