Commit graph

524 commits

Author SHA1 Message Date
Anonymous Maarten e927e5d440 vita: add missing static libraries for using gles with pib 2023-01-25 00:22:50 +01:00
Anonymous Maarten a8a5bd3d6b cmake: allow disabling OpenGL support when building with GLES using PSP2-PVR 2023-01-25 00:22:50 +01:00
Anonymous Maarten c0445c23bf vita: PVR needs to link to sceIme_stub library 2023-01-23 05:08:59 +01:00
Anonymous Maarten f51f7fbb94 n3ds: fix exported libraries of n3ds 2023-01-15 17:29:37 +01:00
yuanhecai 0b0d256a69 Fix loongarch64 support
HAS_LSX/LASX is modified as HAVE_LSX/LASX.
(cherry picked from commit 50af65a7dd)
2023-01-09 11:14:28 +03:00
Anonymous Maarten 460b7b247f cmake: do all compile tests with -D_GNU_SOURCE=1 2023-01-08 19:21:50 +01:00
Ozkan Sezer 0d5467a6e9 cmake: check for math library functions even in the absence of libm
(Reference issue: https://github.com/libsdl-org/SDL/issues/7011)
2023-01-07 14:25:04 +03:00
Ozkan Sezer 305e7b55bd cmake: fix detection of library functions when -Werror is enabled.
(Reference issue: https://github.com/libsdl-org/SDL/issues/7011)
2023-01-07 14:25:04 +03:00
nfarid b79732b967
cmake: use FindALSA.cmake to find ALSA library 2022-12-11 23:23:45 +01:00
Anonymous Maarten 5df106603d cmake: move platform detection to cmake/sdl/paltform.cmake for re-use by SDL2-compat 2022-11-29 20:20:33 +01:00
Anonymous Maarten 84039e2514 cmake: use target_link_libraries to pass -Wl,--undefined=WinMain
(cherry-picked from commit e2060de714)
2022-11-29 21:15:21 +03:00
Anonymous Maarten dcd1252368 cmake: test for lsx and lasx intrinsics for loongarch 2022-11-25 21:50:43 +01:00
Anonymous Maarten edb75bc29e cmake: make all assembly options depend on SDL_ASSEMBLY and architecture 2022-11-25 21:50:25 +01:00
Anonymous Maarten 660cec69b1 cmake: find libudev library so it gets priority 2022-11-25 21:37:42 +01:00
Anonymous Maarten a2611edcf3 cmake: add support for some BSD's wscons input 2022-11-25 21:37:36 +01:00
Sam Lantinga ea8f8b6dc3 Updated to version 2.27.0 for development 2022-11-21 16:36:10 -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