The "main" component is not available everywhere, but passing it to the
find_package(SFML) call via the OPTIONAL_COMPONENTS still fails the call
on platforms like Linux.
This commit enables SFML to be used the same in a cross-platform fashion
without forcing consumers to put custom logic around importing SFML.
Example that works with this commit, but break before:
find_package(SFML REQUIRED graphics OPTIONAL_COMPONENTS main)
target_link_libraries(dummy PRIVATE SFML::graphics)
if(SFML_MAIN_FOUND)
target_link_libraries(dummy PRIVATE SFML::main)
endif()
Adds vector algebra functionality as member functions for Vector2<T>, with some methods limited to floating-point T.
Also adds UnitX and UnitY constants for the two axis unit vectors.
Transformable.cpp was originally compiled when I first submitted
PR #1973. While that PR was in review, #2012 got merged which
changed how tests are compiled. These two PR were in conflict so
when I went to resolve conflicts on #1973, I accidentaly removed
the line which added Transformable.cpp to the build. Because not
compiling this file caused no build breaks, nobody noticed until
after #1973 got merged. My bad, everybody.
This commit updates the NDK version to latest available at the
time.
The expectation from this change is to resolve issues with code
modernisation and to allow us to use C++ 17 features on Android.
This shouldn't affect devices supported as we're not changing the
API level.
For more details see:
https://developer.android.com/ndk/downloads/revision_history
This line was intended to silence a warning, however in the time
since that code was added in 95828a85a, the minimum required CMake
version was increased from 2.8.3 to 3.8. As of CMake 2.8.4 this
warning is no longer emitted which means we can remove this line.
Similar to sf::Time, sf::Angle provides a typesafe API for working
with angles and provides named functions for converting to and from
degrees and radians.
The SFML target export set includes a number of external targets
which are not owned by the project itself. This includes targets
like Freetype and OpenGL. By specifying a namespace for the export
set, a SFML:: namespace was prepended to all targets. This is not
a problem when using shared libraries but when building and using
static libraries caused a problem where CMake was attempting and
failing to find targets with names like SFML::Freetype or
SFML::OpenGL which did not exist.
Luckily CMake allows you put namespaces in the EXPORT_NAME target
property so now we can just add the SFML:: namespace in the macro
which creates SFML targets and remove the `NAMESPACE SFML::` line
which was adding namespaces to all targets.