SFML community forums

Help => General => Topic started by: Brumus14 on July 24, 2023, 04:54:33 pm

Title: Cross-platform building from source code
Post by: Brumus14 on July 24, 2023, 04:54:33 pm
Hello, I am somewhat new to SFML and have made a project. I created it on linux and building with g++ which was working fine, however I just want to know if there is any easy way to build from my projects source code to Windows, Linux and Mac.
Thanks for any help.
Title: Re: Cross-platform building from source code
Post by: Thrasher on July 24, 2023, 05:57:34 pm
https://github.com/SFML/cmake-sfml-project

The easiest way to build for all major platforms is to use the official project template. It uses CMake so it works on all OSes. To be clear, this project automatically crosscompile your projects, but it does mean you can use the same code and build it on a different OS to get an executable for that particular OS. No need to write separate build scripts for each OS.