Commit graph

196 commits

Author SHA1 Message Date
Ozkan Sezer 272010b612 cmake: really fix detection of pthread_setname_np() on Apple platforms. 2023-02-13 11:56:10 +03:00
Ozkan Sezer f7f61af12b cmake: fix detection of pthread_setname_np() on Apple platforms. 2023-02-13 11:55:40 +03:00
Anonymous Maarten 236d26b480 cmake: add -F <SDL3-framework-parent-folder> compile option in CMakeLists.txt 2023-02-13 05:26:57 +01:00
Anonymous Maarten d0b39890d2 cmake: include_guard() is not needed 2023-02-13 04:55:46 +01:00
Anonymous Maarten ff82341ce9 cmake: allow find_package from build directory (requires CMake 3.26) 2023-02-09 17:20:28 -08:00
Anonymous Maarten cc0fa00049 cmake: include directories of (generated) dependencies as SYSTEM 2023-02-09 17:20:28 -08:00
Pierre Wendling fa8fba3812 Add clang-tidy config and CMake/CI support. 2023-02-06 21:02:25 -08:00
Anonymous Maarten 0a3d038ff7 cmake: fix installed SDL3::SDL3_test + test on ci 2023-01-31 05:29:38 +01:00
Anonymous Maarten 25b723cc82 cmake: detect Emscripten architecture as emscripten 2023-01-31 01:59:21 +01:00
Anonymous Maarten 53d434fd24 cmake: add CPack support for creating binary archives 2023-01-31 01:59:21 +01:00
Anonymous Maarten 23c2c15a70 cmake: capitalize SDL3::Headers target 2023-01-31 01:59:21 +01:00
Anonymous Maarten 13c294eec3 cmake: add support for creating Apple frameworks with CMake 2023-01-31 01:59:21 +01:00
Anonymous Maarten 93c25e650c cmake: create SDL3::headers for include path + no exported CMake variables 2023-01-31 01:59:21 +01:00
Anonymous Maarten 5690dfb65b cmake: don't install Android.mk files for Android 2023-01-31 01:59:21 +01:00
Anonymous Maarten 19d162281c cmake: detect cpu architecture in SDL_DetectCPUArchitecture
Stop looking for arch, when one is found
2023-01-31 01:59:21 +01:00
Anonymous Maarten 9cf34908a1 cmake: pass VERSION to project() + don't use SDL_VERSION 2023-01-31 01:59:21 +01:00
Anonymous Maarten bb3a60bce5 cmake: move include(sdlfind.cmake) to main cmake script 2023-01-25 00:23:05 +01:00
Frank Praznik 423a82cd4b 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.
2023-01-18 10:28:01 -08:00
Anonymous Maarten 6d11515873 cmake: make sdl3.pc relocatable 2023-01-15 12:37:51 -08:00
Anonymous Maarten 0a1479d58c cmake: fix sdl3.pc for Nintendo 3DS + add to test matrix 2023-01-15 17:46:36 +01:00
Sam Lantinga 8238a128c3 Fixed build on Steam Link hardware 2023-01-13 16:37:56 -08:00
Sam Lantinga bf53183c8b Fixed building on Raspberry Pi 2023-01-13 14:20:57 -08:00
Anonymous Maarten a3ae26ddd0 cmake: convert spaces in PTHREAD_CFLAGS to ';' 2023-01-13 19:02:54 +01:00
Anonymous Maarten 3d67b8d026 cmake: convert spaces in USB_CFLAGS to ';' 2023-01-13 18:40:49 +01:00
Sam Lantinga 7c16fe6d69 Default to use the built-in EGL definitions 2023-01-12 16:17:00 -08:00
Anonymous Maarten 049e6ff408 cmake: haiku uses CXX code, so enable it in C-only project 2023-01-10 02:39:09 +01:00
Anonymous Maarten 62297e7da5 cmake: avoid string(SUBSTRING) on short strings
CMake 3.1 and older throws an error when the input string is too short
2023-01-09 15:44:50 +01:00
Ozkan Sezer 0d8c22acd2 cmake (CheckPTHREAD): remove _GNU_SOURCE define after bug #7026 fix 2023-01-09 01:30:37 +03:00
Anonymous Maarten f53d797cca cmake: generate git hash using GetRevisionDescription CMake module
This allows the build system (ninja/make/VS) to detect whether the current
checkout git commit has changed. If so, SDL_revision.h will be updated.
2023-01-08 18:20:56 +01:00
Anonymous Maarten e85e11b211 cmake: avoid adding full path to SDL_EXTRA_LIBS
This avoids placing e.g. -l/path/to/libX11.so in sdl3.pc when configuring with -DSDL_X11_SHARED=OFF
2023-01-08 15:57:51 +01:00
Anonymous Maarten dfcd8d5835 cmake: remove unused function 'listtostrrev' 2023-01-08 15:57:51 +01:00
Anonymous Maarten 77025417dd cmake: add SDL_ prefix to EXTRA_LIBS/EXTRA_LDFLAGS 2023-01-08 15:57:51 +01:00
Anonymous Maarten bffbfa572c cmake: rename SDL_STATIC_LIBS -> SDL_PC_STATIC_LIBS 2023-01-08 15:57:51 +01:00
Anonymous Maarten 053c37583c cmake: avoid modifying CMAKE_C_FLAGS 2023-01-08 15:57:51 +01:00
Anonymous Maarten 5555284a70 cmake: use target_compile_options to use -idirafter for khronos headers 2023-01-08 15:57:51 +01:00
Anonymous Maarten 0a4420e02f cmake: rename cmake variables to include _PC_ as they are meant for pkgconfig file 2023-01-08 15:57:51 +01:00
Anonymous Maarten 373a6464c8 cmake: collect cflags in sdl-build-options and sdl-global-options 2023-01-08 15:57:51 +01:00
Anonymous Maarten 7150d6b05a cmake: add SDL3 to include path
This reverts parts of 9f2ca87
2022-12-29 09:01:56 -08:00
Sylvain aa46ff8f4b Remove SDL_WINDOW_SHOW flag, as redundant with SDL_WINDOW_HIDDEN 2022-12-28 12:16:57 -08:00
Sylvain ab0c5cf07d
Fix compilation 2022-12-27 17:25:31 +01:00
avafinger 12e0e6d130 SDL3 with Hardware Acceleration for ROCKCHIP platform (mali blob) 2022-12-26 08:50:51 -08:00
Anonymous Maarten 8f9227e4be cmake: use CMakePushCheckState to handle check states 2022-12-19 09:19:45 -08:00
Anonymous Maarten 653893f188 cmake: declutter root + remove obsolete variables 2022-12-19 09:19:45 -08:00
Anonymous Maarten 39a7abad7a cmake: lowercase all macros 2022-12-19 09:19:45 -08:00
Anonymous Maarten 289b024715 cmake: add function to print dict list 2022-12-19 09:19:45 -08:00
Daniel Gibson c3bf253b09 Remove SDL3_main from build systems, remove most of src/main/*
XCode is still missing, and src/main/winrt/SDL3-WinRTResource*
still need to find a new home
2022-12-15 08:01:01 -08:00
Daniel Gibson 22e22ba196 Add SDL_main.h includes to tests
.. including cmake/test/*.c, whatever that does

(this is needed now because SDL.h doesn't include SDL_main.h anymore)
2022-12-15 08:01:01 -08:00
Anonymous Maarten 9eb4d1f020 cmake: use FindALSA.cmake to find ALSA libraries
Co-authored-by: nfarid <54642193+nfarid@users.noreply.github.com>
2022-12-12 01:37:01 +01:00
Jan Engelhardt 1878674477 build: add symbol versioning for SDL
If a program built against one version of SDL is run in an
environment where there is an earlier version of the SDL .so library
installed, the result varies depending on platform configuration; in
the best case, it won't start at all, at worst it aborts in the
middle of the user doing "something important" (systems implementing
lazy symbol resolution). verdefs on the other hand are always checked
on startup.

The dependency information present in programs and shared libraries
is not only of value to the dynamic linker, but also to a
distribution's package management. If the dynamic linker is able to
tell that a program is not runnable per the above, a package manager
is able to come to the same conclusion — and block the installation
of a nonfunctional program+library ensemble.

Because there are a lot more symbols than there are libraries (I am
going to throw in "10^4 to 1 or worse"), package managers generally
do not evaluate symbols, but only e.g. the SONAME, NEEDED and VERNEED
fields/blocks. Because the SONAME is the same between two SDL
versions like 2.0.24, and 2.0.26, everything rests on having verdefs.

This patch proposes the addition of verdefs.
2022-12-02 13:05:37 -08:00
Ozkan Sezer bb8adf74e0 cmake/sdlchecks.cmake: make it diff smaller against SDL2 2022-12-02 03:01:02 +03:00