Commit Graph

57 Commits

Author SHA1 Message Date
Chris Thrasher
81a86ebdbd
Merge branch '2.6.x' into feature/backmerge 2023-12-11 09:32:14 -07:00
Lukas Dürrenberger
c9d065a054 Issue an error when using a MinGW UCRT version 2023-12-11 00:57:08 +01:00
Chris Thrasher
c20ab7d6d8 Ensure GNUInstallDirs cache vars are included before first used 2023-11-14 07:46:41 -07:00
Chris Thrasher
37575e4ed7 Use native CMake support for detecting architecture size 2023-08-21 09:05:30 -06:00
Chris Thrasher
5f87a04111 Remove use of deprecated CMake variable 2023-08-21 09:02:07 -06:00
Chris Thrasher
ddfb7f6cb0 Use modern name for macOS
In a few places I left references to the old name where appropriate.
There are also many CMake references to "OSX" that we have to keep
using since CMake does not offer alternative names for those variables
and target properties.
2023-07-24 21:25:26 -06:00
Chris Thrasher
f65c0058b9
Merge branch '2.6.x' into feature/backmerge 2023-07-07 12:05:02 -06:00
Chris Thrasher
e9e25d52bc Loosen restrictions on unrecognized compilers
A core tenet of CMake is the idea that you can use any valid C++
compiler. By enumerating all supported compilers and emitting and
hard error when an unrecognized compiler is detected, we are violating
that tenet.

Relaxing this message from a fatal error to merely a warning continues
to communicate to users that their build may not succeed but it leaves
the door open for the build to potential succeed if the compiler meets
all of our requirements.
2023-06-22 16:26:26 -06:00
Jonny
741fe219da
Use built-in CMake support for iOS
* Use built-in iOS support for cmake and expand tests to cover more configurations
* Adjust CI builds
* Update examples version

---------

Co-authored-by: Chris Thrasher <chrisjthrasher@gmail.com>
2023-04-03 23:36:33 +02:00
Chris Thrasher
a5dbe59f07
Merge branch '2.6.x' 2022-10-13 14:33:11 -06:00
Chris Thrasher
40b175adf4 Remove check for old macOS versions
There is no need to check for macOS 10.6 or lower. Snow Leopard came
out in 2009. Because it's nearly 13 years old, it's safe to say
nobody will be trying to build SFML 3 on Snow Leopard.

