Commit Graph

172 Commits

Author SHA1 Message Date
Sam Lantinga
7c16fe6d69 Default to use the built-in EGL definitions 2023-01-12 16:17:00 -08:00
Anonymous Maarten
049e6ff408 cmake: haiku uses CXX code, so enable it in C-only project 2023-01-10 02:39:09 +01:00
Anonymous Maarten
62297e7da5 cmake: avoid string(SUBSTRING) on short strings
CMake 3.1 and older throws an error when the input string is too short
2023-01-09 15:44:50 +01:00
Ozkan Sezer
0d8c22acd2 cmake (CheckPTHREAD): remove _GNU_SOURCE define after bug #7026 fix 2023-01-09 01:30:37 +03:00
Anonymous Maarten
f53d797cca cmake: generate git hash using GetRevisionDescription CMake module
This allows the build system (ninja/make/VS) to detect whether the current
checkout git commit has changed. If so, SDL_revision.h will be updated.
2023-01-08 18:20:56 +01:00
Anonymous Maarten
e85e11b211 cmake: avoid adding full path to SDL_EXTRA_LIBS
This avoids placing e.g. -l/path/to/libX11.so in sdl3.pc when configuring with -DSDL_X11_SHARED=OFF
2023-01-08 15:57:51 +01:00
Anonymous Maarten
dfcd8d5835 cmake: remove unused function 'listtostrrev' 2023-01-08 15:57:51 +01:00
Anonymous Maarten
77025417dd cmake: add SDL_ prefix to EXTRA_LIBS/EXTRA_LDFLAGS 2023-01-08 15:57:51 +01:00
Anonymous Maarten
bffbfa572c cmake: rename SDL_STATIC_LIBS -> SDL_PC_STATIC_LIBS 2023-01-08 15:57:51 +01:00
Anonymous Maarten
053c37583c cmake: avoid modifying CMAKE_C_FLAGS 2023-01-08 15:57:51 +01:00
Anonymous Maarten
5555284a70 cmake: use target_compile_options to use -idirafter for khronos headers 2023-01-08 15:57:51 +01:00
Anonymous Maarten
0a4420e02f cmake: rename cmake variables to include _PC_ as they are meant for pkgconfig file 2023-01-08 15:57:51 +01:00
Anonymous Maarten
373a6464c8 cmake: collect cflags in sdl-build-options and sdl-global-options 2023-01-08 15:57:51 +01:00
Anonymous Maarten
7150d6b05a cmake: add SDL3 to include path
This reverts parts of 9f2ca87
2022-12-29 09:01:56 -08:00
Sylvain
aa46ff8f4b Remove SDL_WINDOW_SHOW flag, as redundant with SDL_WINDOW_HIDDEN 2022-12-28 12:16:57 -08:00
Sylvain
ab0c5cf07d
Fix compilation 2022-12-27 17:25:31 +01:00
avafinger
12e0e6d130 SDL3 with Hardware Acceleration for ROCKCHIP platform (mali blob) 2022-12-26 08:50:51 -08:00
Anonymous Maarten
8f9227e4be cmake: use CMakePushCheckState to handle check states 2022-12-19 09:19:45 -08:00
Anonymous Maarten
653893f188 cmake: declutter root + remove obsolete variables 2022-12-19 09:19:45 -08:00
Anonymous Maarten
39a7abad7a cmake: lowercase all macros 2022-12-19 09:19:45 -08:00
Anonymous Maarten
289b024715 cmake: add function to print dict list 2022-12-19 09:19:45 -08:00
Daniel Gibson
c3bf253b09 Remove SDL3_main from build systems, remove most of src/main/*
XCode is still missing, and src/main/winrt/SDL3-WinRTResource*
still need to find a new home
2022-12-15 08:01:01 -08:00
Daniel Gibson
22e22ba196 Add SDL_main.h includes to tests
.. including cmake/test/*.c, whatever that does

(this is needed now because SDL.h doesn't include SDL_main.h anymore)
2022-12-15 08:01:01 -08:00
Anonymous Maarten
9eb4d1f020 cmake: use FindALSA.cmake to find ALSA libraries
Co-authored-by: nfarid <54642193+nfarid@users.noreply.github.com>
2022-12-12 01:37:01 +01:00
Jan Engelhardt
1878674477 build: add symbol versioning for SDL
If a program built against one version of SDL is run in an
environment where there is an earlier version of the SDL .so library
installed, the result varies depending on platform configuration; in
the best case, it won't start at all, at worst it aborts in the
middle of the user doing "something important" (systems implementing
lazy symbol resolution). verdefs on the other hand are always checked
on startup.

The dependency information present in programs and shared libraries
is not only of value to the dynamic linker, but also to a
distribution's package management. If the dynamic linker is able to
tell that a program is not runnable per the above, a package manager
is able to come to the same conclusion — and block the installation
of a nonfunctional program+library ensemble.

Because there are a lot more symbols than there are libraries (I am
going to throw in "10^4 to 1 or worse"), package managers generally
do not evaluate symbols, but only e.g. the SONAME, NEEDED and VERNEED
fields/blocks. Because the SONAME is the same between two SDL
versions like 2.0.24, and 2.0.26, everything rests on having verdefs.

This patch proposes the addition of verdefs.
2022-12-02 13:05:37 -08:00
Ozkan Sezer
bb8adf74e0 cmake/sdlchecks.cmake: make it diff smaller against SDL2 2022-12-02 03:01:02 +03:00
Sam Lantinga
1e2dfdb019 Removed the OpenGL ES 1.0 2D render implementation
In SDL3 we plan to make more use of shaders in the 2D render API, and this minimizes the number of platforms we have to consider for new features. OpenGL ES 2.0 or newer is supported on all modern iOS and Android devices.
2022-11-30 13:39:37 -08:00
Anonymous Maarten
7e7a8e76a5 cmake: move platform detection to cmake/sdl/paltform.cmake for re-use by SDL2-compat 2022-11-29 21:10:56 +03:00
Sam Lantinga
c2432f8d0d Rename SDLmain to SDL_main and SDLtest to SDL_test for consistency with other SDL libraries 2022-11-28 10:57:59 -08:00
Anonymous Maarten
9f2ca87504 build: don't add SDL3 subfolder to include path for external projects 2022-11-27 14:33:13 -08:00
Sam Lantinga
2af4f74e1c Remove sdl3.m4 and sdl3-config, and document pkg-config as the recommended replacement
Fixes https://github.com/libsdl-org/SDL/issues/6639
2022-11-27 14:11:06 -08:00
Sam Lantinga
63f307fe1f Remove SDL_config.h from the public headers
The SDL headers are no longer dependent on the build configuration.

Fixes https://github.com/libsdl-org/SDL/issues/6643 and https://github.com/libsdl-org/SDL/issues/6641
2022-11-26 04:48:36 -08:00
Anonymous Maarten
4574c16178 cmake: test for lsx and lasx intrinsics for loongarch 2022-11-25 21:50:08 +01:00
Anonymous Maarten
d0e14008b5 cmake: find libudev library so it gets priority 2022-11-25 21:36:53 +01:00
Anonymous Maarten
cd13600944 cmake: don't reset check state after pushing state 2022-11-24 23:33:54 +01:00
Anonymous Maarten
622f64dff2 cmake: add X11 include dir to check dirs 2022-11-24 20:59:02 +01:00
Sam Lantinga
a635a485bc Re-added WinRT support until we're sure that it's no longer being used 2022-11-23 10:41:43 -08:00
Ozkan Sezer
34231f5ba0 reverted opengles removal. 2022-11-23 18:50:02 +03:00
Ozkan Sezer
016b757311 reverted jack audio backend removal. 2022-11-23 06:50:20 +03:00
Ozkan Sezer
dc2a3e06e9 removed WinRT support. 2022-11-22 23:36:24 +03:00
Ozkan Sezer
7df102d220 reverted sndio backend removal. 2022-11-22 22:04:10 +03:00
Ozkan Sezer
30b1ab2add removed opengles. 2022-11-22 21:48:40 +03:00
Ozkan Sezer
3aea865cdf removed directfb support. 2022-11-22 20:45:45 +03:00
Ozkan Sezer
cdb54ad21e removed arts, esd, fusionsound, nas, paudio, sndio, sunaudio, winmm audio backends. 2022-11-22 19:51:56 +03:00
Ozkan Sezer
8d6fda4810 removed os2 support & support for building SDL with watcom. 2022-11-22 19:18:47 +03:00
Sam Lantinga
2c4159b99a First pass at changing SDL 2.0 to SDL 3.0 2022-11-21 20:28:58 -08:00
Hubert Maier
5dc93451d2
JANITORIAL : Correct some more spelling mistakes (#6489) 2022-11-06 11:49:37 -08:00
Anonymous Maarten
61297f703a cmake: on Apple, check for presence of an OBJC compiler 2022-11-03 15:03:47 +01:00
Anonymous Maarten
04bcc910e9 cmake: don't do enable_language(OBJC)
When SDL is included as a subproject, the following error might appear:
```
CMake Error: Error required internal CMake variable not set, cmake may not be built correctly.
Missing variable is:
CMAKE_OBJC_COMPILE_OBJECT
```

This is probably because the master project does not see certain OBJC related variables
2022-11-03 15:03:47 +01:00
Anonymous Maarten
c3b13346e0 On x86, pass -nodefaultlib to linker when wanting to avoid the C library 2022-10-22 09:28:00 -07:00