SFML mainline mirror
Go to file
Chris Thrasher dfc9b83fe4 Suggest fix when incorrect library type is found by find_package
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.
2025-01-09 21:57:10 +00:00
.github Ensure a C compiler is found during configuration 2024-12-05 08:46:09 +01:00
cmake Suggest fix when incorrect library type is found by find_package 2025-01-09 21:57:10 +00:00
doc Use new HTML Help flag for the install target 2024-12-11 17:22:53 +01:00
examples Remove unused RESOURCES_DIR cmake option 2025-01-04 18:08:47 -07:00
extlibs/headers Remove additional, obsolete extlibs 2024-12-06 13:02:30 +01:00
include/SFML Make keyboard key/scancode count variables inline 2025-01-07 11:36:17 +00:00
src/SFML Use correct type for accessing array 2025-01-07 20:00:01 +00:00
test Use approximation when comparing floats in tests 2025-01-08 11:33:40 +00:00
tools Patch out include and pkgconfig files for external libraries 2024-12-14 21:59:28 +01:00
.clang-format Replaced OpenAL with miniaudio. 2024-04-25 10:24:11 +02:00
.clang-tidy Build dependency libraries instead of bundling pre-built binaries. 2024-12-04 23:52:24 +01:00
.editorconfig Added an .editorconfig file 2015-02-06 11:07:39 +01:00
.gitattributes Fix file extension typo in .gitattributes 2024-01-15 16:47:09 -07:00
.gitignore Remove irrelevant entries from .gitignore 2023-08-29 23:14:58 -06:00
changelog.md Remove irrelevant change from SFML 3 changelog 2024-12-23 18:22:22 -06:00
CMakeLists.txt Update SFML version to 3.1.0 2024-12-21 11:28:47 -06:00
CMakePresets.json Enable standard library assertions in CI 2024-06-23 08:37:06 +02:00
CONTRIBUTING.md Turned the header image in readme.md into a link. 2018-02-10 17:12:54 +01:00
license.md Update copyright year 2024-01-26 12:00:22 -07:00
migration.md Mention libxi-dev as dependency 2024-12-23 18:22:22 -06:00
readme.md Update state of development 2024-12-22 11:17:05 -06:00

SFML logo

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:

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

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