Commit Graph

545 Commits

Author SHA1 Message Date
Anonymous Maarten
fcae9cd210 cmake: build with -Wdocumentation 2023-08-09 02:53:48 +02:00
Christopher Wellons
8231278817
Unaligned stacks on i686-w64-mingw32, may lead to crashes (#7607)
Co-authored-by: Ozkan Sezer <sezeroz@gmail.com>
2023-07-10 03:05:32 +03:00
Joshua Barnett
547c8c288b Add kernel32 to SDL_EXTRA_LIBS required for cross-compilation to Win32 native
Linking error experienced while compiling with the following toolchain
due to lack of kernel32.lib

d35e5f8dde/cmake/platforms/WinMsvc.cmake (L317-L321)
2023-07-09 14:02:32 +02:00
Anonymous Maarten
0262f757e1 cmake: check whether libunwind can be compiled and linked against 2023-07-05 00:25:24 +02:00
Anonymous Maarten
8908d16285 cmake: explicitly disable WINDOWS_EXPORT_ALL_SYMBOLS for SDL2
This fixes the following errors when a dll attempts to link to a shared SDL2::SDL2:

m.c.obj : error LNK2019: unresolved external symbol __imp___acrt_iob_func referenced in function printf
m.c.obj : error LNK2019: unresolved external symbol __imp___stdio_common_vfprintf referenced in function _vfprintf_l
MSVCRTD.lib(init.obj) : error LNK2019: unresolved external symbol _CrtDbgReport referenced in function _CRT_RTC_INIT
MSVCRTD.lib(init.obj) : error LNK2019: unresolved external symbol _CrtDbgReportW referenced in function _CRT_RTC_INITW
MSVCRTD.lib(error.obj) : error LNK2019: unresolved external symbol strcpy_s referenced in function "void __cdecl _RTC_StackFailure(void *,char const *)" (?_RTC_StackFailure@@YAXPEAXPEBD@Z)
MSVCRTD.lib(error.obj) : error LNK2019: unresolved external symbol strcat_s referenced in function "void __cdecl _RTC_StackFailure(void *,char const *)" (?_RTC_StackFailure@@YAXPEAXPEBD@Z)
MSVCRTD.lib(error.obj) : error LNK2019: unresolved external symbol __stdio_common_vsprintf_s referenced in function _vsprintf_s_l
MSVCRTD.lib(error.obj) : error LNK2001: unresolved external symbol __C_specific_handler_noexcept
MSVCRTD.lib(pdblkup.obj) : error LNK2019: unresolved external symbol _wmakepath_s referenced in function "int __cdecl GetPdbDllPathFromFilePath(wchar_t const *,wchar_t *,unsigned __int64)" (?GetPdbDllPathFromFilePath@@YAHPEB_WPEA_W_K@Z)
MSVCRTD.lib(pdblkup.obj) : error LNK2019: unresolved external symbol _wsplitpath_s referenced in function "int __cdecl GetPdbDllPathFromFilePath(wchar_t const *,wchar_t *,unsigned __int64)" (?GetPdbDllPathFromFilePath@@YAHPEB_WPEA_W_K@Z)
MSVCRTD.lib(pdblkup.obj) : error LNK2019: unresolved external symbol wcscpy_s referenced in function "int __cdecl GetPdbDllPathFromFilePath(wchar_t const *,wchar_t *,unsigned __int64)" (?GetPdbDllPathFromFilePath@@YAHPEB_WPEA_W_K@Z)
MSVCRTD.lib(pdblkup.obj) : error LNK2019: unresolved external symbol __vcrt_GetModuleFileNameW referenced in function "struct HINSTANCE__ * __cdecl GetPdbDll(void)" (?GetPdbDll@@YAPEAUHINSTANCE__@@XZ)
MSVCRTD.lib(pdblkup.obj) : error LNK2019: unresolved external symbol __vcrt_GetModuleHandleW referenced in function "struct HINSTANCE__ * __cdecl GetPdbDll(void)" (?GetPdbDll@@YAPEAUHINSTANCE__@@XZ)
MSVCRTD.lib(pdblkup.obj) : error LNK2019: unresolved external symbol __vcrt_LoadLibraryExW referenced in function "struct HINSTANCE__ * __cdecl GetPdbDll(void)" (?GetPdbDll@@YAPEAUHINSTANCE__@@XZ)
2023-07-05 00:15:46 +02:00
scribam
e42a3a3233 cmake: use SDL_CPU_ARM32 instead of CMAKE_GENERATOR_PLATFORM STREQUAL "ARM" 2023-07-01 23:26:19 +02:00
Sam Lantinga
ceece918e4 Updated to version 2.29.0 for development 2023-06-20 11:50:19 -07:00
Sam Lantinga
ffa78e6bea Updated to version 2.28.0 for release 2023-06-20 11:00:20 -07:00
Sam Lantinga
d4f9be4416 Updated to version 2.27.1 for release candidate 2023-06-13 19:44:26 -07:00
Anonymous Maarten
14f4fd3f11 git commit -m "cmake: set maximum policy to 3.5
This fixes the following warning when configuring with CMake 3.27+:
```
CMake Deprecation Warning at CMakeLists.txt:3190 (cmake_minimum_required):
Compatibility with CMake < 3.5 will be removed from a future version of
CMake.

Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
```
2023-06-07 20:35:32 +02:00
Anonymous Maarten
72606d97e6 cmake: allow #include "SDL2/SDL.h.h" when using SDL2 as subproject 2023-05-27 01:48:30 +02:00
Sam Lantinga
63b8af3558 Disable unused local typedefs warning
This triggers on gcc 4.8.4 for compile time asserts inside of functions

Fixes https://github.com/libsdl-org/SDL/issues/7732

Co-authored-by: Ozkan Sezer <sezeroz@gmail.com>
2023-05-24 04:45:40 +03:00
Anonymous Maarten
cd64e0b6e3 SDL_blit_copy: Don't call potentially FPU using SDL_memcpy in SDL_memcpyMMX 2023-03-27 06:13:28 +00:00
Anonymous Maarten
51c10bef0b 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:13:28 +00:00
Anonymous Maarten
5e5b029d6c cmake: add /Q_no-use-libirc flag when building a no-libc library
The new Intel LLVM library needs this because when building SDL2
in release mode.
2023-03-27 06:13:28 +00:00
Anonymous Maarten
e5ebbdafd4 cmake: add support for building with Intel C compiler 2023-03-27 06:13:28 +00:00
Anonymous Maarten
984af1a725 cmake: new LLVM based Intel compiler does not recognize MSVC's /MP 2023-03-27 06:13:28 +00:00
Anonymous Maarten
1158cff9ea 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:13:28 +00:00
Anonymous Maarten
ce4c54e2b2 cmake: get_filename_component(EXT) retturns extension including leading dot 2023-03-15 14:55:56 +01:00
Anonymous Maarten
6c495a92f0 cmake: use compatible interface properties to disallow linking to a different version of SDL 2023-03-03 23:41:18 +01:00
Ozkan Sezer
22df572979 look for clock_gettime() in libc first, then in librt if not found. 2023-02-13 22:28:02 +03:00
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 50af65a7ddf65fd685dc0e2658016f950360c473)
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 e2060de714481ed58b6a2e781f7439090003a7b4)
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