Aaron Barany
3f19e36d12
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
2022-08-08 08:31:40 -07:00
Anonymous Maarten
17b329d199
cmake: enable disabing hidapi
2022-08-05 13:06:51 -07:00
Anonymous Maarten
a4e6f3ca9d
cmake: when there are alternatives, don't use libusb by default
2022-08-05 13:06:51 -07:00
Francisco Javier Trujillo Mata
4564e89825
put files at the same line
2022-08-02 11:40:31 -07:00
Daniel Santos
147a71b976
Finish dummy driver
2022-08-02 11:40:31 -07:00
Daniel Santos
2660449c6c
Add dummy driver
2022-08-02 11:40:31 -07:00
Daniel Santos
a81aa99298
Add prim video support
2022-08-02 11:40:31 -07:00
Francisco Javier Trujillo Mata
46f95a7a5f
Create dummy PS2 Video driver
2022-08-02 11:40:31 -07:00
Sam Lantinga
954bbdf3ae
Allow emscripten platform to build without threads
2022-08-01 09:51:21 -07:00
Sam Lantinga
e4cc076a79
Threads are used by many SDL subsystems and may not be disabled.
...
Fixes https://github.com/libsdl-org/SDL/issues/5095
2022-08-01 09:17:05 -07:00
Anonymous Maarten
83f5bbdf25
cmake: define SDL_STATIC_LIB for static SDL2 library
2022-07-29 15:05:19 +02:00
Anonymous Maarten
bdd1d035b7
cmake: Don't add /NODEFAULTLIB to link flags when building SDL-static
2022-07-29 15:05:19 +02:00
Anonymous Maarten
02c8747176
math.h does not always provide M_PI
...
This fixes the following error when building with SDL_LIBC:
SDL\test\testautomation_math.c(1965): error C2065: 'M_PI': undeclared identifier
2022-07-27 09:10:18 -07:00
Anonymous Maarten
5da85376b9
stdlib: move all mslibc functions to SDL_mslibc.c
...
This allows disabling LTO on them by only specifying a single file.
2022-07-27 09:07:56 -07:00
Anonymous Maarten
5c70e45c53
cmake: don't use result of 'find_library' for Android libraries
2022-07-26 14:24:36 -07:00
Anonymous Maarten
4690689a4c
cmake: on Apple, don't use find_library for frameworks + use EXTRA_LDFLAGS
2022-07-26 14:24:36 -07:00
Anonymous Maarten
fc2497b109
Revert "cmake: don't add -mwindows to link flags in sdl2.pc"
...
This reverts commit d211aaddc1
.
2022-07-23 18:05:35 +02:00
Anonymous Maarten
d211aaddc1
cmake: don't add -mwindows to link flags in sdl2.pc
2022-07-23 15:29:39 +02:00
Anonymous Maarten
d63a699e01
cmake: by default, disable install target when building SDL as a subproject
2022-07-23 15:29:13 +02:00
Ivan Epifanov
0a1641635d
VIta: enable arm neon/simd optimisations
2022-07-21 10:45:45 -07:00
Anonymous Maarten
8f33de8462
cmake: set CMP0054 policy to NEW
2022-07-21 14:08:23 +02:00
Francisco Javier Trujillo Mata
e4a8087551
Initial Audio driver
2022-06-27 15:18:48 -07:00
Francisco Javier Trujillo Mata
7fd46ec581
Initial PS2_Joystick implementation
2022-06-27 00:32:43 -07:00
Francisco Javier Trujillo Mata
84d69da4e1
Initial SDL_ps2_main implementation
2022-06-27 00:32:43 -07:00
Anonymous Maarten
fa39f73552
cmake: add generated files to a custom target ( #5851 )
...
This way, headers are only generated once .
2022-06-26 23:34:30 +02:00
Anonymous Maarten
76f40e2b3b
cmake: remove stray debug line
2022-06-24 19:12:39 +02:00
Anonymous Maarten
ca30936314
cmake: check and use clock_gettime by default on android
2022-06-24 19:12:15 +02:00
hsdk123
bd49696133
cmake: use CMAKE_CURRENT_BINARY_DIR instead of CMAKE_BINARY_DIR ( #5834 )
...
* Update install directory to match generated
https://github.com/libsdl-org/SDL/blob/main/CMakeLists.txt#L3122
Sets `SDL2Config.cmake` to `CMAKE_BINARY_DIR`, whereas the install file tries to find it from a different location.
* cmake: use CMAKE_CURRENT_BINARY_DIR instead of CMAKE_BINARY_DIR
* ci: test SDL included as a cmake subproject
Co-authored-by: Anonymous Maarten <anonymous.maarten@gmail.com>
2022-06-23 14:18:44 +02:00
Anonymous Maarten
78a3751659
cmake+ci: fix+test sdl2-config + sdl2.pc for all supported platforms
2022-06-23 14:17:38 +02:00
Anonymous Maarten
c61367c273
cmake: do list(APPEND SDLMAIN_SOURCES)
2022-06-23 14:17:38 +02:00
Anonymous Maarten
3617691fe0
cmake: install Android.mk files for ndk-build
...
This allows including SDL2 with ndk-build using
NDK_MODULE_PATH + import-module
An install tree looks like:
```
`-- share
|-- aclocal
| `-- sdl2.m4
|-- licenses
| `-- SDL2
| `-- LICENSE.txt
`-- ndk-modules
|-- SDL2
| `-- Android.mk
|-- SDL2-static
| `-- Android.mk
|-- SDL2main
| `-- Android.mk
`-- SDL2test
`-- Android.mk
```
The generated `/share/ndk-modules/SDL2/Android.mk` contains:
```
LOCAL_PATH := $(call my-dir)
_IMPORT_PREFIX := $(LOCAL_PATH)/../../..
include $(CLEAR_VARS)
LOCAL_MODULE := SDL2
LOCAL_SRC_FILES := $(_IMPORT_PREFIX)/lib/libSDL2.so
LOCAL_CPP_FEATURES := rtti exceptions
LOCAL_EXPORT_C_INCLUDES := ${_IMPORT_PREFIX}/include\
${_IMPORT_PREFIX}/include/SDL2
include $(PREBUILT_SHARED_LIBRARY)`
```
2022-06-23 14:17:38 +02:00
Anonymous Maarten
b3159714db
cmake: set HAVE_STATIC_PIC for correct summary
2022-06-23 14:17:38 +02:00
Anonymous Maarten
de409d2a81
cmake: remove spurious UNIX_SYS in dep_option
2022-06-23 14:17:38 +02:00
Anonymous Maarten
2f321fb73c
cmake: disable UNIX_SYS by default for Android
...
This force disables SDL_OSS, SDL_ALSA, SDL_JACK, SDL_ESD,
SDL_PIPEWIRE, SDL_ARTS, SDL_NAS, SDL_SNDIO, SDL_LIBSAMPLERATE,
SDL_RPATH, SDL_CLOCK_GETTIME and SDL_X11.
2022-06-23 14:17:38 +02:00
Anonymous Maarten
5f4e9fb9b3
cmake: use add_custom_command to copy include files
...
Otherwise, the make program would not rebuild when a header got changed
2022-06-22 17:04:58 +02:00
Anonymous Maarten
485b1037b0
cmake: copy all headers to the build directory and exclusively use that
2022-06-22 17:04:58 +02:00
Anonymous Maarten
3e1021239a
cmake: also add the recently-added include folder to the public interface
2022-06-22 17:04:58 +02:00
Anonymous Maarten
4ad4fe67c7
cmake: install generated SDL_config.h
...
The generated SDL_config.h recently changed location, so update the install.
2022-06-22 17:04:58 +02:00
Anonymous Maarten
d460000b45
cmake: use add_definitions for compatibility with cmake 3.0
2022-06-20 19:29:13 +02:00
Ozkan Sezer
bdcdbfc757
Enable D3D12 detection when using mingw-w64 with cmake too
...
c.f.: autotools commit 59fb7acbf7
2022-06-19 11:04:24 +03:00
Ozkan Sezer
a8d41b3b45
check for shellscalingapi.h presence instead of WINVER >= 0x0603
2022-06-18 13:00:44 -07:00
Anonymous Maarten
b19099d557
cmake: use find_package(SampleRate) to find samplerate + allow targets
2022-06-16 16:47:19 -07:00
Sam Lantinga
b004133f08
Updated to version 2.23.1 for pre-release checkpoint
2022-06-16 12:50:19 -07:00
Francisco Javier Trujillo Mata
fc78d0ff39
Fix Compilation CI
2022-06-16 02:04:32 +03:00
Francisco Javier Trujillo Mata
6b03c1adf6
Add filesystem driver
2022-06-15 15:15:26 -07:00
Francisco Javier Trujillo Mata
52f00833b0
Add Thread drivers
2022-06-15 15:15:26 -07:00
Francisco Javier Trujillo Mata
217d3a6dab
Add systimer support
2022-06-15 15:15:26 -07:00
Francisco Javier Trujillo Mata
580416d3c8
Initial CMake configuration
2022-06-15 15:15:26 -07:00
Alex Richardson
cd8f57ee4e
cmake: freebsd: Don't REQUIRE libunwind.pc on FreeBSD
...
FreeBSD includes the libunwind APIs in in the base system libgcc_s and
does not install a .pc file for it.
This change fixes the build on FreeBSD for me.
2022-06-15 14:18:27 -07:00
Anonymous Maarten
ae7446a959
stlib: Extract SDL_memcpy and SDL_memset to its own file respectively
...
This is done such that we can disable LTO for these 2 functions when
building with MSVC.
This is due to a limitation of Link Time Code Generation (LTCG).
Code generation might generate a new reference to memset after linking
has started. The LTCG must make assumptions about where memset is
defined which is normally the C runtime.
2022-06-15 14:17:35 -07:00