brew install sdl2
sudo apt install libsdl2-dev
Download the development pack SDL2-devel-2.0.5-VC.zip
from here
Or use winget or choco
git submodule update --init --recursive
mkdir build && cd build
cmake -DDEBUG=off ..
cmake --build . -j8
git submodule update --init --recursive
mkdir build && cd build
cmake -DDEBUG=on ..
cmake --build . -j8
After this run the binary gbemu in the build folder.