Simon McVittie
7ef38beb7e
build: Simplify library name
...
We want the library to come out as libSDL3.so.0 on Unix, or something
similar on other platforms. There's no need to have libSDL3-3.0.so.0,
because next time we intentionally break the API it should become libSDL4
anyway.
Partially implements #5626 .
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-11-25 12:57:32 -08:00
Anonymous Maarten
4574c16178
cmake: test for lsx and lasx intrinsics for loongarch
2022-11-25 21:50:08 +01:00
Anonymous Maarten
d1f423d9db
cmake: make all assembly options depend on SDL_ASSEMBLY and architecture
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
1bbff6596c
cmake: add support for some BSD's wscons input
2022-11-25 21:36:53 +01:00
Ozkan Sezer
1e4cd682b3
removed M_PI detection from cmake, removed HAVE_M_PI from config files.
...
(didn't touch autofoo side for it so as not to break PR/6605)
2022-11-25 22:35:40 +03:00
Anonymous Maarten
ecd36c8f07
cmake: fix typo's in last commit
2022-11-25 04:31:25 +01:00
Anonymous Maarten
c9b8559af5
cmake: use option to pass extra check options instead of hardcoding them
2022-11-25 03:15:30 +01:00
Anonymous Maarten
c069ff1586
cmake: add /usr/local/include to check include directories
2022-11-24 23:33:59 +01:00
Anonymous Maarten
cd13600944
cmake: don't reset check state after pushing state
2022-11-24 23:33:54 +01:00
Cameron Cawley
84781a7b6f
Disable the offscreen video driver if EGL is unavailable ( #6234 )
2022-11-23 10:55:34 -08: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
5db60670ba
removed linkage to OpenGLES framework
2022-11-23 07:47:00 +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
pionere
68b30d24e0
cmake: get rid of the duplicated _USE_MATH_DEFINES
...
- define _USE_MATH_DEFINES in SDL_stdinc.h only
- define _USE_MATH_DEFINES if not defined already
2022-11-22 08:31:35 -08: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
Sam Lantinga
0bfeed061b
Updated to version 2.26.0 for release
2022-11-21 16:15:58 -08:00
Sam Lantinga
8ae46a49ea
Save the version in VERSION.txt instead of VERSION
...
Fixes https://github.com/libsdl-org/SDL/issues/6558
2022-11-21 06:57:02 -08:00
Sam Lantinga
802c624ab3
Strip trailing newline when reading the VERSION file
2022-11-20 14:37:05 -08:00
Ozkan Sezer
3bc4bad8fb
add missing strcasestr checks to cmake and autotools build systems,
...
and update config files.
2022-11-20 14:20:33 -08:00
Sam Lantinga
78ea6af2cd
Updated to version 2.25.1 for release candidate
2022-11-17 09:01:35 -08:00
Anonymous Maarten
819b0143e3
cmake: enable SDL_TEST by default for emscripten
2022-11-16 15:42:08 +01:00
Anonymous Maarten
55384db8a6
cmake: emscripten has libunwind.h, libunwind.a has missing symbols
2022-11-16 15:42:08 +01:00
Anonymous Maarten
6e46090a30
cmake: check ALL headers inside the look (including sys/types.h)
2022-11-16 15:42:08 +01:00
Anonymous Maarten
500bac0b13
cmake: include FIndPkgConfig.cmake through find_package
2022-11-16 15:42:08 +01:00
Pierre Wendling
a71ad40ac3
CMake: Add option to use Ccache.
2022-11-15 19:04:22 +01:00
Sam Lantinga
9f8b68a278
Fixed building without linux/input.h
...
https://github.com/libsdl-org/SDL/issues/6169
2022-11-11 10:25:52 -08:00
Anonymous Maarten
61297f703a
cmake: on Apple, check for presence of an OBJC compiler
2022-11-03 15:03:47 +01:00
Luca Lolli
b50e429354
Fix compilation for .m files extension
2022-11-03 15:03:47 +01:00
Anonymous Maarten
4c704ecfdd
cmake: use SDL2-static as static library output name when prefix/static == ""/".lib"
...
Apparently, some clang@Windows compilers do this.
2022-11-01 13:53:09 -07: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
Simon McVittie
4ca5ea5b7e
build: Add a mechanism to mark builds with vendor info
...
Downstream distributors can use this to mark a version with their
preferred version information, like a Linux distribution package version
or the Steam revision it was built to be bundled into, or just to mark
it with the vendor it was built by or the environment it's intended to
be used in.
For instance, in Debian I'd use this by configuring with:
--enable-vendor-info="${DEB_VENDOR} ${DEB_VERSION}"
to get a SDL_REVISION like:
release-2.24.1-0-ga1d1946dc (Debian 2.24.1+dfsg-2)
which gives a Debian user enough information to track down the patches
and build-time configuration that were used for package revision 2.
In Autotools and CMake, this is a configure-time option like any other,
and will go into both SDL_REVISION (via SDL_revision.h) and
SDL_GetRevision().
In other build systems (MSVC, Xcode, etc.), defining the
SDL_VENDOR_INFO macro will get it into the output of SDL_GetRevision(),
although not SDL_REVISION.
Resolves: https://github.com/libsdl-org/SDL/issues/6418
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-10-22 09:27:10 -07:00
Simon McVittie
2dc788cb9f
build: Expand version info in SDL_REVISION and SDL_GetRevision()
...
Instead of using a URL and git sha1, this uses `git describe` to
describe the version relative to the nearest previous git tag, which
gives a better indication of whether this is a release, a prerelease,
a slightly patched prerelease, or a long way after the last release
during active development.
This serves two purposes: it makes those APIs more informative, and it
also puts this information into the binary in a form that is easy to
screen-scrape using strings(1). For instance, if the bundled version of
SDL in a game has this, we can see at a glance what version it is.
It's also shorter than using the web address of the origin git
repository and the full git commit sha1.
Also write the computed version into a file ./VERSION in `make dist`
tarballs, so that when we build from a tarball on a system that doesn't
have git available, we still get the version details.
For the Perforce code path in showrev.sh, output the version number
followed by the Perforce revision, in a format reminiscent of
`git describe` (with p instead of g to indicate Perforce).
For the code path with no VCS available at all, put a suffix on the
version number to indicate that this is just a guess (we can't know
whether this SDL version is actually a git snapshot or has been
patched locally or similar).
Resolves: https://github.com/libsdl-org/SDL/issues/6418
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-10-22 09:27:10 -07:00
Anonymous Maarten
5ed091c12d
cmake: fix reporting of SDL_TESTS
2022-10-21 15:32:05 +02:00
Anonymous Maarten
96361fc476
cmake: create and install sdl2.pc for MSVC & WATCOM
2022-10-20 19:02:31 +02:00
Anonymous Maarten
d542f43b2a
cmake: add SDL_INSTALL_CMAKEDIR cache variable to override location of cmake config files
2022-10-19 16:41:25 +02:00
Wouter Wijsman
428b5ae546
PSP: Reorder extra imports
2022-10-18 10:34:51 +02:00
Pierre Wendling
392f3882d0
N3DS: Use SDL_Sensor instead of Joystick sensors.
2022-10-10 08:50:59 -07:00
Pierre Wendling
27557b62b6
N3DS: Prefix timer sources with `N3DS_`.
2022-10-10 08:50:59 -07:00
Pierre Wendling
655275378d
N3DS port (squashed)
...
A dedicated renderer using Citro3D would likely allow for better
much better graphical performances.
2022-10-10 08:50:59 -07:00
Aaron Barany
6ffc45b0ed
Removed "undefined" argument for Apple platforms.
...
This is incompatible with enabling bitcode, such as with iOS builds. The
default value for "undefined" is "error" so this option should be
redundant.
2022-10-09 18:57:55 -07:00
Anonymous Maarten
37beabd11c
SDL_mslib.c: clang-cl does not support `/GL-`
2022-10-08 23:41:07 +02:00
Anonymous Maarten
07225d2e26
cmake: fix check for -marm
...
This fixes the following warning:
clang: warning: argument unused during compilation: '-marm' [-Wunused-command-line-argument]
2022-10-08 23:41:07 +02:00
Anonymous Maarten
45da133999
cmake: don't error on apple when using deprecated declarations
2022-10-08 23:41:07 +02:00
Anonymous Maarten
77822ed166
cmake: add SDL_WERROR to conditionally enable/disable -Werror
2022-10-08 23:41:07 +02:00
Anonymous Maarten
1064fdee8c
cmake: append to COMPILE_FLAGS property
2022-10-08 23:41:07 +02:00
Ozkan Sezer
fa7ffa4e88
change the iconv configuration option names to be more verbose.
2022-10-06 03:37:50 +03:00
Ozkan Sezer
294ccba0a2
better wording for --enable-iconv description
2022-10-05 23:56:56 +03:00
Anonymous Maarten
c9f60cce40
cmake+autotools: add option to enable/disable iconv
2022-10-05 10:00:28 -07:00
Anonymous Maarten
d0657fde30
cmake: Use DWARF 4 debug information when building using mingw
...
See f18fae4c68
2022-10-04 18:03:57 -07:00
Anonymous Maarten
70214ed3ed
cmake: append to CMAKE_MODULE_PATH instead of overwriting
2022-09-27 13:13:52 -07:00
Anonymous Maarten
a193a03d81
cmake: add -Wno-declaration-after-statement to cpu-features.c alone
2022-09-27 13:13:52 -07:00
Anonymous Maarten
2f9c9b5f80
cmake: make sure check_* uses 2 different variables for clock_gettime
2022-09-27 03:47:20 +03:00
Anonymous Maarten
bfecd78159
cmake: use check_symbol_exists to check dlopen + need for dl library
2022-09-27 03:47:20 +03:00
Ozkan Sezer
f6c9b06562
cmake: output libSDL2-2.0.0.dylib like autotools, not libSDL2-2.0.dylib.
...
libSDL2-2.0.dylib is now installed as a symlink to libSDL2-2.0.0.dylib :
$ ls -l *.dylib
-rwxr-xr-x. 1 ozkan ozkan 1755488 Sep 23 23:53 libSDL2-2.0.0.dylib
lrwxrwxrwx. 1 ozkan ozkan 19 Sep 23 23:53 libSDL2-2.0.dylib -> libSDL2-2.0.0.dylib
lrwxrwxrwx. 1 ozkan ozkan 17 Sep 23 23:53 libSDL2.dylib -> libSDL2-2.0.dylib
Reference issue: https://github.com/libsdl-org/sdl12-compat/issues/217
2022-09-23 23:56:04 +03:00
Anonymous Maarten
3b20e0ecef
cmake: only add -Wl,--undefined=WinMain when building an executable
2022-09-19 05:00:24 +03:00
Ivan Epifanov
202dfea502
Vita: drop memory defines
2022-09-17 10:12:46 -07:00
Ivan Epifanov
7115ceb775
Vita: restore sceClibMemcmp
2022-09-17 10:12:46 -07:00
quyykk
37effc7700
Build the offscreen video driver by default.
2022-09-15 10:59:37 -07:00
Rinnegatamante
eb0bf2c29d
vita: Drop memcmp redirect to sceClibMemcmp.
2022-09-12 13:32:48 -07:00
Ozkan Sezer
5b2884cb02
apply commit d0a3570300
to cmake side too.
2022-09-12 20:28:00 +03:00
Sam Lantinga
181265ba71
Removed unused variable
2022-09-05 11:36:20 -07:00
Sam Lantinga
acf397b4df
Actually, DYLIB_COMPATIBILITY_VERSION shouldn't be updated for a stable point release
...
@smcv
2022-09-05 11:21:13 -07:00
Cameron Cawley
fd93f817ba
Assume that stdint.h is available on Windows with compilers other than MSVC <= 2008
2022-09-05 09:01:31 -07:00
Sam Lantinga
ef988fe184
Only use CETCOMPAT on x86/x64 platforms
...
Fixes https://github.com/libsdl-org/SDL/issues/6173
2022-09-05 08:59:17 -07:00
Sam Lantinga
4e98ba612b
Set DYLIB_COMPATIBILITY_VERSION to DYLIB_CURRENT_VERSION to match autotools
...
Autotools sets both versions to the same value, so Xcode and CMake need to match for the libraries to be compatible between the different builds.
See these for details:
https://github.com/libsdl-org/sdl12-compat/pull/207
https://github.com/libsdl-org/SDL/issues/2934
https://stackoverflow.com/questions/67055770/usage-of-current-version-and-compatibility-version-on-macos
2022-09-05 08:28:06 -07:00
Gleb Mazovetskiy
803924b223
CMake: Make SDL_SHARED/STATIC/TEST options
...
This makes it easier to set these options when SDL is used as a subprojects.
Since CMake v3.13+, one can simply `set(SDL_TEST OFF)` before include the SDL2 subproject because options do not override existing variables. (https://cmake.org/cmake/help/latest/policy/CMP0077.html#policy:CMP0077 )
This is also true for `set(CACHE)` commands but only in CMake v3.21+ (https://cmake.org/cmake/help/latest/policy/CMP0126.html ).
2022-08-29 17:47:32 -07:00
Ludovico de Nittis
e8cb4da71f
Add utility function to detect if SDL is inside a sandbox
...
Refactor the previous sandbox check in a standalone function that also
includes Snap support.
Signed-off-by: Ludovico de Nittis <ludovico.denittis@collabora.com>
2022-08-29 06:30:40 -07:00
Anonymous Maarten
32c4996c04
cmake: add SDL_IBUS option to enable/disable DBUS + test sys/inotify.h
2022-08-25 18:12:16 -07:00
Anonymous Maarten
c8b56ee5e6
cmake: add SDL_DBUS option to enable/disable DBUS
2022-08-25 18:12:16 -07:00
Anonymous Maarten
032ff64041
cmake: OpenIndiana announces SunOS, which is the former name of Solaris
2022-08-25 18:12:16 -07:00
Anonymous Maarten
711846c1f4
cmake: fix build with SDL_WAYLAND_SHARED=OFF
2022-08-25 17:15:54 -07:00
Cameron Gutman
2ceea46061
cmake: Enable CET compatibility for x86/x64 targets using VS 16.7+
2022-08-24 11:29:36 -07:00
Sam Lantinga
6e9c14e550
Updated to version 2.25.0 for development
2022-08-19 09:38:42 -07:00
Sam Lantinga
8c9beb0c87
Updated to version Updated to version 2.24.0 for release
2022-08-19 08:44:09 -07:00
Sam Lantinga
f1416ef2ba
Updated to version 2.23.2 for release candidate
2022-08-12 20:27:22 -07:00
Aaron Barany
3f19e36d12
Disable declaration-after-statement warning on Android
...
External .c files are brought in that don't adhere to this requirement for
pre-C99 code and causes the build to break with the latest NDK.
Fixes #6019
2022-08-08 08:31:40 -07:00
Anonymous Maarten
17b329d199
cmake: enable disabing hidapi
2022-08-05 13:06:51 -07:00
Anonymous Maarten
a4e6f3ca9d
cmake: when there are alternatives, don't use libusb by default
2022-08-05 13:06:51 -07:00
Francisco Javier Trujillo Mata
4564e89825
put files at the same line
2022-08-02 11:40:31 -07:00
Daniel Santos
147a71b976
Finish dummy driver
2022-08-02 11:40:31 -07:00
Daniel Santos
2660449c6c
Add dummy driver
2022-08-02 11:40:31 -07:00
Daniel Santos
a81aa99298
Add prim video support
2022-08-02 11:40:31 -07:00
Francisco Javier Trujillo Mata
46f95a7a5f
Create dummy PS2 Video driver
2022-08-02 11:40:31 -07:00
Sam Lantinga
954bbdf3ae
Allow emscripten platform to build without threads
2022-08-01 09:51:21 -07:00
Sam Lantinga
e4cc076a79
Threads are used by many SDL subsystems and may not be disabled.
...
Fixes https://github.com/libsdl-org/SDL/issues/5095
2022-08-01 09:17:05 -07:00
Anonymous Maarten
83f5bbdf25
cmake: define SDL_STATIC_LIB for static SDL2 library
2022-07-29 15:05:19 +02:00
Anonymous Maarten
bdd1d035b7
cmake: Don't add /NODEFAULTLIB to link flags when building SDL-static
2022-07-29 15:05:19 +02:00
Anonymous Maarten
02c8747176
math.h does not always provide M_PI
...
This fixes the following error when building with SDL_LIBC:
SDL\test\testautomation_math.c(1965): error C2065: 'M_PI': undeclared identifier
2022-07-27 09:10:18 -07:00
Anonymous Maarten
5da85376b9
stdlib: move all mslibc functions to SDL_mslibc.c
...
This allows disabling LTO on them by only specifying a single file.
2022-07-27 09:07:56 -07:00
Anonymous Maarten
5c70e45c53
cmake: don't use result of 'find_library' for Android libraries
2022-07-26 14:24:36 -07:00
Anonymous Maarten
4690689a4c
cmake: on Apple, don't use find_library for frameworks + use EXTRA_LDFLAGS
2022-07-26 14:24:36 -07:00
Anonymous Maarten
fc2497b109
Revert "cmake: don't add -mwindows to link flags in sdl2.pc"
...
This reverts commit d211aaddc1
.
2022-07-23 18:05:35 +02:00