Commit Graph

182 Commits

Author SHA1 Message Date
binary1248
75be07fa34 Fix CMake minimum required version being too low to support specifying SYSTEM in target_include_directories for Visual Studio generators. 2023-10-03 21:04:47 -06:00
Chris Thrasher
3f6403e279 Stop manipulating standard library flags for macOS builds 2023-09-25 22:41:36 -06:00
Chris Thrasher
1811951b4a Allow for shared libs on iOS 2023-09-05 16:04:20 -06:00
Chris Thrasher
962e6ed972 Default to building static libraries
See https://github.com/SFML/SFML/issues/2389 for full rationale
2023-08-23 09:17:43 -06:00
Chris Thrasher
f0e72be285 Prefer using IMPORTED targets where possible
My goal is to reduce our need on sfml_find_package until it can
finally be removed. It's preferred to simply use find_package to
find 3rd party projects.

I had to add IMPORTED targets to some of our find modules so that
we could get away from using INTERFACE libraries for external code.
That also implied that our find moduels need to be installed so that
users have access to them when processing SFML's config module.
2023-08-23 09:14:59 -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
98a59d62c7 Upgrade to CMake 3.22 2023-05-13 12:09:09 -06:00
binary1248
ea4c448a85 Add support for installing and using the Mesa 3D library for OpenGL rendering. 2023-04-06 11:15:56 -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
OURABIG
7a50075a8b changes this UPPER_CASE CMake function names to lower_case. CONFIGURE_FILE becomes configure_file and INSTALL becomes install. 2023-01-30 16:42:16 -07:00
Chris Thrasher
0e8072e6cd Hide examples, tests, and documentation from projects consuming SFML via add_subdirectory 2023-01-13 14:28:09 -07:00
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