Commit Graph

253 Commits

Author SHA1 Message Date
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
af7d6c2589 Simplify sfml_find_package
All in service of hopefully removing sfml_find_package one day since
that will simplify packaging SFML and better set us up for adopting
a package manager.
2023-08-23 09:14:59 -06: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
b298b728f5 Remove unnecessary export() call 2023-07-23 19:41:03 -06:00
Chris Thrasher
659eca2a62 Apply SFML_ prefix to compiler warning option 2023-07-16 17:20:18 -06:00
metaquarx
011d4ef512 Suppress extraneous clang-tidy output 2023-07-13 10:53:45 -06:00
Chris Thrasher
f443a9529b Take advantage of clang-format-14 features 2023-07-08 14:39:24 -06:00
Chris Thrasher
20f34d38fd Add tests for sf::Font 2023-07-07 13:21:56 -06:00
Chris Thrasher
f65c0058b9
Merge branch '2.6.x' into feature/backmerge 2023-07-07 12:05:02 -06:00
Chris Thrasher
1f23f7818e Don't override CMAKE_MODULE_PATH
The Conan package for SFML has to fix this so apparently it's a
real world problem.
2023-06-23 10:14:21 -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
Lukas Dürrenberger
48fde44047 Merge branch '2.6.x' into master 2023-06-21 13:31:16 +02:00
Lukas Dürrenberger
f47403ab4d Update version number to 2.6.0 2023-06-20 23:44:57 +02:00
Chris Thrasher
f6dfc04938 Switch to Catch2 2023-05-13 12:38:11 -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
Chris Thrasher
485d367a91 Inline sfml_add_external 2023-04-05 16:16:53 -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
5e75336753
Merge remote-tracking branch 'origin/2.6.x' into feature/backmerge 2023-02-09 20:22:56 -07:00
Chris Thrasher
6aaf132d41 Add support for installing with static libs when using DRM 2023-02-09 20:12:43 -07:00
kimci86
205794eb3f Explicitly specify required X11 components 2023-02-07 17:21:34 -07:00
Chris Thrasher
eb162df723 Use X11's find module
Added in CMake 3.14 so this wasn't accessible in prior versions of
SFML
2023-02-06 15:12:58 -07:00
Chris Thrasher
ab34b9f9bf Invoke run-clang-tidy with Python executable
This is required since Windows can't support she-bang scripts like
macOS and Linux were taking advantange of. This is more verbose but
ultimately the same as before.
2023-01-14 15:13:02 -07:00
Chris Thrasher
8a5e0f6933 Fix bug where clang-tidy CI job always passes 2023-01-06 17:17:57 -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
75b0c3a9a1 Disable warnings as errors for Clang on Windows 2022-12-12 12:09:51 -07:00
Chris Thrasher
75642ef7aa Enable warnings as errors for clang-cl.exe 2022-12-11 13:51:15 -07:00
Chris Thrasher
e54bf87e9b Enable MSVC deprecation warning 2022-12-11 13:51:15 -07:00
Chris Thrasher
8c6b578012 Disallow clang-format version 15 and newer 2022-11-27 13:39:40 -06:00
Chris Thrasher
a5dbe59f07
Merge branch '2.6.x' 2022-10-13 14:33:11 -06: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
fc0bd0bfc8 Don't specify standard library on macOS
libc++ is already the default and GCC can't even be used so there's
no circumstance where we'd need to explicitly tell Clang to use
libc++. I confirmed that even with this removed, libc++ headers are
still being used and found.
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
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
Chris Thrasher
8384139983 Remove unnecessary variable assignment
This same code already exists in src/CMakeLists.txt
2022-08-22 11:26:57 +08:00
Chris Thrasher
1dcaa9a396 Fix CMake error messages 2022-08-22 11:26:57 +08:00
Chris Thrasher
aa82ea132b Set warnings with target_compile_options
The use of target_compile_options makes it easy to append warnings
to a target. The use of generator expressions also more succinctly
handles a few edge cases for compiler bugs and platform-specific
oddities.

This should be easy to read and maintain than the variable-based
solution it replaces.
2022-08-14 14:00:00 +08:00
Chris Thrasher
142ccf57bd Enable compiler warnings for Android 2022-08-12 18:01:36 +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
Chris Thrasher
55a1a2a4c4 Format .m files 2022-07-14 21:47: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
0812054e02 Remove trailing whitespace 2022-06-25 21:32:55 +02:00
Bambo-Borris
12c091e0ce Disable /WX for clang-cl 2022-06-12 17:40:01 +02:00