- Just open this project folder in Visual Studio 2019 (or newer), with CMake extension installed.
- From top toolbar, change mode to Release, and click Build > Build All.
- Done. That's it. Your game .EXE will be in
{project_dir}/out/Release/bin
- If the game fails to start, make sure
openal32.dll
is present in same folder with your .EXE. If not, copy it from SFML directory${SFML_HOME}/bin/openal32.dll
- Open this project directory in your terminal.
- Ensure CMake 3.20 or higher is installed. Verify with
cmake --version
- Once installed, run the following commands:
mkdir build
cd build
cmake . . -DCMAKE_BUILD_TYPE=Release
cmake --build . --config Release --target all
- Your executable (
.app
bundle for MacOS) and binary for Linux will be found in{project_dir}/build/bin
-
Download CMake GUI installer for your OS from the official site. (supported on all desktop OS)
-
On MacOS, to add Cmake CLI to path, run the following command:
sudo "/Applications/CMake.app/Contents/bin/cmake-gui" --install
-
Set "Source Folder" to this project root. Then set "Build Folder" to a NEW relative folder
/build
or/out
. See image above. Then click "Configure", -
In the next screen, Choose Unix Makefiles on Linux & Mac. Choose Visual Studio on Windows. Then click OK. Click Configure once more, then Generate.
-
Finally, open build folder, then run
make all
in Terminal (Linux and macOS). On Windows, double-click the generated VS project.sln
file.