From 7d7a1c30005071d34adb369579836900f999610d Mon Sep 17 00:00:00 2001 From: kirkrodrigues <2454684+kirkrodrigues@users.noreply.github.com> Date: Fri, 4 Oct 2024 04:31:45 -0400 Subject: [PATCH] Pass emsdk path from Taskfile to CMake build; Fix emsdk task name in README. (#16) --- README.md | 2 +- Taskfile.yml | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 40e7dbfa..f28aa4a3 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ Follow the steps below to develop and contribute to the project. ## Set up Before opening the project in an IDE, you'll first need to download and install [emscripten]: ```shell -task emscripten +task emsdk ``` ## Linting diff --git a/Taskfile.yml b/Taskfile.yml index 4dc4f6c6..240f33da 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -50,8 +50,13 @@ tasks: cmds: - "mkdir -p '{{.OUTPUT_DIR}}'" - |- - cmake -S "{{.ROOT_DIR}}" -B "{{.OUTPUT_DIR}}" -G "Unix Makefiles" - cmake --build "{{.OUTPUT_DIR}}" --parallel --target "{{.G_CLP_FFI_JS_TARGET_NAME}}" + cmake \ + -G "Unix Makefiles" \ + -DCMAKE_TOOLCHAIN_FILE="{{.G_EMSDK_DIR}}/upstream/emscripten/cmake/Modules/Platform/\ + Emscripten.cmake" \ + -S "{{.ROOT_DIR}}" \ + -B "{{.OUTPUT_DIR}}" + - "cmake --build '{{.OUTPUT_DIR}}' --parallel --target '{{.G_CLP_FFI_JS_TARGET_NAME}}'" # This command must be last - task: "utils:compute-checksum" vars: