aboutsummaryrefslogtreecommitdiff
path: root/triplets
diff options
context:
space:
mode:
authorMohammed Alyousef <may642_2000@hotmail.com>2020-06-03 02:07:41 +0300
committerGitHub <noreply@github.com>2020-06-02 16:07:41 -0700
commita6257ac262f441a97869b7ec40ddc4bcce19570d (patch)
tree62551e72a5b01b9cd02147cc7faf9d61cabd56e1 /triplets
parentad7a22732938a6df5abf7f04dbdbe3fee15af296 (diff)
downloadvcpkg-a6257ac262f441a97869b7ec40ddc4bcce19570d.tar.gz
vcpkg-a6257ac262f441a97869b7ec40ddc4bcce19570d.zip
[vcpkg] add x86-wasm.cmake to community triplets (#11323)
* add x86-wasm.cmake to community triplets The EMSDK enviroment variable is normally defined when first installing Emscripten. * Rename x86-wasm.cmake to wasm32-emscripten.cmake * Update wasm32-emscripten.cmake * Update wasm32-emscripten.cmake * Add wasm32 and wasm64 arch to docs * Create wasm64-emscripten.cmake * remove wasm64 * Delete wasm64-emscripten.cmake * Add wasm32 to list of identifiers * add emscripten VCPKG_CMAKE_SYSTEM_NAME support * add path check to EMSDK cmake toolchain
Diffstat (limited to 'triplets')
-rw-r--r--triplets/community/wasm32-emscripten.cmake15
1 files changed, 15 insertions, 0 deletions
diff --git a/triplets/community/wasm32-emscripten.cmake b/triplets/community/wasm32-emscripten.cmake
new file mode 100644
index 000000000..2394e1227
--- /dev/null
+++ b/triplets/community/wasm32-emscripten.cmake
@@ -0,0 +1,15 @@
+set(VCPKG_ENV_PASSTHROUGH EMSDK PATH)
+
+if(NOT DEFINED ENV{EMSDK})
+ message(FATAL_ERROR "The EMSDK environment variable must be defined")
+endif()
+
+if(NOT EXISTS $ENV{EMSDK}/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake)
+ message(FATAL_ERROR "Emscripten.cmake toolchain file not found")
+endif()
+
+set(VCPKG_TARGET_ARCHITECTURE wasm32)
+set(VCPKG_CRT_LINKAGE dynamic)
+set(VCPKG_LIBRARY_LINKAGE static)
+set(VCPKG_CMAKE_SYSTEM_NAME Emscripten)
+set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE $ENV{EMSDK}/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake)