cmake


Log

Author Commit Date CI Message
Ozkan Sezer 63470585 2023-02-13T11:56:10 cmake: really fix detection of pthread_setname_np() on Apple platforms.
Ozkan Sezer 1194f52a 2023-02-13T11:55:40 cmake: fix detection of pthread_setname_np() on Apple platforms.
Frank Praznik ea179abd 2023-01-16T13:39:26 wayland: Enforce or override libdecor minimum window size libdecor plugins can change the min/max window size values internally to enforce a minimum window size, and errors and crashes can result if the window size is below the internal limit. On versions of libdecor >= 0.1.1, the minimum width and height can be queried and the minimum required window size will be enforced. The application requested window size is still respected, however, the actual window may be slightly larger than the drawable area to accommodate the required libdecor minimum size. On version 0.1.0 of libdecor, which lacks the function to retrieve the minimum size, the internal limits are overridden before committing a frame, so that the internal limits always match the window size as a workaround, even if the window is technically smaller than the plugin would normally allow. (cherry picked from commit 423a82cd4b65cf72668551093bfdf58d49bce9ce)
Anonymous Maarten 01a4cf8a 2023-01-15T16:54:22 ci: don't require EXTRA_ prefix on input environment variables
Ozkan Sezer d09d0aaa 2023-01-09T01:30:50 cmake (CheckPTHREAD): remove _GNU_SOURCE define after bug #7026 fix
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 dcd12523 2022-11-25T02:18:16 cmake: test for lsx and lasx intrinsics for loongarch
Anonymous Maarten 660cec69 2022-11-25T02:57:00 cmake: find libudev library so it gets priority
Anonymous Maarten e426617c 2022-11-24T20:39:55 cmake: add X11 include dir to check dirs
Hubert Maier 5dc93451 2022-11-06T20:49:37 JANITORIAL : Correct some more spelling mistakes (#6489)
Anonymous Maarten 61297f70 2022-10-29T03:20:30 cmake: on Apple, check for presence of an OBJC compiler
Anonymous Maarten 04bcc910 2022-10-29T03:14:54 cmake: don't do enable_language(OBJC) When SDL is included as a subproject, the following error might appear: ``` CMake Error: Error required internal CMake variable not set, cmake may not be built correctly. Missing variable is: CMAKE_OBJC_COMPILE_OBJECT ``` This is probably because the master project does not see certain OBJC related variables
Anonymous Maarten c3b13346 2022-10-21T18:32:53 On x86, pass -nodefaultlib to linker when wanting to avoid the C library
Brad Smith f37db957 2022-10-21T04:49:15 Use -lpthread on OpenBSD
Anonymous Maarten 0823b597 2022-10-21T15:31:43 cmake: fix finding wayland-libdecor It was broken in 11d53c84a7663d5a5861f3672990ca4b32376e3e
Anonymous Maarten 11d53c84 2022-10-20T01:11:39 cmake: use pkg-config's library dirs as hint for finding a shared library
Brad Smith f4e3af15 2022-10-17T07:23:40 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.
Brad Smith 5ec1cef6 2022-10-06T22:43:33 Further fixes for the sndio CMake detection
Brad Smith f4882318 2022-09-29T20:31:20 Use the pkg-config file when checking for sndio.
Anonymous Maarten 81d32667 2022-09-27T01:59:37 cmake: make sure check_* uses 2 different variables in CheckX11
Anonymous Maarten a9524ffa 2022-09-27T01:52:28 cmake: make sure check_c_source_compiles uses 2 different variables in CheckOSS
Anonymous Maarten bfecd781 2022-09-27T01:08:04 cmake: use check_symbol_exists to check dlopen + need for dl library
Ozkan Sezer 098a7a04 2022-09-21T10:37:02 add missing quotes to the fallback CHECK_OBJC_SOURCE_COMPILES macro Closes: https://github.com/libsdl-org/SDL/issues/6268 .
Anonymous Maarten 3b20e0ec 2022-09-19T02:38:36 cmake: only add -Wl,--undefined=WinMain when building an executable
Anonymous Maarten 6dfd7a17 2022-09-10T15:53:11 cmake: forward HAVE_LIBUSB to HAVE_HIDAPI_LIBUSB
Anonymous Maarten c3495ec6 2022-09-10T14:11:19 Fix value of SDL_HIDAPI_DISABLED
Anonymous Maarten 19b13aab 2022-09-10T13:41:29 cmake: mark hidapi as disabled when not found
Sam Lantinga 3f89d170 2022-09-01T11:30:02 Fixed building with libusb not dynamicaly loaded
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
Cameron Cawley 6e9a606a 2022-07-30T21:08:07 Add more mingw-w64 build workflows
Anonymous Maarten 430c3908 2022-07-25T23:35:59 ci: test 'sdl2-config --static-libs' + 'pkg-config sdl2 --static' on ci
Anonymous Maarten e5698d13 2022-07-21T18:38:12 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.
Anonymous Maarten 9ad3711a 2022-07-21T15:19:19 cmake: only enable x11_xss/x11_xrandr/x11_xfixes when its lib is available
Anonymous Maarten aa7a6c0e 2022-07-21T14:38:57 cmake: only enable x11_xcursor and x11_xinput when its library is available
Anonymous Maarten fa39f735 2022-06-26T23:34:30 cmake: add generated files to a custom target (#5851) This way, headers are only generated once .
Anonymous Maarten 6dcb2868 2022-06-16T19:53:58 cmake: avoid use of possible non-available XEXT_LIB
Anonymous Maarten 78a37516 2022-06-16T16:38:58 cmake+ci: fix+test sdl2-config + sdl2.pc for all supported platforms
Anonymous Maarten b19099d5 2022-06-16T19:59:57 cmake: use find_package(SampleRate) to find samplerate + allow targets
Anonymous Maarten 86f50ae7 2022-06-15T06:10:25 ci: Test cmake build script on Android android
Anonymous Maarten 18206446 2022-06-15T17:10:31 cmake: collect SDL_LIBS as list + export PKG_DIRECTFB_LDFLAGS
Anonymous Maarten 32df5aeb 2022-06-15T03:16:28 Check result of FindLibraryAndSONAME before use
Anonymous Maarten afc350ee 2022-06-15T03:03:33 cmake: do 's#set(SOURCE_FILES #list(APPEND SOURCE_FILES #g'
Anonymous Maarten e99a7144 2022-06-13T18:04:51 Use list(APPEND EXTRA_LIBS) everywhere
Anonymous Maarten 5abd6769 2022-06-07T04:28:55 Allow empty default values to the dep_option macro
Anonymous Maarten 9ff8f29f 2022-06-03T20:07:43 cmake: Add mini-SDL2 CMake project to test SDL2 prefixes
ShuangLiu1992 f4fc4719 2022-05-09T18:35:50 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 https://github.com/libsdl-org/SDL/commit/d3cc5764c0f66872a6b87c0ffbca66c85dccbea3
Ryan C. Gordon 7d7ec9c9 2022-04-26T16:41:28 x11: Remove XVidMode and Xinerama support. Fixes #1782.
Ethan Lee 13337e17 2022-03-23T13:27:01 wayland: The rest of the wayland-client 1.18 requirement... Git, please
Joao Paulo Magalhaes 57df1dfc 2022-03-23T15:07:52 Video: do not use hardcoded VIVANTE and VDK libraries
Ozkan Sezer 61a93d3c 2022-03-15T23:10:02 minor whitespace cleanup.
Ryan C. Gordon 3ab739af 2022-03-13T12:10:52 cmake: Make test code use proper C main functions. Fixes #5021.
Nick Cao f03215bc 2022-03-07T15:54:24 fix linking with SDL_PULSEAUDIO_SHARED=OFF and SDL_X11_SHARED=OFF
Luke Street 0cb39ed4 2022-02-07T04:11:14 cmake: Fix SDL_LIBUSB_DYNAMIC soname
Ozkan Sezer 94035436 2022-02-05T18:50:00 cmake: enable_language(OBJC) only for APPLE
Ozkan Sezer 3c9ac448 2022-02-05T18:45:50 cmake: enable_language(OBJC) to fix check_objc_source_compiles().
Ozkan Sezer 686a0f34 2022-02-05T18:28:24 cmake: include CheckOBJCSourceCompiles for cmake >= 3.16 c.f. bugs #5011 and #3912
Max Krummenacher c3a7cc34 2022-01-10T21:52:02 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>
Ozkan Sezer b2656776 2022-01-11T11:33:02 cmake: initial attempt at adding os/2 support.
Ryan C. Gordon 7967c976 2022-01-05T21:02:38 cmake: Do a more thorough test for the old bcm Raspberry Pi libraries. Fixes #5132.
Ozkan Sezer 398c0fdf 2021-12-18T23:56:10 cmake: simplify wayland-scanner 1.15 detection.
Wohlstand 54d24510 2021-12-18T19:58:28 sdlchecks.cmake: Small tune by @sezero
Wohlstand 6c9907dd 2021-12-18T17:15:08 Fixed build on CMake older than 3.7 I found this accidentally when I tried to use CMake 3.0 to build this.
Wohlstand 3861afac 2021-12-18T17:14:32 Fixed build on CMake older than 3.13 Fixes #5096
Ozkan Sezer 03019c91 2021-12-06T20:37:52 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: https://github.com/libsdl-org/SDL/commit/4b42c05ba1eaaaa9a4ef803acea8f13402271039#commitcomment-61427659
Ozkan Sezer 5a0ea7fb 2021-11-27T19:10:10 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.
Cameron Gutman 43d1b42a 2021-11-16T17:59:38 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
Ozkan Sezer 7d3045f2 2021-11-16T23:51:40 minor whitespace tidy-up.
Ozkan Sezer 68ffd24c 2021-11-16T23:37:20 autotools, cmake: don't define SDL_JOYSTICK_HIDAPI in CheckHIDAPI()
Sam Lantinga bbac1e9a 2021-11-14T20:34:41 Don't include pthreads code when threads are disabled Fixes https://github.com/libsdl-org/SDL/issues/4950
Ozkan Sezer fa3330ba 2021-11-12T12:55:50 autotools, cmake: test Xfixes along with XInput2.h: because we use Xfixes with XIBarrierReleasePointer
Sam Lantinga a0f8afb5 2021-11-11T09:16:44 Separated the HIDAPI subsystem from HIDAPI joysticks You can now disable HIDAPI joysticks while retaining the HIDAPI SDL API
Ethan Lee 4b42c05b 2021-11-08T13:52:48 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.
Ozkan Sezer 1739ef3e 2021-11-08T22:00:02 sdlchecks.cmake: remove libusb/hid.c and SDL_hidapi.c additions to srcs
Joel Winarske fdb27e0b 2021-10-25T09:04:07 cmake: Use host wayland-scanner only (#4873)
Ryan C. Gordon ab7910fa 2021-10-05T12:34:29 cmake: Move the old, global add_definitions (etc) to an interface library. Fixes #4150.
Ryan C. Gordon f1793af4 2021-10-05T11:19:30 cmake: removed an add_definitions call.
Ryan C. Gordon 60d59aeb 2021-10-05T10:54:06 cmake: Calculate padding for dislaying options automatically.
Ryan C. Gordon 7850d0cf 2021-10-05T10:43:35 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.
Ethan Lee ef8c4d27 2021-09-23T17:43:53 wayland: Require xkbcommon 0.5.0 or newer (2014-10-18) Fixes #4645
Ryan C. Gordon 478f9eed 2021-09-20T10:20:04 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.
Ryan C. Gordon fff421f4 2021-08-23T23:59:54 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.
Ozkan Sezer 77c8d111 2021-08-10T20:55:50 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
Ozkan Sezer 5b18ae29 2021-08-03T14:01:02 improvements to libdecor support in cmake this makes it consistent with wayland support, and makes cmake side in line with autotools' libdecor support.
Ozkan Sezer a15ec365 2021-08-03T11:33:50 attempt to fix cmake builds with libdecor
Ryan C. Gordon 74aa4b63 2021-08-03T03:10:14 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.
Christian Rauch 9e6fcbe7 2020-06-11T22:10:28 wayland: client-side decoration
Nicolas Caramelli 6a2af48a 2021-05-06T15:43:16 CMake: Generic check for desktop GL and EGL on Linux systems
Ozkan Sezer 89a2980a 2021-04-23T01:56:10 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
Ryan C. Gordon a81fe272 2021-04-04T00:16:30 configure/cmake: Hook up Emscripten threads (disabled by default). Fixes #3795.
vanfanel e213f37a 2021-03-15T12:53:16 [KMSDRM] Enable full OpenGL detection (MESA/libglvnd) on both the make and cmake buildsystems.
Cacodemon345 3853531f 2021-03-15T10:43:14 Fix CMake script on Linux
Cacodemon345 34de3b57 2021-03-11T15:10:29 Fix CMake script on FreeBSD
Ivan Epifanov 47c10516 2020-12-18T16:42:37 Add reversive list join macro
Frank Praznik 2f0b99a7 2021-02-13T11:56:05 audio: Add Pipewire playback/capture sink
Ozkan Sezer 091a4649 2021-01-29T23:11:13 added --enable-xinput switch for windows builds
Ozkan Sezer 23764588 2021-01-23T17:24:28 renamed SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H to SDL_HAVE_MACHINE_JOYSTICK_H
Sam Lantinga 351abc58 2021-01-14T14:50:15 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
Manuel Alfayate Corchete b2449473 2021-01-08T18:57:12 [KMS/DRM] Go back to the LEGACY interface only because using planes breaks compatibility with HW, so no advantage on using ATOMIC.