Commit Graph

171 Commits

Author SHA1 Message Date
Chris Thrasher
dc9d794722
Merge remote-tracking branch 'origin/2.6.x' into feature/backmerge 2022-12-13 23:06:49 -07:00
Chris Thrasher
07bf6f8c12 Add option for enabling DRM 2022-12-13 21:52:42 -07:00
Chris Thrasher
3b6db4d18c Enforce variable case 2022-12-12 16:10:03 -07:00
Chris Thrasher
ad416ab531 Check for minimum required clang-tidy version 2022-12-12 16:10:03 -07:00
Chris Thrasher
8c6b578012 Disallow clang-format version 15 and newer 2022-11-27 13:39:40 -06:00
Chris Thrasher
80b45d4725 Add custom target for running clang-tidy 2022-10-17 18:29:56 -06:00
Chris Thrasher
46b9c79b77 Link to latest CMake docs 2022-10-12 00:23:35 +02:00
Chris Thrasher
ff685de1bf Ensure add_custom_command uses VERBATIM
https://cmake.org/cmake/help/latest/command/add_custom_command.html

"Use of VERBATIM is recommended as it enables correct behavior."

The docs basically say that this is required.
2022-10-12 00:23:35 +02:00
Chris Thrasher
88f9a33479 Use PROJECT_ variables 2022-10-12 00:23:35 +02:00
Chris Thrasher
b848a7b29a Only reference the project's directories, not parent directories 2022-10-12 00:23:35 +02:00
Chris Thrasher
5e880a2511 Fix directory install rules
-- Installing: /Users/runner/work/SFML/SFML/install/./include
-- Installing: /Users/runner/work/SFML/SFML/install/./include/SFML

becomes

-- Installing: /Users/runner/work/SFML/SFML/install/include
-- Installing: /Users/runner/work/SFML/SFML/install/include/SFML

Likewise for installing lib/
2022-10-12 00:23:35 +02:00
Chris Thrasher
f5a3442ba6 Remove macOS architecture checks
You cannot buy anything but a 64 bit x86 or ARM Mac today so there
is no need to ensure that one of these two architectures is being
used. It's definitely one of the two.
2022-10-12 00:23:35 +02:00
Vittorio Romeo
fd5c358c98 Add PCH builds via 'SFML_ENABLE_PCH' CMake option 2022-10-09 14:21:11 +02:00
Vittorio Romeo
753644a5bd Fix CMake formatting inconsistencies 2022-10-06 20:33:40 +02:00
Lukas Dürrenberger
4970af8999 Use CMake property to drive static linking
Using a newer CMake version allows us to make use of the
MSVC_RUNTIME_LIBRARY added in CMake 3.15, which handles static linking
of the runtime library with MSVC a lot simpler
2022-09-30 22:17:03 +02:00
Chris Thrasher
50cec7d2ed Treat each test case as a unique test 2022-09-10 20:03:25 +03:00
Chris Thrasher
78e532215a Simplify how lists are expanded 2022-08-22 11:26:57 +08:00
Chris Thrasher
164c5025c7 Remove commented code
Commented out in f4c25ac3f shortly after it was added. I don't have
reason think this code will be resurrected if it's been ignored for
the last 4 years. It's safe to remove at this point.
2022-08-22 11:26:57 +08:00
Chris Thrasher
20b7529334 Remove unecessary preprocessor defines
This is already handled by disabling warning C4996

https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-3-c4996?view=msvc-170
2022-08-22 11:26:57 +08:00
Chris Thrasher
5b132f25e5 Fix outdated comment 2022-08-22 11:26:57 +08:00
Chris Thrasher
30bf8df273 Simplify module include path 2022-08-22 11:26:57 +08:00
friendlyanon
e691033954 Require CMake 3.16 for ObjC and ObjC++ sources
Both languages gained native CMake support in 3.16:
https://cmake.org/cmake/help/latest/release/3.16.html#languages
2022-08-03 23:38:17 +02:00
Chris Thrasher
97537d36b3 Remove unnecessary CMake version checks
Now that the project requires CMake version 3.15, all of these
checks are guaranteed to eveluate one way or the other so they can
be removed.
2022-07-18 12:43:49 +02:00
metaquarx
88e9f82bee Add '.clang-format' file, CI integration, and formatting exceptions
Co-authored-by: Vittorio Romeo <vittorio.romeo@outlook.com>
Co-authored-by: Chris Thrasher <chrisjthrasher@gmail.com>
Co-authored-by: kimci86 <kimci86@hotmail.fr>
2022-07-11 20:04:56 +02:00
Chris Thrasher
62d1abe491 Stop setting CMake policy 0068
https://cmake.org/cmake/help/latest/policy/CMP0068.html

