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
Ozkan Sezer
098a7a043e
add missing quotes to the fallback CHECK_OBJC_SOURCE_COMPILES macro
...
Closes: https://github.com/libsdl-org/SDL/issues/6268 .
2022-09-21 10:37:02 +03:00
Anonymous Maarten
3b20e0ecef
cmake: only add -Wl,--undefined=WinMain when building an executable
2022-09-19 05:00:24 +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
Cameron Cawley
6e9a606a8e
Add more mingw-w64 build workflows
2022-07-30 14:37:41 -07:00
Anonymous Maarten
430c39082f
ci: test 'sdl2-config --static-libs' + 'pkg-config sdl2 --static' on ci
2022-07-26 14:24:36 -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
78a3751659
cmake+ci: fix+test sdl2-config + sdl2.pc for all supported platforms
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
86f50ae7d7
ci: Test cmake build script on Android
...
android
2022-06-15 11:11:49 -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
Anonymous Maarten
5abd676917
Allow empty default values to the dep_option macro
2022-06-07 09:17:44 -07:00
Anonymous Maarten
9ff8f29f43
cmake: Add mini-SDL2 CMake project to test SDL2 prefixes
2022-06-03 12:41:36 -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
Ozkan Sezer
9403543671
cmake: enable_language(OBJC) only for APPLE
2022-02-05 18:50:00 +03:00
Ozkan Sezer
3c9ac4489e
cmake: enable_language(OBJC) to fix check_objc_source_compiles().
2022-02-05 18:45:50 +03:00
Ozkan Sezer
686a0f3456
cmake: include CheckOBJCSourceCompiles for cmake >= 3.16
...
c.f. bugs #5011 and #3912
2022-02-05 18:28:24 +03: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
Wohlstand
3861afacf5
Fixed build on CMake older than 3.13
...
Fixes #5096
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