Commit graph

80 commits

Author SHA1 Message Date
Alex Szpakowski
2ccbf4aa4f 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.
2015-12-31 15:26:40 -04:00
Ryan C. Gordon
54ded44867 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.)
2015-12-29 00:57:24 -05:00
Ryan C. Gordon
3609add147 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.
2015-12-29 00:36:03 -05:00
Ryan C. Gordon
b5cdb18893 CMake: don't try to use the Linux joystick code on Android (thanks, Martin!).
Fixes Bugzilla #3201.
2015-12-29 00:24:37 -05:00
Ryan C. Gordon
1599e941eb CMake: Fixed to work on Windows 8 SDK (thanks, Martin!).
Fixes Bugzilla #3207.
2015-12-29 00:02:43 -05:00
Alex Szpakowski
7ea66ca4bd Fix bug 3081: CMake configuration auto-disables OpenGL ES support on Windows.
Thanks to EntranceJew for the patch.
2015-08-28 19:10:46 -03:00
Alex Szpakowski
449589fbe8 Fixed bug 3098: CMake project never enables xinput support on Windows.
Thanks to EntranceJew for debugging the issue.
2015-08-28 19:05:24 -03:00
Ryan C. Gordon
aa941e48c9 CMake fixes for MingW (thanks, Ozkan!).
- ignore DXSDK_DIR for mingw environment
- use dxerr8 instead of dxerr for mingw.

Partially fixes Bugzilla #3016.
2015-06-18 22:34:39 -04:00
Sam Lantinga
6c13c2bf5c Fixed bug 3009 - Cannot compile SDL2 on Windows
CMakeLists.txt was missing handling for running CMake with -DDIRECTX=0
2015-06-13 10:47:55 -07:00
Ryan C. Gordon
1def23c4b1 CMake: default to shared library builds being enabled. 2015-06-07 20:15:09 -04:00
Ryan C. Gordon
9607613a10 CMake: Slightly better fix for installation target (thanks, Anthony!).
Fixes Bugzilla #2474.

--HG--
extra : rebase_source : cb0c8062e17b7d6d0bb4761e4ad3512a34b0a806
2015-04-22 20:25:19 -04:00
Ryan C. Gordon
fc181d4b0e CMake: Dependency variable for FUSIONSOUND_SHARED was wrong (thanks, Kaleb!).
Fixes Bugzilla #2055.
2015-04-07 21:52:22 -04:00
Ryan C. Gordon
2b9c893e8b Better fixes for CMake subsystem enabling (thanks, Sebastian!).
Fixes Bugzilla #2875.
2015-03-24 03:21:57 -04:00
Ryan C. Gordon
5e4b3fca00 Several corrections to the CMake project files (thanks, Ozkan!).
Fixes Bugzilla #2732.
2015-03-20 21:57:15 -04:00
Ryan C. Gordon
2de05b5d5c CMake: Don't search for the OpenGL library on Mac OS X. It's always there. 2015-03-20 11:51:03 -04:00
Ryan C. Gordon
2eecc49426 CMake project files no longer force you to link against Wayland or Mir libs. 2015-03-20 10:35:42 -04:00
Ryan C. Gordon
ae08aea517 Fixed some defaults in CMake project file.
Fixes not finding dlopen(), etc.
2015-03-20 10:02:45 -04:00
Ryan C. Gordon
9d2b5dd67d 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.
2015-01-18 02:50:14 -05:00
Felix H. Dahlke
5bd19d340d Fixed bug 2807 - Not using CoreAudio on OS X when built via CMake 2015-01-17 04:36:15 +01:00
Ryan C. Gordon
c2c793b74c CMake: Minor cleanup up on the new SDL_*_ENABLED_BY_DEFAULT vars.
--HG--
extra : rebase_source : af065b92bfba14673c2c76606339fe6a1e449e86
2014-12-13 02:40:52 -05:00
Ryan C. Gordon
de88474dda 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!)

--HG--
extra : rebase_source : 97af74c8a5121e926ebe89f123536b5dd6681695
2014-12-18 00:19:52 -05:00
Ryan C. Gordon
c2ebb6b09f CMake: Replace "else(condition)" with "else()", etc.
Bumped required CMake version to 2.8.

Thanks to the SDL/Emscripten porting team for this cleanup.

