CMakeLists.txt


Log

Author Commit Date CI Message
Sam Lantinga f8de064c 2017-08-13T22:26:44 Added wchar.h to fix build on some platforms with new wcs* functions
Sam Lantinga f1829d95 2017-08-13T20:37:49 Added SDL_wcscmp()
Sam Lantinga 75d5f343 2017-08-11T21:17:10 Forgot to add function check for fopen64 to CMake build
Ryan C. Gordon 73c6cebb 2017-08-09T22:43:16 cmake: Pacify warning about Policy CMP0042 not being set.
Sam Lantinga 496337b3 2017-08-09T19:03:10 Fixed bug 3651 - CMake build does not install CMake package configuration tschwinger@elitemail.org Most ironically, although autoconf/automake-based builds install (pretty half-assed) CMake package configuration files, they're missing in installations resulting from CMake-based builds entirely. A proper configuration file typically also loads target exports (implemented in patch 3572, also fixing this issue - see my comment on that issue for details). I believe it would be best to let the dinosaurs go extinct and redirect all build efforts to the CMake end for two reasons: 1. It potentially provides the best user experience, but you'd have to give it some love and ship with less quirky buildfiles. 2. It would force distros to build SDL via CMake and thus would ensure target exports are actually available everywhere. Various CMake patches I submitted today in summary (directly converted from the HG commits and `am`d onto a fork of a git mirror that happened to be on `tip`). https://github.com/tschw/SDL/commits/patched Fixing #2576 #3572, #3613, and this fresh ticket, which is almost entirely advertisement ;). These already do to make SDL much less of a quirky fella to have in your dependency tree...
Sam Lantinga 56363ebf 2017-08-02T10:22:48 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
Sam Lantinga 3c09265d 2017-07-10T18:31:28 Fixed bug 3609 - Windows build fails due to conflicting types for 'XINPUT_GAMEPAD_EX' Ozkan Sezer (In reply to Ryan C. Gordon from comment #9) > I've put this patch in as https://hg.libsdl.org/SDL/rev/7213ae46e870 ...can > you verify this works on the latest MinGW? > > Thanks, > --ryan. This patch is wrong: the structure in question has nothing to do with any gcc version in use. I suggest reverting this adding a conigury check for it, instead. Something like the following should do it: (configure needs regenerating.)
Sam Lantinga c1cd93e5 2017-06-12T16:35:34 Fixed bug 3670 - CMake IOS haptic error
Ryan C. Gordon e5f4a71f 2017-06-11T16:00:45 cmake: iOS haptic section was referencing power source code (thanks, Martin!). Fixes Bugzilla #3670.
Olli Kallioinen 2b5a5c51 2017-06-08T22:07:55 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
Ryan C. Gordon d9039f23 2017-06-08T13:27:58 jack: Initial shot at a JACK audio target. http://jackaudio.org/ Fixes Bugzilla #2163. (with several more commits following to improve this code.)
Ryan C. Gordon dc8a22cd 2017-06-06T13:39:29 cmake: don't use /NODEFAULTLIB if we are using the C runtime (thanks, Rob!). Fixes Bugzilla #3640.
Olli Kallioinen 11289b76 2017-06-04T21:25:57 Android cmake build fixed to work with the official android gradle plugin
Ryan C. Gordon a7fc2822 2017-05-24T19:56:59 audio: rename bsd target to netbsd. Apparently this is no longer a generic BSD audio target, and hasn't been for years, so rename it for NetBSD.
Ryan C. Gordon 0e7530b0 2017-02-23T22:38:04 cmake: add WASAPI audio target to the build (thanks, Martin!). Fixes Bugzilla #3588.
Ryan C. Gordon 5ea0c893 2017-01-24T12:20:41 CMake: fixed logic error in setting -mfpmath=387. Fixes Bugzilla #3565.
Ryan C. Gordon 3594bf8e 2017-01-23T01:05:44 audio: Wired up new SSE code to build system.
Sam Lantinga df25258a 2017-01-06T20:43:53 Added configure and cmake support for libsamplerate
Ryan C. Gordon 35430a73 2016-11-17T01:15:16 cpuinfo: first attempt at SDL_HasNEON() implementation.
Sam Lantinga f3502c3c 2016-10-14T01:04:21 Fixed building with cmake when fcitx isn't installed
Sam Lantinga 34eebfba 2016-10-03T03:42:10 Fixed setting the version info in the shared library when using CMake Ray Molenkamp When building sdl as shared lib, the version info is lacking in the final binary. CMake gathers the right resource files into ${VERSION_SOURCES} but then doesn't do anything with them.
Sam Lantinga c9be93c6 2016-10-01T15:11:18 Fixed bug 3078 - cmake: fix sdl2.m4 install location on cross hosts Timo Gurr On cross hosts running autotools for SDL2_gfx-1.0.1 fails to find sdl2.m4: eautoreconf: running in /var/tmp/paludis/build/media-libs-SDL2_gfx-1.0.1/work/SDL2_gfx-1.0.1 ... aclocal aclocal-1.13: warning: autoconf input should be named 'configure.ac', not 'configure.in' configure.in:128: warning: macro 'AM_PATH_SDL2' not found in library libtoolize --copy --force --automake aclocal aclocal-1.13: warning: autoconf input should be named 'configure.ac', not 'configure.in' configure.in:128: warning: macro 'AM_PATH_SDL2' not found in library autoconf configure.in:128: error: possibly undefined macro: AM_PATH_SDL2 If this token and others are legitimate, please use m4_pattern_allow. See the Autoconf documentation. * Failed Running autoconf ! SDL2 installs it to /usr/x86_64-pc-linux-gnu/share/aclocal on cross hosts, attached patch makes use of CMAKE_INSTALL_FULL_DATAROOTDIR to support correctly installing to the arch independent location /usr/share/aclocal.
Alex Szpakowski 571f4ce8 2016-10-01T17:05:29 Fix CMake setting an incorrect video backend on iOS
Sam Lantinga 671f2a49 2016-10-01T12:54:48 Fixed bug 3268 - CMAKE: ios fixes Martin Gerhardy ios is not properly handled in the cmake file. this patch is a start to do so - it properly builds for me with it.
Sam Lantinga bb24662c 2016-10-01T12:48:08 Fixed bug 3301 - IBus support on Linux with CMake joe.gsoc16 I recently looked into Unicode support in SDL2 and realized that SDL_TEXTEDITING doesn't get triggered at all (Japanese IME). According to others on IRC it works fine on Windows/Mac but not for me on (arch)Linux. When compiling SDL with autotools, IBus support is enabled by default but not so with CMake. I never used CMake before but got it working and also included that pkg-config determines flags for dbus (FIXME in CMakeLists).
Sam Lantinga e45698d2 2016-09-28T22:24:01 Updated version to 2.0.5 in preparation for release
Sam Lantinga e5070d20 2016-09-15T08:57:56 Fixed set of libraries needed to build on Mac OS X
Sam Lantinga 93d42e2d 2016-09-15T08:46:14 Hopefully fixed the cmake build on Mac OS X
Jukka Jyl?nki 264e996e 2016-09-13T00:03:50 Fix CMake CMAKE_REQUIRED_FLAGS handling to preserve existing CMake flags required by Emscripten toolchain.
Charlie Birks 42feccea 2016-09-13T00:03:40 Include timers when using cmake (#29)
Ryan C. Gordon 6188c334 2016-09-04T01:42:46 mac: Patched to compile with CMake project.
Alex Szpakowski 2c3bf665 2016-03-18T22:15:53 Windows CMake: don't try to link dxguid, it's unavailable when using Visual Studio's XP-compatible toolset.
Sam Lantinga e5d575b9 2016-01-16T21:58:49 Expose the EGL display and window for Vivante SDL windows
Ryan C. Gordon 1615b2e2 2016-01-08T07:32:51 CMake: only set "-O3 -g" defaults if CMAKE_BUILD_TYPE wasn't set at all.
Sam Lantinga 757e994e 2016-01-07T17:21:50 Fixed --enable-new-dtags check with cmake
Sam Lantinga dc5f05bb 2016-01-07T16:42:30 Use --enable-new-dtags to set RUNPATH rather than RPATH so that LD_LIBRARY_PATH is not overridden by the application.
Ryan C. Gordon bb1e2bd0 2016-01-05T05:44:32 CMake: Turned off Mac OS X rpath warning kludge. Apparently CMake errors out if it doesn't know this policy, and we don't otherwise require CMake 3.0 yet. Sigh.
Ryan C. Gordon e6e62bee 2016-01-05T01:26:32 CMake: Let static libraries optionally be built with Position Independent Code.
Ryan C. Gordon 008a6abd 2016-01-05T01:25:54 CMake: use the old MACOSX_RPATH behavior (for now), silence the warning.
Ryan C. Gordon 1373e890 2016-01-04T22:58:38 Try to build with GCC's -Wdeclaration-after-statement. This will help catch things that'll cause issues on C89 compilers before we send them on to fail on Buildbot.
Ryan C. Gordon 1240f8e0 2016-01-03T20:52:44 CMake: Don't make a libSDL2.so symlink on Mac OS X (do .dylib instead).
Alex Szpakowski b0d8dfcd 2015-12-31T15:26:40 CMake: Fixed building for Windows with VS2015 (bug #3080). - Don't try to link with the Visual C runtime. - Avoid code generation that would use functions from the VC runtime.
Ryan C. Gordon 61518bce 2015-12-29T00:57:24 CMake: Changes to get CMake project to work with Android (thanks, Martin!). Fixes Bugzilla #3194. (but note that Bugzilla #3200 still needs to be resolved to get this really going on Android, at a minimum.)
Ryan C. Gordon 7e679ed2 2015-12-29T00:36:03 CMake: fixed a failure to reset CMAKE_REQUIRED_FLAGS (thanks, Martin!). This would break Emscripten builds with the CMake project files (etc). Fixes Bugzilla #3197.
Ryan C. Gordon c9927bbb 2015-12-29T00:24:37 CMake: don't try to use the Linux joystick code on Android (thanks, Martin!). Fixes Bugzilla #3201.
Ryan C. Gordon 7ca3b270 2015-12-29T00:02:43 CMake: Fixed to work on Windows 8 SDK (thanks, Martin!). Fixes Bugzilla #3207.
Alex Szpakowski 42f282cc 2015-08-28T19:10:46 Fix bug 3081: CMake configuration auto-disables OpenGL ES support on Windows. Thanks to EntranceJew for the patch.
Alex Szpakowski d154e6c6 2015-08-28T19:05:24 Fixed bug 3098: CMake project never enables xinput support on Windows. Thanks to EntranceJew for debugging the issue.
Philipp Wiesemann 0e45984f 2015-06-21T17:33:46 Fixed crash if initialization of EGL failed but was tried again later. The internal function SDL_EGL_LoadLibrary() did not delete and remove a mostly uninitialized data structure if loading the library first failed. A later try to use EGL then skipped initialization and assumed it was previously successful because the data structure now already existed. This led to at least one crash in the internal function SDL_EGL_ChooseConfig() because a NULL pointer was dereferenced to make a call to eglBindAPI().
Ryan C. Gordon 3a84f7b5 2015-06-18T22:34:39 CMake fixes for MingW (thanks, Ozkan!). - ignore DXSDK_DIR for mingw environment - use dxerr8 instead of dxerr for mingw. Partially fixes Bugzilla #3016.
Sam Lantinga aee05522 2015-06-13T10:47:55 Fixed bug 3009 - Cannot compile SDL2 on Windows CMakeLists.txt was missing handling for running CMake with -DDIRECTX=0
Ryan C. Gordon f5dce3c6 2015-06-07T20:15:09 CMake: default to shared library builds being enabled.
Ryan C. Gordon 75a3ad1d 2015-04-22T20:25:19 CMake: Slightly better fix for installation target (thanks, Anthony!). Fixes Bugzilla #2474.
Ryan C. Gordon b72938c8 2015-04-20T12:22:44 Windows: Always set the system timer resolution to 1ms by default. An existing hint lets apps that don't need the timer resolution changed avoid this, to save battery, etc, but this fixes several problems in timing, audio callbacks not firing fast enough, etc. Fixes Bugzilla #2944.
Alex Szpakowski fe6c797c 2015-04-10T23:30:31 Fixed an iOS view orientation issue when SDL_GL_CreateContext or SDL_CreateRenderer is called.
Ryan C. Gordon e7ba78a3 2015-04-07T21:52:22 CMake: Dependency variable for FUSIONSOUND_SHARED was wrong (thanks, Kaleb!). Fixes Bugzilla #2055.
Ryan C. Gordon 9470f4a2 2015-03-24T03:21:57 Better fixes for CMake subsystem enabling (thanks, Sebastian!). Fixes Bugzilla #2875.
Ryan C. Gordon 3c76d2ff 2015-03-20T21:57:15 Several corrections to the CMake project files (thanks, Ozkan!). Fixes Bugzilla #2732.
Ryan C. Gordon 70191a93 2015-03-20T11:51:03 CMake: Don't search for the OpenGL library on Mac OS X. It's always there.
Ryan C. Gordon c1091f32 2015-03-20T10:35:42 CMake project files no longer force you to link against Wayland or Mir libs.
Ryan C. Gordon d8988ea8 2015-03-20T10:02:45 Fixed some defaults in CMake project file. Fixes not finding dlopen(), etc.
Edward Rudd b88ca1b4 2015-02-10T16:28:56 the last parameter of XChangeProperty is the number of elements.. and when the element format is 32.. the element is "long" so we have 5 long elements here. Yes this seems confusing as on mac+linux Long is either 32 or 64bits depending on the architecture, but this is how the X11 protocol is defined. Thus 5 is the correct value for the nelts here. Not 5 or 10 depending on the architecture. More info on the confusion https://bugs.freedesktop.org/show_bug.cgi?id=16802
Philipp Wiesemann b48e54aa 2015-01-26T22:00:29 Fixed bug 2802 - [patch] Fix android build compiling in wrong filesystem implementation Jonas Kulla The configure script didn't differentiate between Linux and Android, unconditionally compiling in the unix implementation of SDL_sysfilesystem.c. I'm probably one of the very few people building SDL for android using classic configure + standalone toolchain, so this has gone undetected all along.
Ryan C. Gordon f15d13d6 2015-01-18T02:50:14 CMake: Removed unused variable (thanks, Felix!). "MACOSX_COREAUDIO" is actually an internal #define set up elsewhere, and this CMake var is never exported past the CMake script anyhow. Partially fixes Bugzilla #2807.
Felix H. Dahlke c4275f95 2015-01-17T04:36:15 Fixed bug 2807 - Not using CoreAudio on OS X when built via CMake
Ryan C. Gordon fe40a172 2014-12-18T00:19:52 Initial merge of Emscripten port! With this commit, you can compile SDL2 with Emscripten ( http://emscripten.org/ ), and make your SDL-based C/C++ program into a web app. This port was due to the efforts of several people, including: Charlie Birks, Sathyanarayanan Gunasekaran, Jukka Jyl?nki, Alon Zakai, Edward Rudd, Bruce Mitchener, and Martin Gerhardy. (Thanks, everyone!)
Ryan C. Gordon 77ccc412 2014-12-13T02:40:52 CMake: Minor cleanup up on the new SDL_*_ENABLED_BY_DEFAULT vars.
Ryan C. Gordon a228b67d 2014-12-13T02:33:52 CMake: Replace "else(condition)" with "else()", etc. Bumped required CMake version to 2.8. Thanks to the SDL/Emscripten porting team for this cleanup.
David Ludwig 70438be2 2014-12-03T10:55:23 WinRT: fixed bug whereby SDL would override an app's default orientation WinRT apps can set a default, preferred orientation via a .appxmanifest file. SDL was overriding this on app startup, and making the app use all possible orientations (landscape and portrait). Thanks to Eric Wing for the heads up on this!
Philipp Wiesemann 9c398852 2014-11-22T22:20:40 Corrected header file documentation comment.
Sam Lantinga 251ca855 2014-10-15T09:18:17 Expanded the iMX6 video driver into a general Vivante video driver that works across multiple SoCs
Pierre-Loup A. Griffais 24c86b55 2014-09-11T19:24:42 [X11] Reconcile logical keyboard state with physical state on FocusIn since the window system doesn't do it for us like other platforms. This prevents sticky keys and missed keys when going in and out of focus, for example Alt would appear to stick if switching away from an SDL app with Alt-Tab and had to be pressed again. CR: Sam
mastermind 50cc4efe 2014-09-10T08:54:01 Freescale i.MX6 video driver --- CMakeLists.txt | 2 + cmake/sdlchecks.cmake | 20 +++ configure | 51 +++++++ configure.in | 28 ++++ include/SDL_config.h.cmake | 1 + include/SDL_config.h.in | 1 + src/video/SDL_sysvideo.h | 3 + src/video/SDL_video.c | 3 + src/video/mx6/SDL_mx6events.c | 45 ++++++ src/video/mx6/SDL_mx6events_c.h | 31 +++++ src/video/mx6/SDL_mx6opengles.c | 211 ++++++++++++++++++++++++++++ src/video/mx6/SDL_mx6opengles.h | 68 +++++++++ src/video/mx6/SDL_mx6video.c | 301 ++++++++++++++++++++++++++++++++++++++++ src/video/mx6/SDL_mx6video.h | 78 +++++++++++ 14 files changed, 843 insertions(+) create mode 100644 src/video/mx6/SDL_mx6events.c create mode 100644 src/video/mx6/SDL_mx6events_c.h create mode 100644 src/video/mx6/SDL_mx6opengles.c create mode 100644 src/video/mx6/SDL_mx6opengles.h create mode 100644 src/video/mx6/SDL_mx6video.c create mode 100644 src/video/mx6/SDL_mx6video.h
Sam Lantinga 7242e814 2014-09-02T06:55:47 Updated version to 2.0.4
Sam Lantinga 059579e4 2014-08-23T10:47:50 Fixed bug 2696 - Mac: fix display mode refresh rate calculation Alex Szpakowski SDL's Cocoa backend uses the CGDisplayMode API to get refresh rate information about a display mode, but CGDisplayModeGetRefreshRate will return 0 on most non-CRT monitors. The only way I know of to get correct refresh rate information in OS X is via the CoreVideo DisplayLink API. I have attached a patch which tries to use the CVDisplayLinkGetNominalOutputVideoRefreshPeriod function if CGDisplayModeGetRefreshRate fails, which fixes display mode refresh rate information on the monitors I tested. The CVDisplayLink API requires linking with the CoreVideo framework, and the patch updates the various build files to do so.
Sam Lantinga 04f74225 2014-08-19T21:13:07 Fixed bug 2691 - Disabling shared library prevent cmake configuration hotgloupi Configuring using "cmake -DSDL_STATIC=1 -DSDL_SHARED=0" generate and error in CMakeLists.txt at line 1334: CMake Error at CMakeLists.txt:1334 (install): install TARGETS given target "SDL2" which does not exist in this directory. This install rule shouldn't be present when the DLL has been disabled
Sam Lantinga f17587df 2014-08-17T13:49:53 Reset CMAKE_REQUIRED_FLAGS after test
Sam Lantinga 95ced654 2014-08-17T13:15:45 cmake: add -Wl,--no-undefined to GCC linker flags This way unresolved symbols will be detected when linking the shared library version.
Sam Lantinga 569e595a 2014-08-17T13:15:09 cmake: add -Wall/-Wshadow to GCC compilation flags
Sam Lantinga 1ea86978 2014-08-17T13:11:55 Removed SDL_round() because the license wasn't compatible with zlib
Sam Lantinga 984d0fc4 2014-08-16T23:28:40 Fixed bug 2683 - Raspberry PI support using CMake Tobias Himmer this patch adds a check to the CMake build script to detect whether the VideoCore API is available. If it is found, it enables SDL_VIDEO_DRIVER_RPI and will also add the needed include/library directory flags to CMAKE_C_FLAGS so the subsequent check for GLES succeeds in picking up the headers. Seems to work fine on Raspbian.
Sam Lantinga 4e7db78e 2014-08-16T23:23:15 Added SDL_round(), contributed by Benoit Pierre - thanks!
Sam Lantinga 384c2047 2014-08-16T15:18:21 Fixed building on Windows with CMake
Sam Lantinga 553028c9 2014-06-22T11:02:56 Partial fix for bug 2556 - add compilation flag -Wshadow I added -Wshadow and then turned it off again because of massive variable shadowing in the blit macros. Feel free to go through that code and fix these if you want. Just uncomment CheckWarnShadow in configure.in if you want to try this.
Wander Lairson Costa 2334aa86 2014-06-16T10:58:09 Add suport for "make uninstall" to cmake.
Sam Lantinga 47e0aa0e 2014-06-07T20:43:12 Fixed building on command line Mac OS X
Ryan C. Gordon 2a7aa9bd 2014-05-06T00:13:07 Fix build on Windows targets without dxgi.h, like MingW32.
David Ludwig 3dcb451f 2014-04-09T21:29:19 Added a README file regarding WinRT support To note, this file is currently formatted with CRLF line endings, rather than LF, to allow the file to be viewed with Notepad.
Brandon Schaefer b0502ce8 2014-03-25T14:33:34 Re-enable Mir/Wayland support now that 2.0.3 has been released.
Ryan C. Gordon b2fcdfca 2014-03-11T10:33:51 Disable Wayland/Mir again for 2.0.3; it's a quick, brown-paper-bag release. We'll enable it by default for 2.0.4. Hopefully. :) ( http://www.catb.org/jargon/html/B/brown-paper-bag-bug.html )
Sam Lantinga 1a35f32b 2014-03-10T01:51:03 Converted David Ludwig's D3D11 renderer to C and optimized it. The D3D11 renderer is now slightly faster than D3D9 on my Windows 8 machine (testsprite2 runs at 3400 FPS vs 3100 FPS) This will need tweaking to fix the Windows RT build.
Sam Lantinga c167d1f6 2014-03-09T10:38:30 Updated SDL to version 2.0.3
Ryan C. Gordon 0f1a72c0 2014-03-08T15:32:12 Enable Wayland and Mir in configure/cmake scripts, now that 2.0.2 has shipped.
Ryan C. Gordon 2b92d9b4 2014-03-07T00:18:37 CMake: Don't use /NODEFAULTLIB on Windows unless we're Visual Studio.
Ryan C. Gordon b814f23a 2014-02-24T11:24:48 CMake: Fixed build on Mac OS X.
Edward Rudd 7f4c6a9c 2014-02-10T10:53:02 Fix Cmake so generated SOname matches autoconf's #.
Sam Lantinga 853334af 2014-02-09T03:09:56 Updated SDL to version 2.0.2
Sam Lantinga c3c2964d 2014-02-09T02:04:40 Possibly fixed bug 2250 - Cmake: SDL2 Doesn't install DLLs on Windows ernest.lee [Exec] CMake Error at cmake_install.cmake:151 (FILE): [13:37:43][Exec] file INSTALL cannot find [13:37:43][Exec] "C:/TeamCity/buildAgent/work/2e3d17a492e75daf/Build/libSDL2.so". The cmake INSTALL project doesn't work because it uses Linux so shared library paths. Windows uses dlls and I think cygwin also uses dlls. I've included this patch. Can you check if it works?
Ryan C. Gordon 0d9443d3 2014-02-03T11:59:17 Temporarily default Wayland and Mir to disabled, for 2.0.2 release. We'll flip the default back to enabled right after 2.0.2 is finalized, and try to declare them stable and ready by 2.0.3. Those that have an interest in supporting them in 2.0.2 can manually enable them in the configure script with --enable-video-wayland and/or --enable-video-mir.
Ryan C. Gordon 19f8c622 2014-02-02T23:41:46 Added Mir video target (thanks, Brandon!).