Commit graph

342 commits

Author SHA1 Message Date
pionere 3dba2a73f1 fix HAVE_SDL_AUDIO flag of CMakeLists.txt II. 2022-01-28 20:40:19 -05:00
pionere 3936af99d8 fix HAVE_SDL_AUDIO flag of CMakeLists.txt 2022-01-28 20:40:19 -05:00
pionere 21510387cf fix CMakeLists.txt vs. configure inconsistencies
- atomic subsystem is disabled by default (changed in configure)
- SDL_WAYLAND_LIBDECOR is disabled by default if SDL_WAYLAND is not set (changed in CMakeLists.txt)
2022-01-28 20:40:19 -05:00
pionere 11cdde01f3 fix MacOS build with disabled SDL_SENSOR
+ get rid of the double-check (SDL_HAPTIC depends on SDL_JOYSTICK)
2022-01-28 20:40:19 -05:00
pionere 176941a4fb allow MacOS build without SDL_FILE 2022-01-28 20:40:19 -05:00
pionere eb80f2c65a sync handling of subsystems II. 2022-01-28 20:40:19 -05:00
pionere 65e9415b98 sync handling of subsystems
- add DUMMY-define in case the subsystem is enabled but not available (filesystem/misc/locale)
- add missing PSP/VITA-filesystem defines
- sync the order of filesystems in SDL_config.h.cmake/in
- add option to disable locale subsystem in configure
2022-01-28 20:40:19 -05:00
pionere 118de86202 more conform vulkan/metal configuration 2022-01-28 20:40:19 -05:00
pionere 606d2ea87f bugfix for "add 'Misc' subsystem" 2022-01-28 20:40:19 -05:00
pionere 998117b3ff add 'Misc' subsystem 2022-01-28 20:40:19 -05:00
Eric Wasylishen 71e06a536a cmake: fix Metal detection
Confirmed to work on:
macOS 10.15.7
XCode Version 12.4 (12D4e)
2022-01-26 12:33:16 -05:00
Charlie Birks 15ebad6e7d emscripten: Implement SDL_OpenURL 2022-01-22 13:31:11 +00:00
Sam Lantinga a0e3c884d4 Updated to version 2.0.21 for development 2022-01-17 15:32:27 -08:00
Ozkan Sezer a575e2cf5e Enable alloca on mingw/cygwin builds:
This effectively reverts commit 391d73e37b26614e2e343ca8e9d4334e07380896
Fixes https://github.com/libsdl-org/SDL/issues/5234
2022-01-17 20:56:24 +03:00
Ozkan Sezer 407d4e470a cmake: simplify after the previous os/2 commit. 2022-01-12 20:32:00 +03:00
Ozkan Sezer f199f832e9 cmake: added target_properties for os/2. 2022-01-12 20:22:28 +03:00
ulatekh bb9ebad74b Optionally disable generation of SDL2main and uninstall projects.
Mostly meant to allow SDL2 to be incorporated as a sub-project of
external CMake projects.
2022-01-11 15:56:37 -08:00
Khem Raj fcf0e524bb cmake: Remove libunwind-generic as hard dependency
when using alternate unwind implementations like LLVM libunwind
this library is not provided yet the libunwind features are fully
implemented in main libunwind, making this hard dependency assumes
a particular libunwind implementation, this patch makes it optional
which makes the builds to work with llvm libunwind

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-01-11 11:00:20 -08:00
Ozkan Sezer b265677610 cmake: initial attempt at adding os/2 support. 2022-01-11 11:33:02 +03:00
Neal Gompa 0696fc0134 cmake: Split SDL2-static and SDL2main into their own target exports
This makes it so that the generated targets are not interdependent,
which allows Linux distributions to split libraries into the
appropriate subpackages as needed.
2022-01-08 09:50:14 -08:00
Sam Lantinga 9294634840 Updated to version 2.0.20 for release 2022-01-07 18:29:40 -08:00
Ozkan Sezer 75ac944b9c check for tpcshrd.h and define HAVE_TPCSHRD_H if it's available. 2022-01-06 22:24:00 +03:00
ulatekh 3ea82eaaff Under MSVC, build project-sources in parallel. 2022-01-04 15:24:31 -08:00
Wouter Wijsman cd1f24a998 Add forgotten psppower library to link 2022-01-03 10:39:15 -08:00
Francisco Javier Trujillo Mata 13a9cd4797 Adding sysfilesystem driver to PSP 2022-01-02 08:06:04 -08:00
Cameron Gutman 83583dc49d cmake: Fix WGI detection with older SDKs 2021-12-19 15:07:37 -06:00
Sam Lantinga 881feca1f2 CMAKE: fixed cflags check for build type
Martin Gerhardy wrote:

If there is a variable named test, then cmake does variable-value comparison:
if (test STREQUAL "")
is equivalent to:
if ("${test}" STREQUAL "")

If there is no variable named test, then cmake does string literal comparison:
if (test STREQUAL "")
is equivalent to:
if ("test" STREQUAL "")

That means basically - the current stuff works - but is not how it should be done.