--HG--
extra : rebase_source : 2b9bf6b045956f4607d2911265a136359a3fbdcb
2014-12-13 02:33:52 -05:00
Sam Lantinga
ab1bbeb596 Expanded the iMX6 video driver into a general Vivante video driver that works across multiple SoCs 2014-10-15 09:18:17 -07:00
mastermind
97fde15915 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
2014-09-10 08:54:01 -07:00
Sam Lantinga
98e9c13a13 Updated version to 2.0.4 2014-09-02 06:55:47 -07:00
Sam Lantinga
46e3d957ab 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.
2014-08-23 10:47:50 -07:00
Sam Lantinga
755f4ad22e 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
2014-08-19 21:13:07 -07:00
Sam Lantinga
e49acc1f5b Reset CMAKE_REQUIRED_FLAGS after test 2014-08-17 13:49:53 -07:00
Sam Lantinga
a8d9c26db2 cmake: add -Wl,--no-undefined to GCC linker flags
This way unresolved symbols will be detected when linking the shared
library version.
2014-08-17 13:15:45 -07:00
Sam Lantinga
3c747234b3 cmake: add -Wall/-Wshadow to GCC compilation flags 2014-08-17 13:15:09 -07:00
Sam Lantinga
b3e4782510 Removed SDL_round() because the license wasn't compatible with zlib 2014-08-17 13:11:55 -07:00
Sam Lantinga
67228e5e8c 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.
2014-08-16 23:28:40 -07:00
Sam Lantinga
5acb7c63d1 Added SDL_round(), contributed by Benoit Pierre - thanks! 2014-08-16 23:23:15 -07:00
Sam Lantinga
2afb7573b6 Fixed building on Windows with CMake 2014-08-16 15:18:21 -07:00
Sam Lantinga
313e3b80f2 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.
2014-06-22 11:02:56 -07:00
Wander Lairson Costa
c38d784fc2 Add suport for "make uninstall" to cmake.
--HG--
extra : rebase_source : 2769e11d0295638a1c4aea6118b984ece01ed4ba
2014-06-16 10:58:09 -03:00
Sam Lantinga
7ffc6a3040 Fixed building on command line Mac OS X 2014-06-07 20:43:12 -07:00
Ryan C. Gordon
a8ab12a0d6 Fix build on Windows targets without dxgi.h, like MingW32. 2014-05-06 00:13:07 -04:00
Brandon Schaefer
fdf9b30018 Re-enable Mir/Wayland support now that 2.0.3 has been released. 2014-03-25 14:33:34 -07:00
Ryan C. Gordon
2067e0d28a 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 )

--HG--
extra : rebase_source : 30eae3abc592f26538584fefcaf2dd49be3cfa89
2014-03-11 10:33:51 -04:00
Sam Lantinga
1348631206 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.

--HG--
rename : src/render/direct3d11/SDL_render_d3d11.cpp => src/render/direct3d11/SDL_render_d3d11.c
2014-03-10 01:51:03 -07:00
Sam Lantinga
b821f84418 Updated SDL to version 2.0.3 2014-03-09 10:38:30 -07:00
Ryan C. Gordon
9dbbedbea0 Enable Wayland and Mir in configure/cmake scripts, now that 2.0.2 has shipped. 2014-03-08 15:32:12 -05:00
Ryan C. Gordon
057c292553 CMake: Don't use /NODEFAULTLIB on Windows unless we're Visual Studio. 2014-03-07 00:18:37 -05:00
Ryan C. Gordon
d210539a55 CMake: Fixed build on Mac OS X.
--HG--
extra : rebase_source : f4cf7d23db97cdaf223be63fa93c4fa713c68276
2014-02-24 11:24:48 -05:00
Edward Rudd
20f44801d9 Fix Cmake so generated SOname matches autoconf's #.
--HG--
extra : rebase_source : 8aed06833632e488a600940bb54b212e69e5f1ec
extra : amend_source : e7f4179f3048af5092933c7bc2bbe77b7304daa0
2014-02-10 10:53:02 -05:00
Sam Lantinga
e49f7fcdf8 Updated SDL to version 2.0.2 2014-02-09 03:09:56 -08:00
Sam Lantinga
245621ceb0 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?
2014-02-09 02:04:40 -08:00
Ryan C. Gordon
2b76b6f34d 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.
2014-02-03 11:59:17 -05:00
Ryan C. Gordon
adb4d0965e Added Mir video target (thanks, Brandon!).
--HG--
extra : rebase_source : 9564f37024fe0ffe8139803eeb198c9a1fd142d9
extra : histedit_source : 872a8f12b9891854366f6932c7240fca7c2fad9a%2Ca3feb8654d46fbe0caeea33ccbc90e4b457dbc11
2014-02-02 23:41:46 -05:00