Anonymous Maarten
9ada9daf51
SDL_blit_copy: Don't call potentially FPU using SDL_memcpy in SDL_memcpyMMX
2023-03-27 06:12:49 +00:00
Anonymous Maarten
37c9329db2
cmake: rename SDL_AVX512 -> SDL_AVX512F cmake option
2023-03-27 06:12:49 +00:00
Anonymous Maarten
b0a5182e84
Sunset SDL_HasRDTSC
2023-03-27 06:12:49 +00:00
Anonymous Maarten
99a799ad8b
cmake: add /Q_no-use-libirc flag when building a no-libc library
...
The new Intel LLVM compiler needs this when building SDL3
in release mode.
2023-03-27 06:12:49 +00:00
Anonymous Maarten
4be82202de
cmake: new LLVM based Intel compiler does not recognize MSVC's /MP
2023-03-27 06:12:49 +00:00
Anonymous Maarten
51d96a1680
cmake: increase threshold for stack probes
...
The /Gs argument controls the number of bytes that local variables
can occupy before a stack probe is initiated.
By setting it to a huge value, no calls to __chkstk are inserted.
This change is needed for the classic Intel C compiler to build SDL
with -DSDL_LIBC=OFF.
2023-03-27 06:12:49 +00:00
Anonymous Maarten
29e19bf829
cmake: disable warnings in libm + warning about EMMS instruction
...
SDL_BlitCopyMMX ends with _mm_empty(), so the MMX state should be emptied.
(_mm_empty is the intrinsic function for emms)
2023-03-27 06:12:49 +00:00
Anonymous Maarten
345d1cd355
cmake: add support for building with Intel C compiler
2023-03-27 06:12:49 +00:00
Anonymous Maarten
97c3077678
cmake: detect rdtsc in CMake
2023-03-27 06:12:49 +00:00
Anonymous Maarten
0bd5ce13db
cmake: add underscore in SSE4_1 and SSE4_2 options
2023-03-21 23:03:02 +03:00
Ozkan Sezer
8eb673d43d
cmake: fix typo from previous commit.
2023-03-21 23:03:02 +03:00
Ozkan Sezer
6c9780720b
cmake: added configuration options for AVX2, AVX512F, SSE4.1, and SSE4.2
...
adjusted SDL_intrin.h and testautomation_intrinsics.c accordingly.
2023-03-21 23:03:02 +03:00
Ozkan Sezer
feec1305c6
cmake: remove duplicate setting of HAVE_ASSEMBLY to TRUE
2023-03-21 23:03:02 +03:00
Anonymous Maarten
905b892314
cmake: simplify mmx/sse/sse2/avx compiler support detection
2023-03-21 23:03:02 +03:00
Ozkan Sezer
69de6964e5
use target attributes of gcc / clang for SIMD code.
2023-03-21 23:03:02 +03:00
Anonymous Maarten
cd7a3f8af5
cmake: generate and install man pages
2023-03-21 02:19:19 +01:00
Anonymous Maarten
65178df717
ci: test ARM neon and simd on ci using vita toolchain
2023-03-15 14:54:20 +01:00
Anonymous Maarten
d27db3defa
cmake+video: always use altivec.h header for detection + introduce SDL_ENABLE_ALTIVEC
2023-03-15 14:54:20 +01:00
Anonymous Maarten
3db3424b4e
cmake: Detect powerpc architecture
2023-03-15 14:54:20 +01:00
Anonymous Maarten
fc4085b54e
cmake: Allow build system to disable arm neon intrinsics
2023-03-15 14:54:20 +01:00
Anonymous Maarten
46de6241d7
cmake: Allow build system to disable loongarch intrinsics
2023-03-15 14:54:20 +01:00
Anonymous Maarten
4681240241
cmake: Detect AVX + allow build system to disable Intel intrinsics
2023-03-15 14:54:20 +01:00
Anonymous Maarten
683411e96f
cmake: only use precompile headers for C and CXX
2023-03-15 14:38:26 +01:00
Anonymous Maarten
7d55bbc0da
cmake: get_filename_component(EXT) returns extension including leading dot
2023-03-15 14:38:26 +01:00
Guldoman
ad95c93bf4
Add portal interface to support `SDL_GetSystemTheme` in linux
2023-03-09 15:05:16 -08:00
Anonymous Maarten
c304fbded6
cmake: disable ccache by default
2023-03-09 20:24:03 +01:00
Anonymous Maarten
103fbcfc05
cmake: use compatible interface properties to disallow linking to a different version of SDL
2023-03-03 23:40:57 +01:00
Anonymous Maarten
02fede7c8c
cmake: initialize SDL_SHARED and SDL_STATIC from BUILD_SHARED_LIBS
2023-02-28 02:15:39 +01:00
Anonymous Maarten
dc138ee3d4
cmake: SDL3-shared target will always be a shared target
2023-02-17 23:42:03 +01:00
Anonymous Maarten
4d8a50912b
cmake: no shared SDL libraries for riscos
2023-02-16 13:59:23 -08:00
Sam Lantinga
bde4c738bb
Don't build SDL as a static library by default
...
Linking with SDL dynamically allows end users to update SDL with bug fixes and new controller support and is recommended. This change makes it so SDL is dynamic by default and developers can build SDL themselves with a static option if that's something they need.
2023-02-16 13:59:23 -08:00
Ozkan Sezer
c6792f78df
look for clock_gettime() in libc first, then in librt if not found.
2023-02-13 11:23:12 -08:00
Anonymous Maarten
236d26b480
cmake: add `-F <SDL3-framework-parent-folder>` compile option in CMakeLists.txt
2023-02-13 05:26:57 +01:00
Anonymous Maarten
ff82341ce9
cmake: allow find_package from build directory (requires CMake 3.26)
2023-02-09 17:20:28 -08:00
Anonymous Maarten
b8adf90aa3
cmake: check again for unknown documentation commands
2023-02-09 17:20:28 -08:00
Anonymous Maarten
cc0fa00049
cmake: include directories of (generated) dependencies as SYSTEM
2023-02-09 17:20:28 -08:00
Pierre Wendling
fa8fba3812
Add clang-tidy config and CMake/CI support.
2023-02-06 21:02:25 -08:00
Anonymous Maarten
0a3d038ff7
cmake: fix installed SDL3::SDL3_test + test on ci
2023-01-31 05:29:38 +01:00
Anonymous Maarten
53d434fd24
cmake: add CPack support for creating binary archives
2023-01-31 01:59:21 +01:00
Anonymous Maarten
23c2c15a70
cmake: capitalize SDL3::Headers target
2023-01-31 01:59:21 +01:00
Anonymous Maarten
13c294eec3
cmake: add support for creating Apple frameworks with CMake
2023-01-31 01:59:21 +01:00
Anonymous Maarten
93c25e650c
cmake: create SDL3::headers for include path + no exported CMake variables
2023-01-31 01:59:21 +01:00
Anonymous Maarten
5690dfb65b
cmake: don't install Android.mk files for Android
2023-01-31 01:59:21 +01:00
Anonymous Maarten
09e2f83e17
cmake: no more SDL3_* cache variables
2023-01-31 01:59:21 +01:00
Anonymous Maarten
19d162281c
cmake: detect cpu architecture in SDL_DetectCPUArchitecture
...
Stop looking for arch, when one is found
2023-01-31 01:59:21 +01:00
Anonymous Maarten
9cf34908a1
cmake: pass VERSION to project() + don't use SDL_VERSION
2023-01-31 01:59:21 +01:00
Anonymous Maarten
3aa456dead
cmake: remove MSCOS_RPATH related FIXME
...
The Macos CI does not show any warnings, so assume it's fixed
2023-01-31 01:59:21 +01:00
Sam Lantinga
5970311353
Fixed build using clang-cl on Windows
2023-01-25 14:46:09 -08:00
Ozkan Sezer
3bf86c0eca
cmake: addititonal check for visibility attributes.
...
makes sure to detect unsupported configurations especially with new gcc
versions.
2023-01-26 01:32:32 +03:00
Sam Lantinga
13087405e0
Fixed clang documentation warnings
...
Don't warn about \threadsafety, which was added as custom documentation for SDL functions
Also removed -Wdocumentation-unknown-command, since that triggers on the e-mail addresses in the generated wayland protocol headers.
2023-01-25 14:25:13 -08:00
Anonymous Maarten
4ec3a5ac27
cmake: only add <LANG>_VISIBILITY_PRESET properties when compiler supports -fvisibility=
2023-01-25 22:27:47 +01:00
Anonymous Maarten
edf8db0466
cmake: removed unused code
2023-01-25 00:23:05 +01:00
Anonymous Maarten
5f995579e9
vita: add missing static libraries for using gles with pib
2023-01-25 00:23:05 +01:00
Anonymous Maarten
bb3a60bce5
cmake: move include(sdlfind.cmake) to main cmake script
2023-01-25 00:23:05 +01:00
Anonymous Maarten
3e3debf9de
vita: allow GLES support without GL support
2023-01-25 00:23:05 +01:00
Anonymous Maarten
3cb819ac48
vita: fix PVR_PSP2 (GLES) + gl4es4fita (GL)
2023-01-25 00:23:05 +01:00
Anonymous Maarten
6d11515873
cmake: make sdl3.pc relocatable
2023-01-15 12:37:51 -08:00
Anonymous Maarten
0a1479d58c
cmake: fix sdl3.pc for Nintendo 3DS + add to test matrix
2023-01-15 17:46:36 +01:00
Anonymous Maarten
b60084eb0b
cmake: don't quote INOTIFY_INCLUDE_DIRS
2023-01-13 18:33:51 +01:00
Anonymous Maarten
1e8443f54e
cmake: only use $<COMPILE_LANGUAGE:OBJC> when CMAKE_OBJC_COMPILER is defined
2023-01-12 21:12:54 +01:00
Anonymous Maarten
837416ef85
cmake: command-line option ‘-Wdeclaration-after-statement’ is valid for C/ObjC but not for C++
2023-01-10 02:39:09 +01:00
yuanhecai
50af65a7dd
Fix loongarch64 support
...
HAS_LSX/LASX is modified as HAVE_LSX/LASX.
2023-01-09 09:11:50 +01:00
Anonymous Maarten
61f76efb85
cmake: do all compile tests with -D_GNU_SOURCE=1
2023-01-08 19:07:58 +01: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
Ozkan Sezer
d4f7b0aa0e
cmake: added missing INTERFACE to target_compile_definitions
2023-01-08 19:41:32 +03: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
2f1860cfc6
cmake: add sdl-shared-build-options target to collect SDL shared library flags
2023-01-08 15:57:51 +01:00
Anonymous Maarten
0003559adf
cmake: handle macos current and compatibility version through VERSION/SOVERSION properties
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
8fc445c730
cmake: SDL3 does not need -lmingw32 anymore because SDL_main has gone
2023-01-08 15:57:51 +01:00
Anonymous Maarten
562a8209d8
cmake: HAVE_LINUX_VERSION_H is unused
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
4d9ee735fd
cmake: SIZEOF_VOIDP, LIBNAME and LIBTYPE are not used
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
fb80608fff
cmake: use cmake <LANG>_VISIBILITY_PRESET property to pass -fvisibility=hidden
2023-01-08 15:57:51 +01:00
Anonymous Maarten
87af5cfc9f
cmake: HAVE_GCC_PREFERRED_STACK_BOUNDARY is not used anymore
2023-01-08 15:57:51 +01:00
Anonymous Maarten
d73b9fec1e
cmake: target_compile_definitions does not need -D prefix
2023-01-08 15:57:51 +01:00
Ozkan Sezer
ca541789ea
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
5ea06f487d
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
Ozkan Sezer
0f9b923ff4
cmake: fix detection of math library functions.
...
Fixes https://github.com/libsdl-org/SDL/issues/7011
2023-01-07 14:25:04 +03:00
Sam Lantinga
39852241ef
Added -Wdocumentation to CMake clang build
2023-01-03 15:58:48 -08:00
Sam Lantinga
7f23d71b6a
Added SDL_modf() and SDL_modff()
...
This function is useful for accumulating relative mouse motion if you want to only handle whole pixel movement.
e.g.
static float dx_frac, dy_frac;
float dx, dy;
/* Accumulate new motion with previous sub-pixel motion */
dx = event.motion.xrel + dx_frac;
dy = event.motion.yrel + dy_frac;
/* Split the integral and fractional motion, dx and dy will contain whole pixel deltas */
dx_frac = SDL_modff(dx, &dx);
dy_frac = SDL_modff(dy, &dy);
if (dx != 0.0f || dy != 0.0f) {
...
}
2022-12-29 23:12:19 -08:00
Anonymous Maarten
7150d6b05a
cmake: add SDL3 to include path
...
This reverts parts of 9f2ca87
2022-12-29 09:01:56 -08:00
avafinger
12e0e6d130
SDL3 with Hardware Acceleration for ROCKCHIP platform (mali blob)
2022-12-26 08:50:51 -08:00
Ryan C. Gordon
1cf2b566af
cpu: Removed 3DNow! support and SDL_Has3DNow().
...
Reference Issue #6636 .
2022-12-23 09:30:56 -08:00
Anonymous Maarten
19d4d64cfe
cmake: disable precompiled header for SDL_spinlock.c when targeting Android
...
This fixes the following error:
error: PCH file was compiled for the target 'thumbv7-none-linux-android16' but the current translation unit is being compiled for target 'armv7-none-linux-android16'
2022-12-21 09:39:22 -08:00
Anonymous Maarten
8f9227e4be
cmake: use CMakePushCheckState to handle check states
2022-12-19 09:19:45 -08:00
Anonymous Maarten
fab33545fa
cmake: remove outdated fixme
2022-12-19 09:19:45 -08:00
Anonymous Maarten
fe8291e09a
cmake: only install SDL_test*.h headers when building SDL_test library
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
289b024715
cmake: add function to print dict list
2022-12-19 09:19:45 -08:00
Anonymous Maarten
a787b1c0b7
cmake: LINKER_LANGUAGE is a target property, not a cmake variable
...
LINKER_LANGUAGE needs to be used as following:
Usage
cmake [options] <path-to-source>
cmake [options] <path-to-existing-build>
cmake [options] -S <path-to-source> -B <path-to-build>
Specify a source directory to (re-)generate a build system for it in the
current working directory. Specify an existing build directory to
re-generate its build system.
Run 'cmake --help' for more information.
Haiku does not not this property explicitly set because CMake knows .cc files are c++
2022-12-19 09:19:45 -08:00
Anonymous Maarten
69812678cf
cmake: cache cmake config installation folder in SDL_INSTALL_CMAKEDIR_ROOT
...
Make sure SDLx is not part of the cached variable such that it can be re-used by SDL2 and SDL3
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
63d3fb469d
Move src/main/haiku/ to src/core/
...
turns out that this wasn't even built as a static libSDLmain,
but as part of the (possibly dynamic) libSDL3
2022-12-15 08:01:01 -08:00
Daniel Gibson
989a8ca90e
Port PSP SDL_main to header-only + SDL_RunApp()
2022-12-15 08:01:01 -08:00
Daniel Gibson
b1b3bd654d
Port PS2 SDL_main to header-only + SDL_RunApp()
2022-12-15 08:01:01 -08:00
Daniel Gibson
7bfc41db3c
Unify all the SDL_*RunApp() functions into just SDL_RunApp()
...
makes the SDL_main code shorter
Also added a generic SDL_RunApp() implementation for platforms that
don't really need it.
Some platforms (that use SDL_main but haven't been ported yet) are
still missing, but are added in the following commits.
2022-12-15 08:01:01 -08:00