No longer necessary since CMake 3.9
2022-05-21 21:35:35 +02:00
Chris Thrasher
89a0489a44 Stop setting CMake policy 0042
https://cmake.org/cmake/help/latest/policy/CMP0042.html

No longer necessary since CMake 3.0
2022-05-21 21:35:35 +02:00
Chris Thrasher
3301c47755 Remove CompileOptionsOverride
These overrides existed to prevent MSVC errors related to duplicate
compiler warnings. Because we required a version of CMake older
3.15, CMake would add /W3 as a default compiler flag when using
MSVC. We then add /W4 in addition to that. Modern CMake versions
seem to deduplicate these warnings but older versions did not.

The easist fix is to raise the minimum CMake version to 3.15 which
changes the default behavior to no longer add /W3 without being
explicitly specified. See the below link for more information about
this behavior change.

https://cmake.org/cmake/help/latest/policy/CMP0092.html
2022-05-09 15:38:39 +02:00
Chris Thrasher
f3d98a9ebf Require all modules are built before building tests 2022-04-02 12:17:59 +02:00
Vittorio Romeo
411d702d7a Use 'ccache' if available 2022-03-03 14:41:07 +00:00
Chris Thrasher
2df0bfa1b5 Update iOS deployment target to 13.0 2022-02-17 00:40:29 +00:00
Jakub 'Eremiell' Marek
938a407a44 Update required Android API level in CMakeLists
API level 26 is required in the CI pipeline, so this seems to be a
leftover from some earlier version.
2022-02-17 00:40:29 +00:00
Chris Thrasher
fbd624bcf3 Remove Cygwin workaround
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.
2022-02-17 00:02:23 +00:00
binary1248
66339bc09c Added support for coverage reporting. 2022-02-10 08:08:47 +01:00
Chris Thrasher
a322d18e63 Use built-in CMake project version functionality 2022-01-21 21:09:20 +01:00
Vittorio Romeo
4a189d6602 Remove build logic for unsupported compilers 2021-12-19 21:51:53 +01:00
Pawel Paruzel
dfff93fe04 Update SFML Time classes to C++17
Ensure Clock uses a monotonic clock

Statically assert against low precision clocks

Allow suspend-aware clock for Android

Add descriptive documentation to sf::Clock
2021-12-15 12:52:27 +01:00
Lukas Dürrenberger
cd517ba267 Merge branch '2.6.x' into feature/backmerge 2021-12-09 14:36:55 +01:00
lieff
e458f4651e Add MP3 decoding support using 'minimp3'
Co-authored-by: Lukas Dürrenberger <eXpl0it3r@my-gate.net>
Co-authored-by: Vittorio Romeo <vittorio.romeo@outlook.com>
2021-12-08 08:19:08 +01:00
Pawel Paruzel
d0ebdc8607 Let CMake autodetect Apple arch on M1 processor 2021-12-06 15:43:58 +01:00
Vittorio Romeo
bd12438916 Enable and require C++17 support for all targets 2021-12-02 20:13:04 +01:00
Lukas Dürrenberger
1aa2b7cd0d Update SFML version to 3.0.0
Unlike with SFML 2.x and earlier the version numbers are updated as soon
as work on the new release starts. This especially helps with version
checks, which until now caused issues with in-development version
matching the previous release.
2021-12-02 20:02:15 +01:00
binary1248
a759ccd5db Enable compiler warnings. 2021-11-30 11:25:58 +01:00
Bendegúz Ács
4135855ad4 Fixed unable to build SFML with latest NDK 2021-08-13 00:04:19 +02:00
Mario Liebisch
9e79d61d22 Added CPack definitions and an NSIS template for easy packaging 2021-05-20 13:53:00 +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
Jon Keller
252d26afb0 macOS: allow CMAKE_OSX_ARCHITECTURES to be arm64 2021-03-06 10:32:47 +01:00
Lukas Dürrenberger
5e5ac64c76 Update CMake minimum version to 3.7.2
- Most package managers already support CMake 3.7.2
- Enables additional CMake features to be utilized
2021-01-16 16:48:40 +01: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
=
53972ed5f2 Use sfml_add_test macro for unit tests and copy dlls to output directory if required 2019-02-19 10:16:38 +01:00