Commit Graph

204 Commits

Author SHA1 Message Date
Mario Liebisch
291e6248d6
Update CMakePresets and CMakeLists.txt
These changes ensure Visual Studio allows both Debug and Release builds,
while also supporting direct debugging of the examples.

If `CMAKE_BUILD_TYPE` is set in any way, Visual Studio will disable all
targets in the UI (and in generally have a really good tendency to bug
out).
2024-06-07 13:22:55 +02:00
Chris Thrasher
207b54e445
Merge branch '2.6.x' into feature/backmerge 2024-05-13 21:07:03 -06:00
alexv
b79d5553fd Move the CPack configuration after SFML_CONFIGURE_EXTRAS 2024-05-09 16:07:49 +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
binary1248
88e9d4c0b3 Fixed CMAKE_CXX_FLAGS being treated as a list when SFML_ENABLE_SANITIZERS is enabled. 2024-03-28 18:30:33 -06:00
Chris Thrasher
5e18e5403b Fix Nix pkg-config support
CMAKE_INSTALL_LIBDIR is an absolute path on Nix (which is a valid
thing to do). In such a case two absolute paths would get appended
resulting in a nonsense path that broke pkg-config support.
2023-12-15 09:42:56 -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
18dfcedbd9 Setting ANDROID_ABI has no effect, the user should specify CMAKE_ANDROID_ARCH_ABI to select the ABI 2023-11-15 17:29:42 -07:00
Bruno Van de Velde
e0f76af21f Removed the warning for not being able to select the STL for Tegra-Android, as libc++ is the only STL left 2023-11-15 17:29:42 -07:00
Bruno Van de Velde
4c0b0b8397 Don't check the CMAKE_ANDROID_API version. It was replaced with CMAKE_SYSTEM_VERSION and we can use versions older than 26 with the current NDK 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
1f345d7d25 Fix incorrect variable expansion 2023-11-15 10:54:26 +01:00
Bruno Van de Velde
cf3dfb72a2 Removed support for ndk-build on Android (in favor of CMake) 2023-11-14 16:04:30 -07:00
Chris Thrasher
c20ab7d6d8 Ensure GNUInstallDirs cache vars are included before first used 2023-11-14 07:46:41 -07:00
binary1248
4fce7e4991 Embed MSVC debugging information when building using a compiler launcher in order to allow ccache to cache compiler output when running a CI workflow. 2023-11-07 10:31:00 -07:00
Chris Thrasher
9b223b45a5 Remove references to C compilers 2023-11-06 11:57:47 -07:00
binary1248
ea6cf002b6 Added support for running the GitHub actions workflow using CCache. 2023-11-04 00:37:18 -06:00
Chris Thrasher
7f57bb4fe6 Update version to 2.6.1 2023-10-29 18:03:26 -06:00
Chris Thrasher
9a8ca3227f Add UBsan to CI 2023-10-27 16:36:38 -06:00
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
Lukas Dürrenberger
f47403ab4d Update version number to 2.6.0 2023-06-20 23:44:57 +02: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