Commit Graph

287 Commits

Author SHA1 Message Date
Chris Thrasher
c38b98c653 Upgrade to clang-format-17 2024-10-16 16:41:15 -06:00
Lukas Dürrenberger
2dd72be036 Fix Windows ARM64 support with regards to Mesa 3D
- Only fail the Mesa 3D arch check, if it's been enabled
- Add a cross-compilation CI job for Windows ARM64
- Fix ARM64 architecture detection for the Ninja generator
2024-09-14 13:44:34 +02:00
Chris Thrasher
ab109cd3cd Use ON and OFF for CMake booleans
CMake supports a number of strings for truthy and falsey values.
ON/OFF and TRUE/FALSE are the most popular but 1/0 is also supported.
This is mostly a style choice but I'm inclined to believe that ON/OFF
is the most popular option and I'm generally in favor of style
choices that better align with the community at large.
2024-09-11 14:36:13 -06:00
Chris Thrasher
4a463ec136 Throw custom sf::Exception type 2024-08-25 12:17:49 -06:00
Lukas Dürrenberger
1bf092fe6d Merge branch '2.6.x' into master 2024-06-26 08:56:03 +02:00
Zombieschannel
98493bdf51 ARM64 support for SFML
Added dlls, libs and changed CMake files.
2024-06-25 23:17:36 +02:00
vittorioromeo
af4e2d6726 Add support for UCRT64 MinGW environment 2024-06-25 21:49:44 +02:00
Lukas Dürrenberger
0a6d44fff1 Use built-in CMake support for iOS
* Use built-in iOS support for cmake and expand tests to cover more configurations
* Adjust CI builds
2024-06-22 21:51:37 +02:00
Lukas Dürrenberger
8428fcac18 Revert "Disable problematic MSVC mutex flag temporarily"
This reverts commit 3263ef8455.
2024-06-12 12:44:40 -05:00
Lukas Dürrenberger
3263ef8455 Disable problematic MSVC mutex flag temporarily 2024-06-09 22:51:47 -05:00
binary1248
2386653bd3 Add GitHub actions support for running x86, x86_64 and arm64-v8a Android tests using an Android emulator. 2024-05-04 17:22:12 +00:00
binary1248
34fde883b9 Replaced OpenAL with miniaudio.
Co-authored-by: Chris Thrasher <chrisjthrasher@gmail.com>
Co-authored-by: kimci86 <kimci86@hotmail.fr>
Co-authored-by: vittorioromeo <mail@vittorioromeo.com>
2024-04-25 10:24:11 +02:00
Chris Thrasher
7bb97a85b1 Compile unit tests for iOS and Android
While you can't easily run these unit tests, it's easy enough to
still compile them so we don't need to go out of way to prohibit
this. CMake has some support for running tests on the target OS
so perhaps in the future we find a compelling way to run the test
suite on a mobile OS.
2024-04-13 11:49:45 -06:00
Bruno Van de Velde
5a74cf33e9 Replaced deprecated exec_program function in CMake scripts with execute_process, as this was causing iOS build to fail with CMake 3.28 2024-01-23 13:09:04 -07:00
Chris Thrasher
7d095c8b6e Clarify instructions for how to use SFML_ROOT
SFML_ROOT can simply point to the directory in which SFML was installed.
This is verified by our install interface tests which do exactly that,
even when SFML is built as a framework. CMake can figure out where
to find the config module if you give it this much information.
2024-01-20 18:48:53 -07:00
Chris Thrasher
30a986e632
Use CMake-standard <PackageName>_ROOT variable to locating config module
https://cmake.org/cmake/help/v3.22/command/find_package.html
https://cmake.org/cmake/help/v3.22/variable/PackageName_ROOT.html#variable:%3CPackageName%3E_ROOT

SFML_DIR predates the existence of <PackageName>_ROOT which is now
the preferred way to specify where to find a given package's config
module. User reports have shown that SFML_DIR may be broken at least
in certain circumstances so lets stop mentioning it.
2024-01-16 13:10:58 -07:00
Chris Thrasher
bdf676aec1 Fix CMake formatting 2023-12-11 23:42:12 -07:00
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
Bruno Van de Velde
fcf9f78a81 Use position-independent code on Android even when linking statically 2023-11-15 17:29:42 -07:00
Bruno Van de Velde
f582f05365 Don't search for OpenGL when linking statically on Android 2023-11-15 17:29:42 -07:00
Bruno Van de Velde
025a9ddc53 Removed sfml-activity which is no longer needed to bootstrap Android applications 2023-11-15 17:29:42 -07:00
Chris Thrasher
c20ab7d6d8 Ensure GNUInstallDirs cache vars are included before first used 2023-11-14 07:46:41 -07:00
binary1248
5b60905689 Added missing VS_DEBUGGER_WORKING_DIRECTORY to sfml_add_test macro since tests now rely on loading file resources. 2023-11-12 20:36:30 +01:00
binary1248
8c9c5c5b99 Added missing SFML_USE_STATIC_STD_LIBS checks to CMake configuration. 2023-10-31 23:22:28 +01:00
Chris Thrasher
3f6403e279 Stop manipulating standard library flags for macOS builds 2023-09-25 22:41:36 -06:00
Chris Thrasher
d6c18af926 Use cross-platform threading library target 2023-09-24 20:57:33 -06:00
Chris Thrasher
2d2e7fa5f4 Disable warnings as errors by default 2023-09-07 15:21:15 -06:00
Chris Thrasher
0745ea97e0 Disable warnings as errors by default
This is not the best default value because it imposes additional
requirements on user builds that are not strictly necessary. This
has caused many complaints in the past as people encounter build
failures that are merely due to warnings and not hard compiler
errors.

Changing this default value emakes it more likely that someone trying
to use SFML can use it without issue.
2023-09-07 14:16:51 -06:00
Chris Thrasher
78973e4a06 Use imported targets for Vorbis and Ogg
The name of the find module was changed to match the name used by
the reference implementation of Vorbis. Likely the target names were
taken from what the reference implementation names those targets.
2023-08-29 23:18:00 -06:00
Chris Thrasher
450acdeac2 Use OpenAL::OpenAL target
This is a lighitly modified copy of CMake 3.27.4's FindOpenAL.cmake
module. This gives us access to the OpenAL::OpenAL target which was
not added until CMake 3.25.
2023-08-29 23:18:00 -06:00
Chris Thrasher
fc4a282a64 Add Freetype::Freetype target 2023-08-29 23:18:00 -06:00
Chris Thrasher
2c7ed96654 Add FLAC::FLAC target 2023-08-29 23:18:00 -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
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
429bde6648 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.
2023-07-22 20:57:55 -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