SFML community forums

Help => General => Topic started by: MickeyKnox on September 08, 2021, 09:46:32 pm

Title: How to build SFML on linux with a custom build folder?
Post by: MickeyKnox on September 08, 2021, 09:46:32 pm
The guide for building SFML with cmake https://www.sfml-dev.org/tutorials/2.5/compile-with-cmake.php (https://www.sfml-dev.org/tutorials/2.5/compile-with-cmake.php) seems to be focused on Windows.

What I've tried so far:

$ cmake ./build
CMake Error: The source directory "/home/ingmar/src/SFML/build" does not exist.
Specify --help for usage, or press the help button on the CMake GUI.

$ mkdir build
$ cmake ./build
CMake Error: The source directory "/home/ingmar/src/SFML/build" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.

Should I just just move CMakeLists.txt to build? Will pathes in there still be correct?

Running cmake . does work, but the guide explicitly suggest to specify a build folder. How do I do that?
Title: Re: How to build SFML on linux with a custom build folder?
Post by: Laurent on September 09, 2021, 07:50:17 am
Don't "try". You should rather read the CMake documentation, or tutorials. Even just "cmake --help" would help you.