dfc9b83fe4
This is what it currently looks like when find_package(SFML) fails due to locating the incorrect library type: CMake Error at <path>/<to>/lib/cmake/SFML/SFMLConfig.cmake:182 (message): Requested SFML configuration (Shared) was not found Call Stack (most recent call first): CMakeLists.txt:7 (find_package) CMake Error at CMakeLists.txt:7 (find_package): Found package configuration file: <path>/<to>/lib/cmake/SFML/SFMLConfig.cmake but it set SFML_FOUND to FALSE so package "SFML" is considered to be NOT FOUND. After this change the "Requested SFML configuration" line is followed by either Set SFML_STATIC_LIBRARIES to ON for static libraries or Set SFML_STATIC_LIBRARIES to OFF for shared libraries depending on the value of SFML_STATIC_LIBRARIES. This should help clear up a common source of confusion when users build SFML from source. The library follows CMake convention of building static libraries by default but our config module assumes shared libraries by default so those who build SFML from source are prone to run into this error. |
||
---|---|---|
.github | ||
cmake | ||
doc | ||
examples | ||
extlibs/headers | ||
include/SFML | ||
src/SFML | ||
test | ||
tools | ||
.clang-format | ||
.clang-tidy | ||
.editorconfig | ||
.gitattributes | ||
.gitignore | ||
changelog.md | ||
CMakeLists.txt | ||
CMakePresets.json | ||
CONTRIBUTING.md | ||
license.md | ||
migration.md | ||
readme.md |
SFML — Simple and Fast Multimedia Library
SFML is a simple, fast, cross-platform and object-oriented multimedia API. It provides access to windowing, graphics, audio and network. It is written in C++, and has bindings for various languages such as C, .Net, Ruby, Python.
State of Development
Development is focused on version 3 in the master
branch.
No more features are planned for the 2.x release series.
CMake Template
The easiest way to get started with SFML is our CMake-based project template. This template will automatically download and build SFML alongside your own application. Read the README for full instructions on how to use it.
Download
- You can get the latest official release on SFML's website.
- You can also get the source code of the current development version from the Git repository.
- Alternatively, you can get the latest snapshot / artifact builds from the artifacts storage.
Install
Follow the instructions of the tutorials, there is one for each platform/compiler that SFML supports.
Learn
There are several places to learn SFML:
- The official tutorials
- The online API documentation
- The community wiki
Community
Here are some useful community links:
Contribute
SFML is an open-source project, and it needs your help to go on growing and improving. If you want to get involved and suggest some additional features, file a bug report or submit a patch, please have a look at the contribution guidelines.
Authors
- Laurent Gomila (laurent@sfml-dev.org)
- Marco Antognini (hiura@sfml-dev.org)
- binary1248 (binary1248@hotmail.com)
- Lukas Dürrenberger (eXpl0it3r@sfml-dev.org)
- Jonathan De Wachter (dewachter.jonathan@gmail.com)
- Jan Haller (bromeon@sfml-dev.org)
- Mario Liebisch (mario@sfml-dev.org)
- Stefan Schindler (tank@sfml-dev.org)
- Artur Moreira (artturmoreira@gmail.com)
- Vittorio Romeo (vittorioromeo@sfml-dev.org)
- Chris Thrasher (thrasher@sfml-dev.org)
- And many other members of the SFML community
License
The SFML libraries and source code are distributed under the zlib/libpng license. See license.md. External libraries used by SFML are distributed under their own licenses.
In short, SFML is free for any use (commercial or personal, proprietary or open-source). You can use SFML in your project without any restriction. You can even omit to mention that you use SFML -- although it would be appreciated.
External libraries used by SFML
- stb_image and stb_image_write are public domain
- freetype is under the FreeType license or the GPL license
- libogg is under the BSD license
- libvorbis is under the BSD license
- libflac is under the BSD license
- minimp3 is under the CC0 license
- miniaudio is public domain or under the MIT No Attribution license