Fixes https://github.com/libsdl-org/SDL/issues/2100
2021-12-17 19:14:34 -08:00
Ivan Epifanov 60c3ca49b4 Vita: disable arm asm blitters and add missing pvr dep 2021-12-15 01:32:56 +03:00
Ozkan Sezer 493d45f00f minor tidy-up in cmake script. 2021-12-07 14:24:32 +03:00
Wouter Wijsman 897c7cfa8b Make sure SDL_VIDEO_RENDER_PSP is set 2021-12-07 14:03:00 +03:00
Wouter Wijsman 21fd0047e3 Initial for building PSP version with CMake 2021-12-07 14:03:00 +03:00
Anders Jenbo d68b429cfb [ios] Fix failing to link iconv when build using CMake 2021-12-03 04:30:53 -08:00
Sam Lantinga 5fc901d4f3 Updated to version 2.0.19 for development 2021-11-30 09:58:21 -08:00
Ozkan Sezer 5a0ea7fb17 Check for O_CLOEXEC definition in fcntl.h at configuration time,
If not available, define it internally as 0 (in SDL_internal.h).
Define it as available for macOS >= 10.7 in SDL_config_macosx.h.
2021-11-27 19:23:10 +03:00
Ozkan Sezer cb2f3bedf5 tidy-up a comment in cmake script 2021-11-26 21:20:50 +03:00
Ozkan Sezer 22e59cd106 CMakeLists.txt: update DYLIB_CURRENT_VERSION too 2.0.18 for release 2021-11-26 19:15:28 +03:00
Sam Lantinga 7242075b2b Updated version to 2.0.18 for release 2021-11-26 08:12:45 -08:00
Cameron Gutman 2fa35757a9 cmake: Weak link to GameController.framework to handle older OSes 2021-11-25 16:01:56 +03:00
Cameron Gutman bc409163a8 cmake: Detect SDL_JOYSTICK_MFI for macOS 2021-11-25 16:01:56 +03:00
Ozkan Sezer d9f70878f9 don't use CMAKE_COMPILER_IS_MINGW
Fixes https://github.com/libsdl-org/SDL/issues/5002
2021-11-24 18:10:00 +03:00
Ozkan Sezer b7f9c2089a cmake: handle warning flags properly (thanks to hgs3 for pointers.)
fixes https://github.com/libsdl-org/SDL/issues/4983
2021-11-23 18:56:50 +03:00
Ozkan Sezer f8900583e5 removed windows winmm joystick driver 2021-11-23 17:04:40 +03:00
Ozkan Sezer 35b7ce1893 cmake: final report fixes for mmx, ssemath, dummyvideo, wasapi, xinput.
also moved CoreVideo framework out of if(SDL_FILE) block, and removed a
now-irrelevant mingw related fixme.
2021-11-22 14:10:02 +03:00
hgs3 6b66542e7b Fixing compilation errors for VS2019 Clang toolset (fixes #4702) 2021-11-18 03:28:00 +03:00
Cameron Gutman 43d1b42a5a cmake: Sync build config options with autotools
- SDL_CLOCK_GETTIME now defaults to ON to match autotools build
- Add detection of float.h and Xdbe
- Fix detection of pthread_setname_np() (requires _GNU_SOURCE)
- Move SDL_USE_IME definition into SDL_config.h.cmake
2021-11-16 16:51:38 -08:00
Sam Lantinga a0f8afb599 Separated the HIDAPI subsystem from HIDAPI joysticks
You can now disable HIDAPI joysticks while retaining the HIDAPI SDL API
2021-11-11 09:16:44 -08:00
Ryan C. Gordon 8f63e9ff68
cmake: use generated SDL_config.h to build SDLmain static lib
Thanks to @toazz for the patch!

Fixes #4829.
2021-11-09 11:13:52 -05:00
Ryan C. Gordon 3a82e432f0
cmake: Moved back to requiring merely CMake 3.0.0.
This means it now works with any CMake released since 2014 instead of 2018.

This was mostly just readding some special cases, and requiring 3.11.0 only
for Windows Stores apps, which isn't unreasonable. The biggest concern is
a Linux distribution not having a recent CMake; most other places will be
manually downloading and installing their own CMake.

Fixes #4930.
2021-11-09 11:06:33 -05:00
Ethan Lee 4b42c05ba1 video: Add SDL_SetWindowMouseRect.
This API and implementation comes from the Unreal Engine branch of SDL, which
originally called this "SDL_ConfineCursor".

Some minor cleanup and changes for consistency with the rest of SDL_video, but
there are two major changes:

1. The coordinate system has been changed so that `rect` is _window_ relative
   and not _screen_ relative, making it easier to implement without having
   global access to the display.
2. The UE version unset all rects when passing `NULL` as a parameter for
   `window`, this has been removed as it was an unused feature anyhow.

Currently this is only implemented for X, but can be supported on Wayland and
Windows at minimum too.
2021-11-08 14:16:54 -08:00
Ozkan Sezer 2636d839e3 cmake: add hidapi to 'SDL_SUBSYSTEMS' 2021-11-08 22:25:32 +03:00