Browse Source

Added information on how to build with emscripten

Jorrit Rouwe 1 year ago
parent
commit
9eb09f8d33
1 changed files with 16 additions and 4 deletions
  1. 16 4
      Build/README.md

+ 16 - 4
Build/README.md

@@ -72,7 +72,7 @@ To implement your custom memory allocator override Allocate, Free, Reallocate, A
 			<summary>MSVC CL (default compiler)</summary>
 			<summary>MSVC CL (default compiler)</summary>
 			<ul>
 			<ul>
 				<li>Download Visual Studio 2022 (Community or other edition)</li>
 				<li>Download Visual Studio 2022 (Community or other edition)</li>
-				<li>Download CMake 3.15+ (https://cmake.org/download/)</li>
+				<li>Download CMake 3.20+ (https://cmake.org/download/)</li>
 				<li>Run cmake_vs2022_cl.bat</li>
 				<li>Run cmake_vs2022_cl.bat</li>
 				<li>Open the resulting project file VS2022_CL\JoltPhysics.sln</li>
 				<li>Open the resulting project file VS2022_CL\JoltPhysics.sln</li>
 				<li>Compile and run either 'Samples' or 'UnitTests'</li>
 				<li>Compile and run either 'Samples' or 'UnitTests'</li>
@@ -82,7 +82,7 @@ To implement your custom memory allocator override Allocate, Free, Reallocate, A
 			<summary>MSVC CL - 32 bit</summary>
 			<summary>MSVC CL - 32 bit</summary>
 			<ul>
 			<ul>
 				<li>Download Visual Studio 2022 (Community or other edition)</li>
 				<li>Download Visual Studio 2022 (Community or other edition)</li>
-				<li>Download CMake 3.15+ (https://cmake.org/download/)</li>
+				<li>Download CMake 3.20+ (https://cmake.org/download/)</li>
 				<li>Run cmake_vs2022_cl_32bit.bat</li>
 				<li>Run cmake_vs2022_cl_32bit.bat</li>
 				<li>Open the resulting project file VS2022_CL_32BIT\JoltPhysics.sln</li>
 				<li>Open the resulting project file VS2022_CL_32BIT\JoltPhysics.sln</li>
 				<li>Compile and run either 'Samples' or 'UnitTests'</li>
 				<li>Compile and run either 'Samples' or 'UnitTests'</li>
@@ -93,7 +93,7 @@ To implement your custom memory allocator override Allocate, Free, Reallocate, A
 			<ul>
 			<ul>
 				<li>Download Visual Studio 2022 (Community or other edition)</li>
 				<li>Download Visual Studio 2022 (Community or other edition)</li>
 				<li>Make sure to install "C++ Clang Compiler for Windows 11.0.0+" and "C++ Clang-cl for v142+ build tools (x64/x86)" using the Visual Studio Installer</li>
 				<li>Make sure to install "C++ Clang Compiler for Windows 11.0.0+" and "C++ Clang-cl for v142+ build tools (x64/x86)" using the Visual Studio Installer</li>
-				<li>Download CMake 3.15+ (https://cmake.org/download/)</li>
+				<li>Download CMake 3.20+ (https://cmake.org/download/)</li>
 				<li>Run cmake_vs2022_clang.bat</li>
 				<li>Run cmake_vs2022_clang.bat</li>
 				<li>Open the resulting project file VS2022_Clang\JoltPhysics.sln</li>
 				<li>Open the resulting project file VS2022_Clang\JoltPhysics.sln</li>
 				<li>Compile and run either 'Samples' or 'UnitTests'</li>
 				<li>Compile and run either 'Samples' or 'UnitTests'</li>
@@ -104,7 +104,7 @@ To implement your custom memory allocator override Allocate, Free, Reallocate, A
 			<ul>
 			<ul>
 				<li>Download Visual Studio 2022+ (Community or other edition)</li>
 				<li>Download Visual Studio 2022+ (Community or other edition)</li>
 				<li>Make sure to install "Universal Windows Platform development" using the Visual Studio Installer</li>
 				<li>Make sure to install "Universal Windows Platform development" using the Visual Studio Installer</li>
-				<li>Download CMake 3.15+ (https://cmake.org/download/)</li>
+				<li>Download CMake 3.20+ (https://cmake.org/download/)</li>
 				<li>Run cmake_vs2022_uwp.bat</li>
 				<li>Run cmake_vs2022_uwp.bat</li>
 				<li>Open the resulting project file VS2022_UWP\JoltPhysics.sln</li>
 				<li>Open the resulting project file VS2022_UWP\JoltPhysics.sln</li>
 				<li>Compile and run 'UnitTests'</li>
 				<li>Compile and run 'UnitTests'</li>
@@ -188,6 +188,18 @@ To implement your custom memory allocator override Allocate, Free, Reallocate, A
 	</ul>
 	</ul>
 </details>
 </details>
 
 
+<details>
+	<summary>Emscripten (tested only on Linux)</summary>
+	<ul>
+		<li>Install Emscripten (https://emscripten.org/docs/getting_started/downloads.html)</li>
+		<li>Install nodejs (apt-get install nodejs)</li>
+		<li>Download CMake 3.23+ (https://cmake.org/download/)</li>
+		<li>Run: ./cmake_linux_emscripten.sh Release (currently some unit tests fail in Debug for unknown reasons)</li>
+		<li>Go to the WASM_Release folder</li>
+		<li>Run: make -j$(nproc) && node UnitTests.js</li>
+	</ul>
+</details>
+
 ## Other Build Tools
 ## Other Build Tools
 
 
 * A vcpkg package is available [here](https://github.com/microsoft/vcpkg/tree/master/ports/joltphysics).
 * A vcpkg package is available [here](https://github.com/microsoft/vcpkg/tree/master/ports/joltphysics).