This was added in de70f691e way back in 2011 when Snow Leopard was
a mere cub.
2022-08-22 11:26:57 +08:00
Chris Thrasher
b7510fd09e Fix formatting and style
Use all lower_case commands with no space between the command name
and the open parentheses. Don't repeat conditional in else() and
endif() calls.
2022-08-22 11:26:57 +08:00
Bambo-Borris
12c091e0ce Disable /WX for clang-cl 2022-06-12 17:40:01 +02:00
Chris Thrasher
a733e4cd7e Remove unused CMake variables 2022-02-17 23:24:02 +01:00
Chris Ohk
eeeda74ec1 Add support for Visual Studio 2022
- References: https://cmake.org/cmake/help/latest/generator/Visual%20Studio%2017%202022.html
2021-08-23 22:34:04 +02:00
Lukas Dürrenberger
9e27096c37 Fix configuration conflicts with Clang
- 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
2021-05-10 12:20:48 +02:00
David Carlier
4cbb34ddb4 NetBSD support proposal. 2020-12-07 16:08:00 +01:00
Jonny
27a4c83ebc Use GnuInstallDirs module for cmake install paths 2019-09-01 21:48:10 +02:00
Lukas Dürrenberger
9712bb1ec8 Fixed the installation of pkg-config files
* 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
2018-08-13 22:46:20 +02:00
David Carlier
9da895da8b further changes 2018-04-14 10:14:34 +02:00
David Carlier
4d0d331272 pushing upstream openbsd support from package. 2018-04-14 10:14:34 +02:00
Ceylo
ee08e18726 Modernize CMake files 2018-03-27 00:03:34 +02:00
Mario Liebisch
806813e937 Android: Removed custom toolchain file
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`.
2018-02-11 20:15:54 +01:00
tlein
bba5808717 use a toolchain file for iOS instead of setting the necessary CMake variables in SFML 2018-01-09 22:06:55 +01:00
Rafael Kitover
5fe5e5d6d7 packaging support improvements
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
2017-02-28 10:03:14 +01:00
Mario Liebisch
95828a85a2 Added some simple messaging when trying to build under Cygwin 2016-10-04 09:33:15 +02:00
James Cowgill
e199ef3790 Define SFML_OS_FREEBSD when compiling for kFreeBSD 2016-08-24 14:05:40 +02:00
Mario Liebisch
ba9383f25e Updated/fixed string comparisons in Config.cmake
SFML so far used `${CMAKE_SYSTEM_NAME} MATCHES "Windows"`. This works, but only because there's a variable `WINDOWS` having the exact same content (`Windows`).

[More information and a similar issue can be found in this SO thread.](http://stackoverflow.com/questions/21995777/cygwins-cmake-does-not-match-for-cmake-system-name)
2016-07-17 20:13:14 +02:00
Lukas Dürrenberger
6b9781475d Added support for VS 2015. 2015-09-30 08:32:30 +02:00
Mario Liebisch
34692d5a39 Android: Updated the toolchain file and CMake scripts
* 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.
2015-03-04 09:05:22 +01:00
Stefan Schindler
f24ca9a840 Source code changes.
* Changed newlines to \n.
* Removed whitespace before colons.
* Fixed several alignments.
2014-10-06 01:18:47 +02:00
Marco Antognini
2427aaf3bb Added support for OS X 10.10
Note: this only fix the compilation process. SFML was not thoroughly
tested on this OS yet.
2014-09-21 07:39:05 +02:00
Laurent Gomila
d40399e431 Fixed the INSTALL_MISC_DIR CMake variable not defined on iOS 2014-04-20 12:57:55 +02:00
Jonathan De Wachter
f60ab60263 Added SFML_OS_ prefix to IOS and ANDROID variables 2014-04-20 12:57:02 +02:00
Jonathan De Wachter
60894d1c1a [Android] Rewrote CMake scripts to compile SFML with our new toolchain 2014-04-20 12:56:40 +02:00
Laurent Gomila
b9fd685a60 [iOS] Made the build independent of the iOS framework version 2014-04-20 12:53:15 +02:00
Laurent Gomila
239921b456 [iOS] Improved support for examples, removed the need for a toolchain file 2014-04-20 12:53:04 +02:00
Jonathan De Wachter
63bbe2c91e Added the Android port 2014-04-20 12:52:04 +02:00
Laurent
e5ee38fc26 Added the iOS port 2014-04-20 12:48:00 +02:00
Marco Antognini
19012c66ea Updated Xcode templates and cmake script
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
2014-04-15 20:19:12 +02:00
Marco Antognini
ac28902b57 Removed support for OS X 10.6 and below 2014-04-15 20:18:20 +02:00
Lukas Dürrenberger
004c12cfd2 Changed VS version to MSVC version and added support for VS 2013 and TDM compilers. 2013-10-15 16:15:41 +02:00
Laurent Gomila
3670eec5dd Fixed MSVC version detection code in CMake files 2013-10-15 07:55:01 +02:00
Laurent Gomila
9b0ed300b5 Made compiler and OS variable names much clearer in CMake files 2013-10-09 08:01:10 +02:00
David Demelier
cc3dc29ef4 Added joystick implementation for FreeBSD (#477) 2013-10-08 22:52:13 +02:00
Baruch
165f2b1888 fix for static builds with mingw-w64 compilers - part 1 2012-05-01 23:00:24 +03:00
Laurent Gomila
b2f3787db1 Fixed incompatibility with CMake 2.8.7 2012-03-30 20:53:16 +02:00
Laurent Gomila
91705fe25c The architecture (32/64 bits) is now detected only on Windows 2012-01-03 18:02:18 +01:00
Laurent Gomila
bb6ed5dd29 Added detection of Visual C++ 2011 in CMake files 2011-12-30 20:33:37 +01:00
Laurent Gomila
c67148eaf2 Fatal errors in CMake files (such as unsupported system) now abort the configuration step 2011-12-29 16:20:21 +01:00