Commit graph

555 commits

Author SHA1 Message Date
Anonymous Maarten ba19d3c048 cmake: remove SDL_CMAKE_DEBUG_POSTFIX option
Use CMAKE_DEBUG_POSTFIX instead
2022-11-29 11:29:03 -08:00
Anonymous Maarten 2d89c4680f cmake: simplify .so and .dylib versioning 2022-11-29 11:29:03 -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
Anonymous Maarten e2060de714 cmake: use target_link_libraries to pass -Wl,--undefined=WinMain 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 3acd1ad25f cmake: only MSVC understands -nodefaultlib:MSVCRT 2022-11-28 00:20:22 +01:00
Anonymous Maarten 5151cbf4d1 cmake: check essential headers even when building with SDL_LIBC=OFF 2022-11-28 00:20:22 +01:00
Anonymous Maarten 9d7e4a7d6e cmake: don't cache HAVE_xxx variables for checking libc features 2022-11-28 00:20:22 +01:00
Anonymous Maarten b2e428626b cmake: disable system iconv by default on Windows
This is a different default then current CMake and autotools, but matches the released SDLx.dll's.
2022-11-28 00:20:22 +01:00
Anonymous Maarten 27707755c1 cmake: use SDL_LIBC_DEFAULT for default SDL_LIBC value 2022-11-28 00:20:22 +01:00
Anonymous Maarten 3fad16cc2b cmake: use SDL_CPU_X86 to enable MMX/SSE on x86 2022-11-28 00:20:01 +01:00
Anonymous Maarten 21f8e3ce04 cmake: use CMakePushCheckState while testing ARM NEON support 2022-11-28 00:20:01 +01:00
Anonymous Maarten 46d85fd5a4 cmake: don't cache HAVE_3DNOW value 2022-11-28 00:20:01 +01:00
Anonymous Maarten 82360b3175 cmake: don't cache HAVE_SSE value 2022-11-28 00:20:01 +01:00
Anonymous Maarten 375456a3a0 cmake: use SDL_ASSEMBLY_DEFAULT for default SDL_ASSEMBLY value 2022-11-28 00:20:01 +01: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 0a48abc860 Switch header convention from #include "SDL.h" to #include <SDL3/SDLh>
I ran this script in the include directory:
```sh
sed -i '' -e 's,#include "\(SDL.*\)",#include <SDL3/\1>,' *.h
```

I ran this script in the src directory:
```sh
for i in ../include/SDL3/SDL*.h
do hdr=$(basename $i)
   if [ x"$(echo $hdr | egrep 'SDL_main|SDL_name|SDL_test|SDL_syswm|SDL_opengl|SDL_egl|SDL_vulkan')" != x ]; then
        find . -type f -exec sed -i '' -e 's,#include "\('$hdr'\)",#include <SDL3/\1>,' {} \;
    else
        find . -type f -exec sed -i '' -e '/#include "'$hdr'"/d' {} \;
    fi
done
```

Fixes https://github.com/libsdl-org/SDL/issues/6575
2022-11-26 22:15:18 -08:00
Sam Lantinga e4b97c42b3 cmake: avoid copy of headers by moving generated headers to include/build_config (thanks @madebr!)
Shove all build system generated headers in include/build_config.
Doing this, cmake does not need to copy the headers anymore.
This was done for external projects vendoring SDL.

See https://github.com/libsdl-org/SDL/issues/6641#issuecomment-1328092535
2022-11-26 15:37:08 -08:00
Sam Lantinga bde808cd87 Fixed some warnings when building on Linux with -DSDL_LIBC=OFF 2022-11-26 05:18:26 -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
Sam Lantinga cc1f9eb983 Use Apple's nomenclature for macOS and iOS
Fixes https://github.com/libsdl-org/SDL/issues/6621
2022-11-25 16:00:06 -08:00
Anonymous Maarten 716821ca67 autotools: remove SDL3.spec.in 2022-11-25 15:37:30 -08:00
Anonymous Maarten 95b0712033 cmake: don't create libSDL3.so symbolic link at install time 2022-11-25 12:57:32 -08:00
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