CMakeLists.txt


Log

Author Commit Date CI Message
Christopher Wellons 078e817c 2023-07-09T20:05:32 Unaligned stacks on i686-w64-mingw32, may lead to crashes (#7607) Co-authored-by: Ozkan Sezer <sezeroz@gmail.com>(cherry picked from commit 8231278817faabdff4a232770f798684bd2e12df)
Joshua Barnett 3f46546f 2023-07-09T00:12:32 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 https://github.com/llvm-mirror/llvm/blob/d35e5f8dded4c884ca25ca88f184e1505cad106c/cmake/platforms/WinMsvc.cmake#L317-L321
Anonymous Maarten 26335407 2023-07-05T00:15:46 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)
scribam 0352301e 2023-07-01T22:30:31 cmake: use SDL_CPU_ARM32 instead of CMAKE_GENERATOR_PLATFORM STREQUAL "ARM"
Sam Lantinga 4761467b 2023-07-01T09:56:20 Updated to version 2.28.1 for release
Sam Lantinga ffa78e6b 2023-06-20T11:00:20 Updated to version 2.28.0 for release
Sam Lantinga d4f9be44 2023-06-13T19:44:26 Updated to version 2.27.1 for release candidate
Anonymous Maarten 14f4fd3f 2023-06-07T20:35:15 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. ```
Anonymous Maarten 72606d97 2023-05-25T15:56:35 cmake: allow #include "SDL2/SDL.h.h" when using SDL2 as subproject
Sam Lantinga 63b8af35 2023-05-23T17:23:30 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>
Anonymous Maarten cd64e0b6 2023-03-26T16:31:18 SDL_blit_copy: Don't call potentially FPU using SDL_memcpy in SDL_memcpyMMX
Anonymous Maarten 51c10bef 2023-03-23T06:56:44 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)
Anonymous Maarten 5e5b029d 2023-03-23T06:08:25 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.
Anonymous Maarten e5ebbdaf 2023-03-23T05:22:32 cmake: add support for building with Intel C compiler
Anonymous Maarten 984af1a7 2023-03-23T01:45:48 cmake: new LLVM based Intel compiler does not recognize MSVC's /MP
Anonymous Maarten 1158cff9 2023-03-23T04:38:47 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.
Anonymous Maarten ce4c54e2 2023-03-15T14:55:56 cmake: get_filename_component(EXT) retturns extension including leading dot
Anonymous Maarten 6c495a92 2023-03-01T04:33:43 cmake: use compatible interface properties to disallow linking to a different version of SDL
Ozkan Sezer 22df5729 2023-02-13T21:50:40 look for clock_gettime() in libc first, then in librt if not found.
Anonymous Maarten e927e5d4 2023-01-24T04:52:44 vita: add missing static libraries for using gles with pib
Anonymous Maarten a8a5bd3d 2023-01-23T20:41:00 cmake: allow disabling OpenGL support when building with GLES using PSP2-PVR
Anonymous Maarten c0445c23 2023-01-23T05:08:59 vita: PVR needs to link to sceIme_stub library
Anonymous Maarten f51f7fbb 2023-01-15T15:57:56 n3ds: fix exported libraries of n3ds
yuanhecai 0b0d256a 2023-01-09T15:52:07 Fix loongarch64 support HAS_LSX/LASX is modified as HAVE_LSX/LASX. (cherry picked from commit 50af65a7ddf65fd685dc0e2658016f950360c473)
Anonymous Maarten 460b7b24 2023-01-08T19:12:11 cmake: do all compile tests with -D_GNU_SOURCE=1
Ozkan Sezer 0d5467a6 2023-01-07T14:25:04 cmake: check for math library functions even in the absence of libm (Reference issue: https://github.com/libsdl-org/SDL/issues/7011)
Ozkan Sezer 305e7b55 2023-01-07T14:25:04 cmake: fix detection of library functions when -Werror is enabled. (Reference issue: https://github.com/libsdl-org/SDL/issues/7011)
nfarid b79732b9 2022-12-11T22:23:45 cmake: use FindALSA.cmake to find ALSA library
Anonymous Maarten 5df10660 2022-11-29T17:48:45 cmake: move platform detection to cmake/sdl/paltform.cmake for re-use by SDL2-compat
Anonymous Maarten 84039e25 2022-11-29T17:47:30 cmake: use target_link_libraries to pass -Wl,--undefined=WinMain (cherry-picked from commit e2060de714481ed58b6a2e781f7439090003a7b4)
Anonymous Maarten dcd12523 2022-11-25T02:18:16 cmake: test for lsx and lasx intrinsics for loongarch
Anonymous Maarten edb75bc2 2022-11-25T01:27:44 cmake: make all assembly options depend on SDL_ASSEMBLY and architecture
Anonymous Maarten 660cec69 2022-11-25T02:57:00 cmake: find libudev library so it gets priority
Anonymous Maarten a2611edc 2022-11-25T02:39:50 cmake: add support for some BSD's wscons input
Sam Lantinga ea8f8b6d 2022-11-21T16:36:10 Updated to version 2.27.0 for development
Sam Lantinga 0bfeed06 2022-11-21T16:15:58 Updated to version 2.26.0 for release
Sam Lantinga 8ae46a49 2022-11-21T06:57:02 Save the version in VERSION.txt instead of VERSION Fixes https://github.com/libsdl-org/SDL/issues/6558
Sam Lantinga 802c624a 2022-11-20T14:37:05 Strip trailing newline when reading the VERSION file
Ozkan Sezer 3bc4bad8 2022-11-20T23:50:10 add missing strcasestr checks to cmake and autotools build systems, and update config files.
Sam Lantinga 78ea6af2 2022-11-17T09:01:35 Updated to version 2.25.1 for release candidate
Anonymous Maarten 819b0143 2022-11-01T10:42:57 cmake: enable SDL_TEST by default for emscripten
Anonymous Maarten 55384db8 2022-11-01T13:09:29 cmake: emscripten has libunwind.h, libunwind.a has missing symbols
Anonymous Maarten 6e46090a 2022-11-01T13:08:38 cmake: check ALL headers inside the look (including sys/types.h)
Anonymous Maarten 500bac0b 2022-11-01T13:06:39 cmake: include FIndPkgConfig.cmake through find_package
Pierre Wendling a71ad40a 2022-11-15T13:04:22 CMake: Add option to use Ccache.
Sam Lantinga 9f8b68a2 2022-11-11T10:24:17 Fixed building without linux/input.h https://github.com/libsdl-org/SDL/issues/6169
Anonymous Maarten 61297f70 2022-10-29T03:20:30 cmake: on Apple, check for presence of an OBJC compiler
Luca Lolli b50e4293 2022-09-07T12:21:56 Fix compilation for .m files extension
Anonymous Maarten 4c704ecf 2022-11-01T16:33:21 cmake: use SDL2-static as static library output name when prefix/static == ""/".lib" Apparently, some clang@Windows compilers do this.
Anonymous Maarten c3b13346 2022-10-21T18:32:53 On x86, pass -nodefaultlib to linker when wanting to avoid the C library
Simon McVittie 4ca5ea5b 2022-10-20T20:02:21 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>
Simon McVittie 2dc788cb 2022-10-20T19:54:24 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>
Anonymous Maarten 5ed091c1 2022-10-21T15:32:05 cmake: fix reporting of SDL_TESTS
Anonymous Maarten 96361fc4 2022-10-04T21:17:10 cmake: create and install sdl2.pc for MSVC & WATCOM
Anonymous Maarten d542f43b 2022-10-19T16:03:43 cmake: add SDL_INSTALL_CMAKEDIR cache variable to override location of cmake config files
Wouter Wijsman 428b5ae5 2022-10-18T10:34:51 PSP: Reorder extra imports
Pierre Wendling 392f3882 2022-09-20T22:45:24 N3DS: Use SDL_Sensor instead of Joystick sensors.
Pierre Wendling 27557b62 2022-09-20T19:53:45 N3DS: Prefix timer sources with `N3DS_`.
Pierre Wendling 65527537 2021-03-30T04:32:39 N3DS port (squashed) A dedicated renderer using Citro3D would likely allow for better much better graphical performances.
Aaron Barany 6ffc45b0 2022-10-09T17:22:31 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.
Anonymous Maarten 37beabd1 2022-10-06T02:16:07 SDL_mslib.c: clang-cl does not support `/GL-`
Anonymous Maarten 07225d2e 2022-10-06T00:55:37 cmake: fix check for -marm This fixes the following warning: clang: warning: argument unused during compilation: '-marm' [-Wunused-command-line-argument]
Anonymous Maarten 45da1339 2022-10-06T00:39:47 cmake: don't error on apple when using deprecated declarations
Anonymous Maarten 77822ed1 2022-10-05T15:14:08 cmake: add SDL_WERROR to conditionally enable/disable -Werror
Anonymous Maarten 1064fdee 2022-10-06T05:04:51 cmake: append to COMPILE_FLAGS property
Ozkan Sezer fa7ffa4e 2022-10-06T03:37:50 change the iconv configuration option names to be more verbose.
Ozkan Sezer 294ccba0 2022-10-05T23:56:56 better wording for --enable-iconv description
Anonymous Maarten c9f60cce 2022-10-05T17:12:08 cmake+autotools: add option to enable/disable iconv
Anonymous Maarten d0657fde 2022-10-05T02:15:22 cmake: Use DWARF 4 debug information when building using mingw See f18fae4c689a68bd50ce34d6b9c1f014c2f220a2
Anonymous Maarten 70214ed3 2022-06-17T02:58:45 cmake: append to CMAKE_MODULE_PATH instead of overwriting
Anonymous Maarten a193a03d 2022-09-27T17:33:49 cmake: add -Wno-declaration-after-statement to cpu-features.c alone
Anonymous Maarten 2f9c9b5f 2022-09-27T02:30:43 cmake: make sure check_* uses 2 different variables for clock_gettime
Anonymous Maarten bfecd781 2022-09-27T01:08:04 cmake: use check_symbol_exists to check dlopen + need for dl library
Ozkan Sezer f6c9b065 2022-09-23T23:56:04 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
Anonymous Maarten 3b20e0ec 2022-09-19T02:38:36 cmake: only add -Wl,--undefined=WinMain when building an executable
Ivan Epifanov 202dfea5 2022-09-17T14:12:13 Vita: drop memory defines
Ivan Epifanov 7115ceb7 2022-09-17T11:52:19 Vita: restore sceClibMemcmp
quyykk 37effc77 2022-09-15T19:39:35 Build the offscreen video driver by default.
Rinnegatamante eb0bf2c2 2022-09-12T21:52:39 vita: Drop memcmp redirect to sceClibMemcmp.
Ozkan Sezer 5b2884cb 2022-09-12T20:28:00 apply commit d0a3570300812bc81888e7a7eadb9311621dc9a7 to cmake side too.
Sam Lantinga 181265ba 2022-09-05T11:36:20 Removed unused variable
Sam Lantinga acf397b4 2022-09-05T11:21:13 Actually, DYLIB_COMPATIBILITY_VERSION shouldn't be updated for a stable point release @smcv
Cameron Cawley fd93f817 2022-09-04T17:50:29 Assume that stdint.h is available on Windows with compilers other than MSVC <= 2008
Sam Lantinga ef988fe1 2022-09-05T08:58:49 Only use CETCOMPAT on x86/x64 platforms Fixes https://github.com/libsdl-org/SDL/issues/6173
Sam Lantinga 4e98ba61 2022-09-05T08:28:06 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
Gleb Mazovetskiy 803924b2 2022-08-30T00:50:44 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).
Ludovico de Nittis e8cb4da7 2022-08-26T12:28:33 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>
Anonymous Maarten 32c4996c 2022-08-26T02:38:54 cmake: add SDL_IBUS option to enable/disable DBUS + test sys/inotify.h
Anonymous Maarten c8b56ee5 2022-08-26T02:37:57 cmake: add SDL_DBUS option to enable/disable DBUS
Anonymous Maarten 032ff640 2022-08-26T02:37:17 cmake: OpenIndiana announces SunOS, which is the former name of Solaris
Anonymous Maarten 711846c1 2022-08-26T01:56:20 cmake: fix build with SDL_WAYLAND_SHARED=OFF
Cameron Gutman 2ceea460 2022-08-21T14:15:06 cmake: Enable CET compatibility for x86/x64 targets using VS 16.7+
Sam Lantinga 6e9c14e5 2022-08-19T09:38:42 Updated to version 2.25.0 for development
Sam Lantinga 8c9beb0c 2022-08-19T08:44:09 Updated to version Updated to version 2.24.0 for release
Sam Lantinga f1416ef2 2022-08-12T20:27:22 Updated to version 2.23.2 for release candidate
Aaron Barany 3f19e36d 2022-08-07T20:55:27 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
Anonymous Maarten 17b329d1 2022-07-26T02:51:07 cmake: enable disabing hidapi
Anonymous Maarten a4e6f3ca 2022-07-26T02:41:43 cmake: when there are alternatives, don't use libusb by default
Francisco Javier Trujillo Mata 4564e898 2022-07-03T18:54:56 put files at the same line
Daniel Santos 147a71b9 2022-06-30T12:57:37 Finish dummy driver