This grew out of my work creating an sfml port for macports, but should
be helpful for package maintainers of various distributions:
* add an SFML_USE_SYSTEM_DEPS option to ignore everything in extlibs/
except for headers/stb_image, and use the system versions
* install pkg-config files if a pkg-config program is found
and either lib/pkgconfig or libdata/pkgconfig exists under the
INSTALL_PREFIX, or the SFML_INSTALL_PKGCONFIG_FILES flag is set
explicitly
* install pkg-config files for static libs too, add the necessary
Requires.private and Libs.private entries to the .pc files to support
static linking
* on OS X, honor all INSTALL_NAME and RPATH related cmake variables and
only set the INSTALL_NAME_DIR to "@rpath" if none of them is set, this
preserves the default behavior of using @rpath but also allows
overriding by the usual cmake mechanisms
This should improve the signing process of Mac Applications.
This improves the frameworks of external dependencies used by SFML. To
patch sfml-*.framework, one would need to customised the
`MACOSX_FRAMEWORK_INFO_PLIST` cmake property and provide a custom
Info.plist file with CFBundleSupportedPlatforms property set. See
https://cmake.org/cmake/help/latest/prop_tgt/FRAMEWORK.html
This is however not required (probably) if one used dylibs instead.
Related to #1020 and #1036. Credits go to @kipbits.
Discussion thread: http://en.sfml-dev.org/forums/index.php?topic=20875.0
Basically, the issue with sf::Image::create was, that it would either
occupy space, it doesn't need, because std::vector::resize doesn't
actually shrink the vector, or reallocate in an inefficient way by
needlessly copying the whole old image over. Neither did it grant strong
exception safety guarantee because it changed the non-throwing members
(m_size) prior to doing the critical stuff (reallocating) which may
throw. Changing the order and using a temporary
(create-temporary-and-swap idiom; see http://www.gotw.ca/gotw/059.htm)
fixes both of these problems.
Changed the error message for using uniforms to use the word uniform instead of the word parameter since parameter's deprecation.
A minor text output alteration to keep consistent with the new interface.
This commit fixes the FindXCB.cmake module for the case no components
are requested. The previous version assigned `XCB_FIND_COMPONENTS`
list to an empty variable name.
I was lucky enough to catch the bug in a corner case where both
`XCB_COMPONENTS` and `XCB_FIND_COMPONENTS` were empty and `set()`
command failed, but note this awesome CMake language supports more annoying
corner cases like `XCB_COMPONENTS` empty and `XCB_FIND_COMPONENTS`
with two elements, which results in the following `set()` invocation:
``` cmake
set(${XCB_FIND_COMPONENTS[0]} ${XCB_FIND_COMPONENTS[1]})
```
So always beware of CMake secret charms...
* Updated the Android toolchain file to support NDKs up to the latest release (r12b; based on https://github.com/gongminmin/android-cmake).
* Fixed missing sRGB extension defines - also SFML once again compiles for older target API levels not having the sRGB extensions (fixes#1079, supersedes #1085).
* Changed SFML's default STL runtime to `stlport_shared`, since `c++_shared` is no longer supported.
This implementation uses the following workaround:
- resize flag is removed from the window when the cursor is grabbed
- when grabbed, the cursor is projected inside the view if needed
- to avoid letting the user clic outside the view, the cursor is
disconnected and manually moved using relative motion
- the initial potential projection of the cursor results in a big
delta for the next move and needed to be somehow ignored (see
note about m_deltaXBuffer and m_deltaYBuffer in SFOpenGLView.h)