Hello! This guide will show you how to set up CMake projects in Visual Studio 2019 to use Emscripten. This guide is mostly for me to set this up again, but it'll hopefully be useful for someone else.
This guide assumes you've already installed and set up Emscripten but just want to use it with Visual Studio 2019.
After you've created your CMake project, right click CMakeLists.txt
in Visual Studio and click "CMake Settings For...". You'll get a new editor tab.
In this tab, locate the "CMake toolchain file" and set the path to the following, replacing EM_PATH with the path to the SDK: