- On Windows you can use Clang with both MSVC and MinGW
- When using Clang with MSVC all the MSVC conditions should be fulfilled
- When using Clang with MinGW all the MSVC steps should not be run
* Removed duplicated CMake code
* Made it possible to manually specify the pkg-config path
* Install pkg-config files by default on Linux and BSD systems
This commit drops the previous custom CMake toolchain file for Android
in favor of CMake's new built-in toolchain for this (CMake >3.7.2).
This makes building SFML for Android a lot simpler and more straight
forward, working almost as smooth as other platforms.
To configure your build directory, all you have to do is defining just a
few variables the first time you invoke CMake.
**Required Variables**
* `CMAKE_SYSTEM_NAME` must be `Android`, so CMake knows we actually want
to cross-compile.
* `CMAKE_ANDROID_NDK` must point to the NDK's installation directory,
e.g. `/usr/android/ndk` or `c:/android/ndk`.
**Recommended Variables**
* `CMAKE_ANDROID_STL_TYPE` defines the STL implementation to be used.
You should use `c++_shared`, although others might work.
**Optional Variables**
* `CMAKE_SYSTEM_VERSION` can be set to pick a specific SDK version other
than the latest.
* `CMAKE_ANDROID_ARCH_ABI` defines the target architecture and ABI, for
example `armeabi` or `armeabi-v7a`.
Based on your system, you might want to enforce a specific generator to
prevent issues, e.g. using `MinGW Makefiles`.
Add default minimum target to 10.7.
The CMAKE_OSX_* variables need to be defined before the project or the
CMAKE_CXX_STANDARD gets ignored. They also need to be set with FORCE.
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
* 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.
Implements a new design for the shader uniform API.
* Added Shader::setUniform() and Shader::setUniformArray() overloads for the following types:
-> scalars: float, int, bool
-> vectors: 2D, 3D, 4D
-> matrices: 3x3, 4x4
-> arrays of basic types
-> samplers (sf::Texture)
-> conversions for SFML types (sf::Transform, sf::Color)
* Added sf::Glsl namespace with GLSL-equivalent types
* Deprecated Shader::setParameter() overloads
Other related changes:
* Refactored sf::Shader internals to avoid code duplication
* Improved documentation
* Added SFML_DEPRECATED macro to Doxyfile
* Defined _SCL_SECURE_NO_WARNINGS to disable std::copy() warnings on MSVC
- The installation paths are no longer hard coded; cmake now configures them so that Frameworks and libs can be installed somewhere else.
- No longer copy sndfile.framework but instead copy the new dependencies of the audio module.
- No longer copy .DS_Store to the install directory.
* Replaced the toolchain file with a new version based on [zuhowei's fork](https://github.com/zhuowei/android-cmake), which enables x64 builds as well as support for the latest NDK. This breaks compatibility with old build directories.
* Removed the STL dependency from **sfml-activity** rather than relying on *some* implementation implicitly linked by default.
* Deleted *project.properties*, which wasn't supposed to be part of the repository code. You have to use the Android SDK to recreate it (`android update project --path to/your/example --target 1 --name SFML-Example`).
* Made it possible to select a STL implementation to be used (default: `c++_shared`). Keep in mind that not all available configurations are necessarily compatible with SFML.
* Fixed linker flags to be compatible with Nvidia's Nsight Tegra for Visual Studio.
* It is now possible to compile the Android version using Nvidia's Nsight Tegra for Visual Studio (requires up-to-date CMake and `CMAKE_SFML_SYSTEM` to be set to `Android`; keep in mind that this is still experimental and requires further CMake updates).
* Updated and renamed some Android specific CMake variables.
* Made `armeabi-v7a` the default ABI for Android builds.
No longer install sndfile and/or freetype frameworks if SFML is built libraries not from the extlibs folder.
Related to #620 and Homebrew/homebrew#35479
Xcode templates are not updated yet to reflect that change since it involve toying with `install_name_tool` and is quite complex.
- Replaced @executable_path by @rpath for more flexibility
- Updated freetype and sndfile libs as follow:
install_name_tool -id "@rpath/../Frameworks/freetype.framework/Versions/A/freetype" freetype
install_name_tool -id "@rpath/../Frameworks/sndfile.framework/Versions/A/sndfile" sndfile
RPATH is especially useful when running debug builds for testing on *nix
operating systems, because the binaries (e.g. examples) include library
runtime path information. This allows you to skip installing SFML to the
system or adjusting PATH variables/ld config.
* Instead of configuring Xcode templates directly to /Library the files are first saved in CMAKE_CURRENT_BINARY_DIR
* This avoid running CMake as root on some systems
* Setting CMAKE_OSX_DEPLOYMENT_TARGET to something implies setting CMAKE_OSX_SYSROOT too
* The default values are enough for most users
* If someone is trying to compile SFML with 10.6 SDK it will simply fail later anyway
* Apparently, there were some leaks not reported as such
* Support for 32 bits computer is restored
* Fix memory leak in sfStringToNSString (related to #484)
* Unapply context when closing the window, freeing memory
The following commits are related to ARC modifications:
* 42f6e83dfb
* 6edc4b9518
* f6c94451fb
* 324d4a18e7
* 0d47056132
Commit ac28902b57 is the last one before the introduction of ARC.
A current limitation prevents one library from depending on shared libraries.
As we have legal issues here (LGPL wants us to use shared libs of OpenAL-Soft and libsndfile), we're forced to use this homemade native activity which will manually load our shared libraries.
What's new in the templates:
- Removed support for 32 bits and gcc
- Removed useless code
- Removed custom warnings settings – let Xcode decide with its default values
- Set default target version to CMAKE_OSX_DEPLOYMENT_TARGET
What's new in cmake script:
- Added cmake options for archs and deployment target
- Added minimum requirements checking
No attempt to fix this part of the script is made because it change too
often (at each OS release) and no gain would result from a potential
fix.
SDKs are not stored in /Developer anymore with recent versions of Xcode.
Now the users should manually set the following variables :
- CMAKE_OSX_SYSROOT,
- CMAKE_OSX_DEPLOYMENT_TARGET,
- CMAKE_OSX_ARCHITECTURES