File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ set (VCPKG_ENV_PASSTHROUGH_UNTRACKED EMSCRIPTEN_ROOT EMSDK PATH )
2+
3+ if (NOT DEFINED ENV{EMSCRIPTEN_ROOT})
4+ find_path (EMSCRIPTEN_ROOT "emcc" )
5+ else ()
6+ set (EMSCRIPTEN_ROOT "$ENV{EMSCRIPTEN_ROOT} " )
7+ endif ()
8+
9+ if (NOT EMSCRIPTEN_ROOT)
10+ if (NOT DEFINED ENV{EMSDK})
11+ message (FATAL_ERROR "The emcc compiler not found in PATH" )
12+ endif ()
13+ set (EMSCRIPTEN_ROOT "$ENV{EMSDK} /upstream/emscripten" )
14+ endif ()
15+
16+ if (NOT EXISTS "${EMSCRIPTEN_ROOT} /cmake/Modules/Platform/Emscripten.cmake" )
17+ message (FATAL_ERROR "Emscripten.cmake toolchain file not found" )
18+ endif ()
19+
20+ set (VCPKG_TARGET_ARCHITECTURE wasm32)
21+ set (VCPKG_CRT_LINKAGE dynamic)
22+ set (VCPKG_LIBRARY_LINKAGE static)
23+ set (VCPKG_CMAKE_SYSTEM_NAME Emscripten)
24+ set (VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${EMSCRIPTEN_ROOT} /cmake/Modules/Platform/Emscripten.cmake" )
25+
26+ set (ENV{EMCC_CFLAGS} "$ENV{EMCC_CFLAGS} -pthread" )
27+
28+ set (VCPKG_BUILD_TYPE release)
You can’t perform that action at this time.
0 commit comments