Commit Graph

158 Commits (70a1bc69739016884a22abe6bf86f8a5deba29ef)

Author SHA1 Message Date
Brad Smith f37db957f8 Use -lpthread on OpenBSD 2022-10-21 16:53:26 -07:00
Anonymous Maarten 0823b5973a cmake: fix finding wayland-libdecor
It was broken in 11d53c84a7
2022-10-21 15:31:43 +02:00
Anonymous Maarten 11d53c84a7 cmake: use pkg-config's library dirs as hint for finding a shared library 2022-10-20 19:01:28 +02:00
Brad Smith f4e3af15a1 Simplify OSS test by removing OpenBSD specific location of the soundcard.h header
OpenBSD has long since stopped using OSS. Remove checking for OpenBSD specific header.
2022-10-17 07:18:47 -07:00
Brad Smith 5ec1cef6b5 Further fixes for the sndio CMake detection 2022-10-07 11:55:00 +03:00
Brad Smith f48823181b Use the pkg-config file when checking for sndio. 2022-10-06 19:09:10 -07:00
Anonymous Maarten 81d3266766 cmake: make sure check_* uses 2 different variables in CheckX11 2022-09-27 03:47:20 +03:00
Anonymous Maarten a9524ffa9d cmake: make sure check_c_source_compiles uses 2 different variables in CheckOSS 2022-09-27 03:47:20 +03:00
Anonymous Maarten bfecd78159 cmake: use check_symbol_exists to check dlopen + need for dl library 2022-09-27 03:47:20 +03:00
Anonymous Maarten 6dfd7a17e1 cmake: forward HAVE_LIBUSB to HAVE_HIDAPI_LIBUSB 2022-09-10 15:53:11 +02:00
Anonymous Maarten c3495ec6ea Fix value of SDL_HIDAPI_DISABLED 2022-09-10 14:11:19 +02:00
Anonymous Maarten 19b13aab98 cmake: mark hidapi as disabled when not found 2022-09-10 13:41:29 +02:00
Sam Lantinga 3f89d1704d Fixed building with libusb not dynamicaly loaded 2022-09-01 11:30:02 -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
Anonymous Maarten e5698d1394 cmake: allow cmake re-configuration after installation of x11 library
check_include_path is not meant to be used to check for presence of a
library. This is because a BOOL is cached.
Avoid this caching by using find_file.
`find_file` caches a patch instead of a bool and will always run when
the result failed.
2022-07-21 18:38:12 +02:00
Anonymous Maarten 9ad3711a6b cmake: only enable x11_xss/x11_xrandr/x11_xfixes when its lib is available 2022-07-21 15:19:19 +02:00
Anonymous Maarten aa7a6c0ea6 cmake: only enable x11_xcursor and x11_xinput when its library is available 2022-07-21 14:38:57 +02: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 6dcb2868b0 cmake: avoid use of possible non-available XEXT_LIB 2022-06-23 14:17:38 +02:00
Anonymous Maarten b19099d557 cmake: use find_package(SampleRate) to find samplerate + allow targets 2022-06-16 16:47:19 -07:00
Anonymous Maarten 18206446bf cmake: collect SDL_LIBS as list + export PKG_DIRECTFB_LDFLAGS 2022-06-15 11:11:49 -07:00
Anonymous Maarten 32df5aeb3d Check result of FindLibraryAndSONAME before use 2022-06-15 05:33:40 +03:00
Anonymous Maarten afc350eeff cmake: do 's#set(SOURCE_FILES #list(APPEND SOURCE_FILES #g' 2022-06-15 05:33:40 +03:00
Anonymous Maarten e99a7144ff Use list(APPEND EXTRA_LIBS) everywhere 2022-06-13 10:05:30 -07:00
ShuangLiu1992 f4fc4719a5 fix CheckCOCOA on modern CMake
Modern CMake doesn't need "LANGUAGE C" for Objective-C
set_source_files_properties(${COCOA_SOURCES} PROPERTIES LANGUAGE C) should be removed fro video/cocoa/*.m as well otherwise project won't compile
see also d3cc5764c0
2022-05-21 09:53:50 -07:00
Ryan C. Gordon 7d7ec9c951
x11: Remove XVidMode and Xinerama support.
Fixes #1782.
2022-04-26 23:17:13 -04:00
Ethan Lee 13337e17a5 wayland: The rest of the wayland-client 1.18 requirement... Git, please 2022-03-23 13:27:01 -04:00
Joao Paulo Magalhaes 57df1dfce6 Video: do not use hardcoded VIVANTE and VDK libraries 2022-03-23 08:49:29 -07:00
Ozkan Sezer 61a93d3c46 minor whitespace cleanup. 2022-03-15 23:10:02 +03:00
Ryan C. Gordon 3ab739afff
cmake: Make test code use proper C main functions.
Fixes #5021.
2022-03-13 12:10:52 -04:00
Nick Cao f03215bc70 fix linking with SDL_PULSEAUDIO_SHARED=OFF and SDL_X11_SHARED=OFF 2022-03-07 12:55:50 +03:00
Luke Street 0cb39ed468 cmake: Fix SDL_LIBUSB_DYNAMIC soname 2022-02-07 14:22:31 -05:00
Max Krummenacher c3a7cc34fb cmake: sdlchecks.cmake: pass cflags to the appropriate cmake variable
If egl.pc sets at least two macros as the i.MX Vivante driver does, e.g.:
| Cflags: -I${includedir} -DLINUX -DWL_EGL_PLATFORM

then we get the following error during configuration:

| -- Performing Test HAVE_OPENGL_EGL
| CMake Error: Parse error in command line argument: WL_EGL_PLATFORM
|  Should be: VAR:type=value

If one changes to add a value to the macro, e.g.
| Cflags: -I${includedir} -DLINUX=1 -DWL_EGL_PLATFORM=1
then cmake does not error out but the macro is not passed to the
C compiler.

CMAKE_REQUIRED_FLAGS is the wrong variable to pass the CFLAGS in,
CMAKE_REQUIRED_DEFINITIONS should be used.

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2022-01-11 09:00:37 -08:00
Ozkan Sezer b265677610 cmake: initial attempt at adding os/2 support. 2022-01-11 11:33:02 +03:00
Ryan C. Gordon 7967c97618
cmake: Do a more thorough test for the old bcm Raspberry Pi libraries.
Fixes #5132.
2022-01-05 21:02:38 -05:00
Ozkan Sezer 398c0fdff0 cmake: simplify wayland-scanner 1.15 detection. 2021-12-18 23:56:10 +03:00
Wohlstand 54d2451069 sdlchecks.cmake: Small tune by @sezero 2021-12-18 20:32:20 +03:00
Wohlstand 6c9907dd0e Fixed build on CMake older than 3.7
I found this accidentally when I tried to use CMake 3.0 to build this.
2021-12-18 06:28:22 -08:00
Ozkan Sezer 03019c912a autotools, cmake: tighten Xfixes check && explicitly test BarrierEventID
Apparently the older versions of libXi doesn't have it.  Fixes the build
break issue reported at:
4b42c05ba1 (commitcomment-61427659)
2021-12-06 20:37:52 +03: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
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
Ozkan Sezer 7d3045f273 minor whitespace tidy-up. 2021-11-16 23:51:40 +03:00
Ozkan Sezer 68ffd24c58 autotools, cmake: don't define SDL_JOYSTICK_HIDAPI in CheckHIDAPI() 2021-11-16 23:37:20 +03:00
Sam Lantinga bbac1e9add Don't include pthreads code when threads are disabled
Fixes https://github.com/libsdl-org/SDL/issues/4950
2021-11-14 20:34:41 -08:00
Ozkan Sezer fa3330baec autotools, cmake: test Xfixes along with XInput2.h:
because we use Xfixes with XIBarrierReleasePointer
2021-11-12 12:55:50 +03: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
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 1739ef3ee1 sdlchecks.cmake: remove libusb/hid.c and SDL_hidapi.c additions to srcs 2021-11-08 22:00:02 +03:00
Joel Winarske fdb27e0b08
cmake: Use host wayland-scanner only (#4873) 2021-10-25 12:04:07 -04:00
Ryan C. Gordon ab7910facf
cmake: Move the old, global add_definitions (etc) to an interface library.
Fixes #4150.
2021-10-05 12:34:29 -04:00
Ryan C. Gordon f1793af404
cmake: removed an add_definitions call. 2021-10-05 11:19:30 -04:00
Ryan C. Gordon 7850d0cf6f
cmake: Prefix all options with "SDL_"
This makes it clear which options came from SDL's CMake project when
building SDL as a subdirectory of a parent CMake project.

Fixes #4139.
2021-10-05 10:45:26 -04:00
Ethan Lee ef8c4d27d7 wayland: Require xkbcommon 0.5.0 or newer (2014-10-18)
Fixes #4645
2021-09-23 17:45:38 -04:00
Ryan C. Gordon 478f9eed28
x11: Don't include X11/extensions/extutil.h
We don't use it, it was a leftover from 1.2, I think, and it doesn't exist
on Solaris, so this should hopefully fix the build there.

This also means we don't need the configure/cmake checks for
SDL_VIDEO_DRIVER_X11_CONST_PARAM_XEXTADDDISPLAY, so that was removed also.

Fixes #1666.
2021-09-20 10:22:50 -04:00
Ryan C. Gordon fff421f4b8
cmake: fix a bunch of things to properly link without LOADSO enabled.
The wrong logic, copy/pasted to a bunch of places, would correctly disable
the dynamic loading but fail to specify the libraries that SDL would now need
to explicitly link against.
2021-08-24 00:01:46 -04:00
Ozkan Sezer 77c8d11137 configuration updates for dlopen:
- cmake, configure (CheckDLOPEN): --enable-sdl-dlopen is now history..
  detach the dl api discovery from SDL_LOADSO_DLOPEN functionality.
  define HAVE_DLOPEN. also define DYNAPI_NEEDS_DLOPEN (CheckDLOPEN is
  called only for relevant platforms.)
- update SDL_config.in and SDL_config.cmake accordingly.
- SDL_dynapi.h: set SDL_DYNAMIC_API to 0 if DYNAPI_NEEDS_DLOPEN is
  defined, but HAVE_DLOPEN is not.
- pthread/SDL_systhread.c: conditionalize dl api use to HAVE_DLOPEN
- SDL_x11opengl.c, SDL_DirectFB_opengl.c, SDL_naclopengles.c: rely
  on HAVE_DLOPEN, not SDL_LOADSO_DLOPEN.
- SDL_config_android.h, SDL_config_iphoneos.h, SDL_config_macosx.h,
  SDL_config_pandora.h, and SDL_config_wiz.h: define HAVE_DLOPEN.

Closes: https://github.com/libsdl-org/SDL/pull/4351
2021-08-10 12:07:32 -07:00
Ozkan Sezer 5b18ae29b7 improvements to libdecor support in cmake
this makes it consistent with wayland support, and makes cmake side
in line with autotools' libdecor support.
2021-08-03 14:01:02 +03:00
Ozkan Sezer a15ec36547 attempt to fix cmake builds with libdecor 2021-08-03 11:33:50 +03:00
Ryan C. Gordon 74aa4b635c
cmake: don't fail if Wayland is enabled but libdecor isn't found.
Instead, just disable libdecor support.

This matches what the configure script does.
2021-08-03 03:10:14 -04:00
Christian Rauch 9e6fcbe72c wayland: client-side decoration 2021-07-25 14:54:12 -07:00
Nicolas Caramelli 6a2af48ad7 CMake: Generic check for desktop GL and EGL on Linux systems 2021-06-01 16:50:28 -07:00
Ozkan Sezer 89a2980a6d CMake: fixes to pthreads detection.
changes unnecessary check_c_source_runs to check_c_source_compiles,
removes the reduntant cross-compile check, and defines _GNU_SOURCE
for PTHREAD_MUTEX_RECURSIVE checks just like the autotools version.

Fixes: https://github.com/libsdl-org/SDL/issues/4262
Closes:  https://github.com/libsdl-org/SDL/pull/4282
2021-04-25 01:28:03 +03:00
Ryan C. Gordon a81fe27271
configure/cmake: Hook up Emscripten threads (disabled by default).
Fixes #3795.
2021-04-04 00:16:30 -04:00
vanfanel e213f37a45 [KMSDRM] Enable full OpenGL detection (MESA/libglvnd) on both the make and cmake buildsystems. 2021-03-15 18:47:22 -07:00
Cacodemon345 3853531f6d Fix CMake script on Linux 2021-03-15 10:11:01 +03:00
Cacodemon345 34de3b57a1 Fix CMake script on FreeBSD 2021-03-13 18:40:27 -08:00
Frank Praznik 2f0b99a774 audio: Add Pipewire playback/capture sink 2021-02-28 19:40:09 -08:00
Ozkan Sezer 091a4649e8 added --enable-xinput switch for windows builds 2021-02-10 10:22:18 -05:00
Ozkan Sezer 2376458841 renamed SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H to SDL_HAVE_MACHINE_JOYSTICK_H 2021-01-24 00:51:25 -05:00
Sam Lantinga 351abc585b Fixed bug 5463 - generated Wayland interfaces are included in the library's ABI
Simon McVittie

In versions since 1.15, the `code` mode is a deprecated alias for
`public-code`, which emits symbols with default visibility, overriding
SDL's -fvisibility=hidden option.

Use the `private-code` mode instead. This emits symbols with hidden
visibility, so they do not affect the ABI of libSDL.

See also: https://bugreports.qt.io/browse/QTBUG-73099,
https://lists.freedesktop.org/archives/wayland-devel/2018-February/037097.html
2021-01-14 14:50:15 -08:00
Manuel Alfayate Corchete b24494734b [KMS/DRM] Go back to the LEGACY interface only because using planes breaks compatibility with HW, so no advantage on using ATOMIC. 2021-01-08 18:57:12 +01:00
Manuel Alfayate Corchete 13244de5c2 [Buildsystem] Only build KMSDRM support if EGL+OpenGL is detected by CMake. 2020-12-22 17:17:30 +01:00
Sam Lantinga ee180efda7 Fixed bug 5406 - Upstreaming DragonFlyBSD changes from DeltaPorts (patch from David Carlier) 2020-12-20 12:08:49 -08:00
Sam Lantinga f8839289b0 Potential fix for bug 5393 - KMSDRM: using atomic mode setting breaks GPU compatibility
Substring

I was trying the KMSDRM video backend with some very simple programs that were working ok on 2.0.12. The same code won?t work on the current dev branch and I get:

DEBUG: check_modesetting: probing ?/dev/dri/card0?
DEBUG: /dev/dri/card0 connector, encoder and CRTC counts are: 4 5 6
DEBUG: check_modesetting: probing ?/dev/dri/card0?
DEBUG: /dev/dri/card0 connector, encoder and CRTC counts are: 4 5 6
DEBUG: KMSDRM_VideoInit()
DEBUG: Opening device /dev/dri/card0
DEBUG: Opened DRM FD (3)
DEBUG: no atomic modesetting support.
DEBUG: Video subsystem has not been initialized
INFO: Using SDL video driver: (null)
DEBUG: Video subsystem has not been initialized

After carefully checking, the radeon driver doesn?t support atomic modesetting. That?s not the only problem : the same happens with the amdgpu driver if we disable Display Core (kernel parameter amdgpu.dc=0, which is required to get analogue outputs working).

This is a major regression in the KMSDRM driver.

Using atomic mode setting is great, but having no fallback to the "standard KMS" is bad.
2020-12-15 12:22:48 -08:00
Sam Lantinga bd032c1f72 Fixed bug 5221 - libusb isn't detected correctly in CMake
Sven-Hendrik Haase

In CMake I currently have trouble activating hidapi support as libusb-1.0 isn't ever correctly detected as it's searched for by the wrong name.

configure.ac correctly does this:

PKG_CHECK_MODULES([LIBUSB], [libusb-1.0], have_libusb=yes, have_libusb=no)

However, sdlchecks.cmake does this:

pkg_check_modules(LIBUSB libusb)

but it needs to be:

pkg_check_modules(LIBUSB libusb-1.0)
2020-12-09 07:26:59 -08:00
Ryan C. Gordon 2b7ce8c51d cmake: Set HAVE_VIDEO_WAYLAND_QT_TOUCH if appropriate (thanks, Michael!). 2020-04-14 18:14:39 -04:00
Ryan C. Gordon 952bac7c47 cmake: use check_symbol_exists, not check_function_exists (thanks, Manuel!)
This fixes the problem where we think iOS has fseeko64, etc, but doesn't.

Fixes Bugzilla #4885.
2020-04-13 15:22:09 -04:00
Ryan C. Gordon 377f2d35d5 configure: Remove wayland-protocols check from configure and CMake scripts.
We ship these with SDL now, don't need the system versions installed.
2020-04-01 13:43:53 -04:00
Sam Lantinga f7c9502dfb Fixed bug 5044 - CMake messes up hidapi path when project directory contains spaces
Eric Jing

When the project directory path contains spaces, CMake butchers the include path for the hidapi files.

I traced the problem to the cmake/sdlchecks.cmake file at line 1091, which sets flags for the build process. I surrounded the problem flag with double quotes, shown below, and CMake works with spaces in the project directory path.
2020-03-20 12:13:26 -07:00
Sam Lantinga c7a739bef4 Fixed bug 4643 - Append EGL CFLAGS in CheckOpenGLESX11
Danilo Spinella

EGL need -DMESA_EGL_NO_X11_HEADERS in systems without X11 installed. Make CMake checks import EGL CFLAGS.

Relevant bug: https://bugzilla.libsdl.org/show_bug.cgi?id=4243
2020-03-02 15:24:10 -08:00
Ethan Lee f7d82e5616 hidapi: Add SDL_hidapi.c, allows support for multiple hidapi backends.
This is currently supported on Linux and macOS. iOS and Android are not
supported at all, Windows support could be added with some changes to the libusb
backend. The Visual Studio and Xcode projects do not use this feature.

Based on Valve Software's hid.cpp, written in collaboration with Andrew Eikum.
2019-07-31 12:20:55 -04:00
Andrew Eikum e149f4c4b0 cmake: Fix locating libusb header at configure-time
Removing the CheckUSBHID call is necessary to avoid caching the failed header
check result before we find libusb via pkg-config.
2019-07-31 11:34:00 -05:00
Ryan C. Gordon 66d4d8e25d cmake: Added HIDAPI support. 2019-07-08 16:46:52 -04:00
Ryan C. Gordon bc57ac27f9 mir: Removed mir client support.
Fixes Bugzilla #4288.
2018-11-02 21:34:17 -04:00
Ryan C. Gordon 4f5bd53e8f wayland: Keep protocol XML files in-tree.
Now you don't need the latest Wayland installed to build with
newer protocols supported, as they'll build correctly; even if
your system can't use them, we can make intelligent decisions
at runtime about what's available on the current machine anyhow.

This also simplifies some logic and possible failure cases in
the configure and CMake scripts.

Fixes Bugzilla #4207.
2018-06-25 09:37:25 -07:00
Ryan C. Gordon c70db0cabf cmake: Look in popular places for X11 headers, export this info properly.
Fixes CMake not being able to find X11 on FreeBSD (which generally has the
headers in /usr/local/include/X11).

List of other popular places borrowed from CMake's FindX11 module.

This worked on the configure script because of magic in the AC_PATH_X macro.

Fixes Bugzilla #4815.
2018-06-24 15:12:18 -04:00
Sam Lantinga ba9ede12fb Fixed bug 4027 - CheckLibSampleRate macro in sdlchecks.cmake never defines HAVE_LIBSAMPLERATE{,_SHARED}, so they're always reported as disabled by MESSAGE_TESTED_OPTION macro in macros.cmake 2018-02-13 13:25:59 -08:00
Sam Lantinga 4ff16ba3a4 Fixed bug 4081 - sdlchecks.cmake: typo introduced by rev11848 breaks building with wayland support 2018-02-13 07:59:45 -08:00
Guillermo A. Amaral bd0def06ee Set rpath instead of changing environment for RPi
Credit goes to Adrian Perez de Castro for the improvement.

Signed-off-by: Guillermo A. Amaral <g@maral.me>
2018-02-07 14:12:26 -08:00
Ryan C. Gordon cd53220749 wayland: Add support for xdg-shell protocol (unstable v6).
This is meant to be the desktop-enhanced version of wl_shell. Right now we
just match what the existing wl_shell code does, but there are other areas of
functionality available to us now, that we can fill in later.

This uses the "unstable" API, since this is what ships in Ubuntu 17.10 (as
part of Wayland 1.10), but Wayland 1.12 promotes this to stable with extremely
minor changes. We will add support for the stable version when it makes sense
to do so.
2018-02-07 13:13:55 -05:00
Ryan C. Gordon 32d421d490 cmake: Minor cleanup (reuse a string we already calculated). 2018-02-07 13:07:59 -05:00
Guillermo A. Amaral 35554caf16 Make rpi video cross-compiler friendly.
* Stops using fixed path to find GLES/EGL libs.
* Tries pkg-config to locate bcm_host.

Signed-off-by: Guillermo A. Amaral <g@maral.me>
2018-01-17 13:17:10 -08:00
Ryan C. Gordon c722e58d1f vulkan: Include a copy of vulkan.h and vk_platform.h.
Now we can provide Vulkan support in the build even if the build box doesn't
have a Vulkan SDK, since we dynamically link to the library anyhow.
2017-08-27 23:25:12 -04:00
Ryan C. Gordon 25e3a1ec90 vulkan: Initial Vulkan support!
This work was done by Jacob Lifshay and Mark Callow; I'm just merging it
into revision control.
2017-08-27 22:15:57 -04:00
Ryan C. Gordon 80c6c2fa76 cmake: whoops, Sam and I both fixed this bug at the same time. :) 2017-08-09 22:34:45 -04:00
Sam Lantinga d3af447ee5 Fixed bug 3590 - CMAKE: typos in CheckMir
Martin Gerhardy

-            list(APPEND EXTRA_CFLAGS ${MIR_TOOLKIT_CFLAGS} ${EGL_CLFAGS} ${XKB_CLFLAGS})
+            list(APPEND EXTRA_CFLAGS ${MIR_TOOLKIT_CFLAGS} ${EGL_CFLAGS} ${XKB_CFLAGS})

CFLAGS is spelled wrong in two different ways for EGL and XKB

And while you are on it...

sdl needs mir >= 0.24 afaik - it fails on travis-ci (ubuntu 14.04 LTS with 0.18 installed and in other environments, too (e.g. https://github.com/urho3d/Urho3D/issues/1685)

To fix this one should add a min version check to pkg_check_modules like this

-        pkg_check_modules(MIR_TOOLKIT mirclient mircommon)
+        pkg_check_modules(MIR_TOOLKIT mirclient>=0.24 mircommon)
2017-08-09 18:47:33 -07:00
Ryan C. Gordon 1b8117be21 cmake: Don't link directly against a libpthread on Android (thanks, Anthony!).
Android has pthreads, but it's just part of their C runtime instead of a
separate library like the usual Linux platforms.

Fixes Bugzilla #3675.
2017-08-09 19:50:18 -04:00
Olli Kallioinen 2b5a5c510b Android build fixes
-Enabling checking for GCC_ATOMICS also on clang by default. This way all Android ABIs build successfully
 -Android cmake: Threading was not enabled correctly
 -Android cmake: Timers and dynamic lib loading were not included in the sources
2017-06-08 22:07:55 +03:00
Sam Lantinga 56363ebf61 Fixed bug 3690 - SDL2 KMS/DRM render context support
Manuel

The attached patch adds support for KMS/DRM context graphics.

It builds with no problem on X86_64 GNU/Linux systems, provided the needed libraries are present, and on ARM GNU/Linux systems that have KMS/DRM support and a GLES2 implementation.
Tested on Raspberry Pi: KMS/DRM is what the Raspberry Pi will use as default in the near future, once the propietary DispmanX API by Broadcom is overtaken by open graphics stack, it's possible to boot current Raspbian system in KMS mode by adding "dtoverlay=vc4-kms-v3d" to config.txt on Raspbian's boot partition.
X86 systems use KMS right away in every current GNU/Linux system.

Simple build instructions:

$./autogen.sh
$./configure --enable-video-kmsdrm
$make
2017-08-02 10:22:48 -07:00