CMakeLists.txt


Log

Author Commit Date CI Message
Sam Lantinga f1416ef2 2022-08-12T20:27:22 Updated to version 2.23.2 for release candidate
Aaron Barany 3f19e36d 2022-08-07T20:55:27 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
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
Francisco Javier Trujillo Mata 4564e898 2022-07-03T18:54:56 put files at the same line
Daniel Santos 147a71b9 2022-06-30T12:57:37 Finish dummy driver
Daniel Santos 2660449c 2022-06-30T11:44:35 Add dummy driver
Daniel Santos a81aa992 2022-06-24T15:48:50 Add prim video support
Francisco Javier Trujillo Mata 46f95a7a 2022-06-24T00:20:11 Create dummy PS2 Video driver
Sam Lantinga 954bbdf3 2022-08-01T09:51:21 Allow emscripten platform to build without threads
Sam Lantinga e4cc076a 2022-08-01T09:15:44 Threads are used by many SDL subsystems and may not be disabled. Fixes https://github.com/libsdl-org/SDL/issues/5095
Anonymous Maarten 83f5bbdf 2022-07-28T14:08:20 cmake: define SDL_STATIC_LIB for static SDL2 library
Anonymous Maarten bdd1d035 2022-07-28T02:38:04 cmake: Don't add /NODEFAULTLIB to link flags when building SDL-static
Anonymous Maarten 02c87471 2022-07-27T15:05:41 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
Anonymous Maarten 5da85376 2022-07-26T21:47:52 stdlib: move all mslibc functions to SDL_mslibc.c This allows disabling LTO on them by only specifying a single file.
Anonymous Maarten 5c70e45c 2022-07-25T23:46:36 cmake: don't use result of 'find_library' for Android libraries
Anonymous Maarten 4690689a 2022-07-25T23:06:52 cmake: on Apple, don't use find_library for frameworks + use EXTRA_LDFLAGS
Anonymous Maarten fc2497b1 2022-07-23T18:05:35 Revert "cmake: don't add -mwindows to link flags in sdl2.pc" This reverts commit d211aaddc1edaad0e7d461d6837f3f1d2f9f4b41.
Anonymous Maarten d211aadd 2022-07-23T15:29:39 cmake: don't add -mwindows to link flags in sdl2.pc
Anonymous Maarten d63a699e 2022-07-23T15:29:13 cmake: by default, disable install target when building SDL as a subproject
Ivan Epifanov 0a164163 2022-07-21T20:30:33 VIta: enable arm neon/simd optimisations
Anonymous Maarten 8f33de84 2022-07-21T14:08:19 cmake: set CMP0054 policy to NEW
Francisco Javier Trujillo Mata e4a80875 2022-06-24T16:43:20 Initial Audio driver
Francisco Javier Trujillo Mata 7fd46ec5 2022-06-18T17:40:53 Initial PS2_Joystick implementation
Francisco Javier Trujillo Mata 84d69da4 2022-03-20T19:42:06 Initial SDL_ps2_main implementation
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 76f40e2b 2022-06-24T14:41:35 cmake: remove stray debug line
Anonymous Maarten ca309363 2022-06-24T14:41:06 cmake: check and use clock_gettime by default on android
hsdk123 bd496961 2022-06-23T08:18:44 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>
Anonymous Maarten 78a37516 2022-06-16T16:38:58 cmake+ci: fix+test sdl2-config + sdl2.pc for all supported platforms
Anonymous Maarten c61367c2 2022-06-16T04:14:52 cmake: do list(APPEND SDLMAIN_SOURCES)
Anonymous Maarten 3617691f 2022-06-16T03:37:05 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)` ```
Anonymous Maarten b3159714 2022-06-16T03:30:34 cmake: set HAVE_STATIC_PIC for correct summary
Anonymous Maarten de409d2a 2022-06-16T03:28:30 cmake: remove spurious UNIX_SYS in dep_option
Anonymous Maarten 2f321fb7 2022-06-16T03:27:52 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.
Anonymous Maarten 5f4e9fb9 2022-06-21T02:26:49 cmake: use add_custom_command to copy include files Otherwise, the make program would not rebuild when a header got changed
Anonymous Maarten 485b1037 2022-06-21T01:30:50 cmake: copy all headers to the build directory and exclusively use that
Anonymous Maarten 3e102123 2022-06-20T20:51:12 cmake: also add the recently-added include folder to the public interface
Anonymous Maarten 4ad4fe67 2022-06-20T20:47:21 cmake: install generated SDL_config.h The generated SDL_config.h recently changed location, so update the install.
Anonymous Maarten d460000b 2022-06-20T19:29:13 cmake: use add_definitions for compatibility with cmake 3.0
Ozkan Sezer bdcdbfc7 2022-06-19T11:04:24 Enable D3D12 detection when using mingw-w64 with cmake too c.f.: autotools commit 59fb7acbf7af9d64a2d5432bb6677585a0ddd50a
Ozkan Sezer a8d41b3b 2022-06-18T21:51:32 check for shellscalingapi.h presence instead of WINVER >= 0x0603
Anonymous Maarten b19099d5 2022-06-16T19:59:57 cmake: use find_package(SampleRate) to find samplerate + allow targets
Sam Lantinga b004133f 2022-06-16T12:49:17 Updated to version 2.23.1 for pre-release checkpoint
Francisco Javier Trujillo Mata fc78d0ff 2022-06-16T00:36:52 Fix Compilation CI
Francisco Javier Trujillo Mata 6b03c1ad 2022-06-13T20:59:18 Add filesystem driver
Francisco Javier Trujillo Mata 52f00833 2022-06-13T20:58:18 Add Thread drivers
Francisco Javier Trujillo Mata 217d3a6d 2022-06-13T20:35:27 Add systimer support
Francisco Javier Trujillo Mata 580416d3 2022-06-06T00:02:08 Initial CMake configuration
Alex Richardson cd8f57ee 2022-05-29T10:38:56 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.
Anonymous Maarten ae7446a9 2022-06-15T20:48:54 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.
Anonymous Maarten 18206446 2022-06-15T17:10:31 cmake: collect SDL_LIBS as list + export PKG_DIRECTFB_LDFLAGS
Anonymous Maarten b5f1fe50 2022-06-15T06:17:59 cmake: Allow integers for SDL_ASSERTIONS + fix -DSDL_ASSERTIONS=0
Yao Wei Tjong 姚伟忠 c90e1ec3 2021-08-15T21:51:31 Remove redundant sizeof "size_t" check The result variables: HAVE_${VARIABLE}, ${VARIABLE}, ${VARIABLE}_CODE, etc. do not seem to be referenced anywhere in the CMake build script.
Anonymous Maarten 6d1dfc83 2022-06-15T04:29:14 cmake: make sure SDL2::SDL2 is always available
Anonymous Maarten 8a2c6b60 2022-06-15T03:11:33 cmake: don't link to libibus (not needed, I think)
Anonymous Maarten c950018f 2022-06-15T03:07:41 cmake: don't link to libdbus (see note in SDL_dbus.c)
Anonymous Maarten fb7c03eb 2022-06-15T03:04:10 cmake: install LICENSE.txt
Anonymous Maarten afc350ee 2022-06-15T03:03:33 cmake: do 's#set(SOURCE_FILES #list(APPEND SOURCE_FILES #g'
Anonymous Maarten 6606ab8b 2022-06-13T18:35:32 Introduce EXTRA_TEST_LIBS variable for test-only libraries
Anonymous Maarten 851eecdf 2022-06-13T18:04:10 Don't add extra build linker flags to SDL2_static These leak to users, when SDL2 is vendored.
Cameron Cawley 25367efc 2022-05-08T17:36:22 Add missing library needed for locale functions on PS Vita
chalonverse b9c2ad83 2022-06-07T22:19:58 Added additional check for HAVE_D3D12_H and missing SDL_VIDEO_RENDER_D3D12 in SDL_config.h.cmake
Anonymous Maarten 298ad937 2022-06-08T01:10:12 cmake: wrap SDL_STATIC_PIC in double quotes (aka never trust user input) Suggested by @Wohlstand
Anonymous Maarten ad272ac6 2022-06-08T00:32:15 Set POSITION_INDEPENDENT_CODE property on SDL2 for CMake 3.0
chalonverse 7a335df9 2022-06-07T16:11:25 Updated CMakeLists.txt and configure.asc/script so that it checks for the required Windows SDK version before it enables the d3d12 renderer. Also fixed reported warnings in some builds.
Anonymous Maarten 5abd6769 2022-06-07T04:28:55 Allow empty default values to the dep_option macro
chalonverse 40828218 2022-06-06T17:42:30 DirectX 12 Renderer (#5761) * DirectX 12 Renderer (27 squashed commits) * Add missing SDL_hidapi.h of merge of SDL.vcxproj.filters * Fixed OpenWatcom build failure * Dynapi fix Co-authored-by: Ryan C. Gordon <icculus@icculus.org>
Anonymous Maarten fd3f3810 2022-06-04T03:16:27 Initialize SDL_STATIC_PIC from CMAKE_POSITION_INDEPENDENT_CODE
Simon McVittie 65a3453b 2022-05-26T16:02:15 build: Compile with large inode number support where possible On filesystems with large inode numbers, such as overlayfs, attempting to stat() a file on a 32-bit system using legacy syscalls can fail with EOVERFLOW. If we opt-in to more modern "large file support" syscalls, then source code references to functions like stat() are transparently replaced with ABIs that support large file sizes and inode numbers, such as stat64(). This cannot safely be done globally by Linux distributions, because some libraries expose types like `off_t` or `struct stat` in their ABI, meaning that enabling large file support would be an incompatible change that would cause crashes. However, SDL appears to be careful to avoid these types in header files, so it should be OK to enable this. Signed-off-by: Simon McVittie <smcv@collabora.com>
Anonymous Maarten 799d39a3 2022-06-03T23:08:22 Make the sdl2-config script relocatable
Anonymous Maarten 5ec2d46f 2022-06-03T20:12:52 cmake: make SDL2Config.cmake compatible with autotools' sdl2-config.cmake
Anonymous Maarten 8e13cc30 2022-05-30T00:46:00 cmake: add 'compatible interface properties' to allow enforcing SDL2 sharedness
Anonymous Maarten 1087eaad 2022-05-27T01:40:11 cmake: install SDL2::SDL2test when configuring with SDL2_TEST enabled
Tim Schumacher 12cc636c 2022-05-21T23:33:31 Make sdl2-config prefixes configurable again The installation prefix ended up being hard-coded into the `sdl2-config` script after the placeholders were accidentally removed in 6956f4aa1982b66b234026b46f7bb2dd44c67894.
Sam Lantinga 6da6a6cb 2022-05-21T13:51:21 Make sure Objective C files are built with the same flags as C files. Fixes https://github.com/libsdl-org/SDL/issues/5707
Cameron Cawley e0f3da49 2022-05-12T12:18:23 Remove unused SDL_ASSEMBLY_ROUTINES define
Alex Szpakowski ec8fa577 2022-05-07T21:57:23 macOS: always use Objective-C ARC (automatic ref counting). Change Cocoa SDL_VideoData and SDL_WindowData implementations from C structs to Objective-C objects, since bridging between C and ObjC is easier that way.
Cameron Cawley 9ef68857 2022-05-08T15:53:43 Fix MSVC ARM32 builds
Sam Lantinga 0c196021 2022-05-06T07:59:36 Applied 0004-Define-crt-macros.patch.txt from vcpkg ports
Simon McVittie 38ef6789 2020-11-25T13:30:29 test: Add a `make install` target for the tests This makes it more convenient to compile them alongside SDL, install them in an optional package and use them as smoke-tests or diagnostic tools. The default installation directory is taken from GNOME's installed-tests, which seems as good a convention as any other: https://wiki.gnome.org/Initiatives/GnomeGoals/InstalledTests Signed-off-by: Simon McVittie <smcv@collabora.com>
Simon McVittie 7d2808e3 2022-04-12T13:33:58 test: Run selected noninteractive tests at build-time In Autotools, these are run by `make -C ${builddir}/test check`. In CMake, they're run by `make -C ${builddir} test` or `ninja -C ${builddir} test` or `ctest --test-dir ${builddir}`. Signed-off-by: Simon McVittie <smcv@collabora.com>
Simon McVittie fff97c95 2022-05-04T16:40:11 build: Mechanically generate ABI versions from version number If we're strict about applying something resembling semantic versioning to the "marketing" version number, then we can mechanically generate the ABI version from it. This limits the range of valid micro versions (patchlevels) to 0-99. Signed-off-by: Simon McVittie <smcv@collabora.com>
Simon McVittie cd7c2f1d 2022-05-03T15:16:11 Switch versioning scheme to be the same as GLib and Flatpak For stable releases, this gives us the ability to make bugfix-only point releases such as 2.24.1 if we want to, and distinguish between them programmatically. For example, this ability could have been useful after 2.0.16 to fix Xwayland regressions, and after 2.0.18 to fix event loop regressions. For development releases, this gives us the ability to make multiple prereleases during the same feature cycle, and distinguish between them programmatically. For example, this would have been useful during 2.0.22 development, which went through three prereleases before reaching the final release. Signed-off-by: Simon McVittie <smcv@collabora.com>
Simon McVittie 63814ec7 2022-05-03T14:39:00 Add static assertions that the version number is consistent Signed-off-by: Simon McVittie <smcv@collabora.com>
Simon McVittie 22002d91 2022-05-03T14:09:12 docs/release_checklist.md: Document how/where to bump version numbers Signed-off-by: Simon McVittie <smcv@collabora.com>
Simon McVittie 2021a109 2022-05-03T20:37:03 cmake: Defer test subproject until after defining install/uninstall It looks as though something in the test subproject "leaks" into the main build system, causing us to try to install ${builddir}/test/sdl2.pc instead of the correct ${builddir}/sdl2.pc. Moving the tests subproject further down avoids this. Resolves: https://github.com/libsdl-org/SDL/issues/5604 Signed-off-by: Simon McVittie <smcv@collabora.com>
Ryan C. Gordon 7d7ec9c9 2022-04-26T16:41:28 x11: Remove XVidMode and Xinerama support. Fixes #1782.
Ozkan Sezer e9ff4fdd 2022-04-25T23:55:50 add SDL_bsearch
Sam Lantinga fa29e2d7 2022-04-25T13:45:51 Updated to version 2.0.23 for development
Ryan C. Gordon 634b9edc 2022-04-15T20:50:55 cmake: Fixed indenting and some oldschool `endif(TEXT)` things.
Semphris dc5bc523 2022-04-15T17:11:29 Added CMake option to disable the installer
Ivan Epifanov b7599613 2022-04-11T23:31:09 Vita: fix VIDEO_VITA_PVR flag
Sam Lantinga 505d6a4a 2022-04-08T18:18:56 Update version to 2.0.22 for release
Ozkan Sezer c0bb39e5 2022-04-02T02:50:02 check for HAVE_ROAPI_H in cmake and autotools, and update SDL_config_windows.h and SDL_config_winrt.h
Jaylon Gowie 8c542a35 2022-03-29T19:08:56 Desktop OpenGL 1.X/2.X PSVita Support
Ivan Epifanov cbdb67b4 2022-03-30T00:12:42 Vita: add SDL_GetPreferredLocales support
Ivan Epifanov 178ac196 2022-03-29T23:48:08 Vita: add audio capture support
Sam Lantinga d3cc5764 2022-03-18T07:36:16 Modern CMake doesn't need "LANGUAGE C" for Objective-C CMake 3.19 fails to compile Objective-C with that property set Fixes https://github.com/libsdl-org/SDL/issues/5418
pionere 85dff3e4 2022-03-16T08:58:52 emscripten: obey enable-misc/SDL_MISC settings