Commit Graph

73 Commits

Author SHA1 Message Date
Ryan C. Gordon
0c02fa5348 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
2c154373a4 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
293b492f3e CMake: default to shared library builds being enabled. 2015-06-07 20:15:09 -04:00
Ryan C. Gordon
4a6c28ebd7 CMake: Slightly better fix for installation target (thanks, Anthony!).
Fixes Bugzilla #2474.
2015-04-22 20:25:19 -04:00
Ryan C. Gordon
8a7dc40174 CMake: Dependency variable for FUSIONSOUND_SHARED was wrong (thanks, Kaleb!).
Fixes Bugzilla #2055.
2015-04-07 21:52:22 -04:00
Ryan C. Gordon
0bf82ff6cf Better fixes for CMake subsystem enabling (thanks, Sebastian!).
Fixes Bugzilla #2875.
2015-03-24 03:21:57 -04:00
Ryan C. Gordon
2e63291ed8 Several corrections to the CMake project files (thanks, Ozkan!).
Fixes Bugzilla #2732.
2015-03-20 21:57:15 -04:00
Ryan C. Gordon
815e9b19cc 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
4f2bdb2f84 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
e9240c67ef Fixed some defaults in CMake project file.
Fixes not finding dlopen(), etc.
2015-03-20 10:02:45 -04:00
Ryan C. Gordon
cd309e763f 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
fd9647d40b Fixed bug 2807 - Not using CoreAudio on OS X when built via CMake 2015-01-17 04:36:15 +01:00
Ryan C. Gordon
6968ae195a CMake: Minor cleanup up on the new SDL_*_ENABLED_BY_DEFAULT vars. 2014-12-13 02:40:52 -05:00
Ryan C. Gordon
a9626cb76e 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!)
2014-12-18 00:19:52 -05:00
Ryan C. Gordon
9168cf2ecc CMake: Replace "else(condition)" with "else()", etc.
Bumped required CMake version to 2.8.

Thanks to the SDL/Emscripten porting team for this cleanup.
2014-12-13 02:33:52 -05:00
Sam Lantinga
a2b98844f2 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
30f3e0e84c 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
7db5ff2019 Updated version to 2.0.4 2014-09-02 06:55:47 -07:00
Sam Lantinga
01ef33de7d 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
79e2a142ac 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
49d8536d76 Reset CMAKE_REQUIRED_FLAGS after test 2014-08-17 13:49:53 -07:00
Sam Lantinga
30737c29ad 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
a6174e60e4 cmake: add -Wall/-Wshadow to GCC compilation flags 2014-08-17 13:15:09 -07:00
Sam Lantinga
47f40262b5 Removed SDL_round() because the license wasn't compatible with zlib 2014-08-17 13:11:55 -07:00
Sam Lantinga
c80935bfe1 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
18fc7db9e2 Added SDL_round(), contributed by Benoit Pierre - thanks! 2014-08-16 23:23:15 -07:00
Sam Lantinga
5986bdc50d Fixed building on Windows with CMake 2014-08-16 15:18:21 -07:00
Sam Lantinga
8158b5baa0 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
cc7a1c0479 Add suport for "make uninstall" to cmake. 2014-06-16 10:58:09 -03:00
Sam Lantinga
aa5e287631 Fixed building on command line Mac OS X 2014-06-07 20:43:12 -07:00
Ryan C. Gordon
a256776578 Fix build on Windows targets without dxgi.h, like MingW32. 2014-05-06 00:13:07 -04:00
Brandon Schaefer
9ef2940ca5 Re-enable Mir/Wayland support now that 2.0.3 has been released. 2014-03-25 14:33:34 -07:00
Ryan C. Gordon
df5999c579 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 )
2014-03-11 10:33:51 -04:00
Sam Lantinga
6b5a5ea12a 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.
2014-03-10 01:51:03 -07:00
Sam Lantinga
c75b319a11 Updated SDL to version 2.0.3 2014-03-09 10:38:30 -07:00
Ryan C. Gordon
7c0ab6a669 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
bf8fd4aa4b CMake: Don't use /NODEFAULTLIB on Windows unless we're Visual Studio. 2014-03-07 00:18:37 -05:00
Ryan C. Gordon
4c05677cbf CMake: Fixed build on Mac OS X. 2014-02-24 11:24:48 -05:00
Edward Rudd
b45413975a Fix Cmake so generated SOname matches autoconf's #. 2014-02-10 10:53:02 -05:00
Sam Lantinga
1af9aa0b1e Updated SDL to version 2.0.2 2014-02-09 03:09:56 -08:00
Sam Lantinga
808c05198c 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
1957b51ba0 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
781022f33d Added Mir video target (thanks, Brandon!). 2014-02-02 23:41:46 -05:00
Ryan C. Gordon
7e262ea7ac Move to no-argument version of "endif()" in CMakeLists.txt. 2014-01-28 12:42:01 -05:00
Ryan C. Gordon
66a94ff5e7 Some CMake fixes for static linking on Windows from the OpenFL project. 2014-01-28 12:37:04 -05:00
Ryan C. Gordon
849ce6bd61 CMake: Enable missing timer subsystem on Mac OS X and Haiku. 2014-01-28 00:05:23 -05:00
Edward Rudd
3fada2b009 quick fix for CMAKE SOVERSION number so it matches what is output by the configure script 2014-01-25 16:08:39 -05:00
Edward Rudd
e0fae6226e correct grammar on UNIX missing dependency status notice. 2014-01-25 15:13:16 -05:00
Ryan C. Gordon
ba4ff4d9a3 Fixed dynamic loading of NAS in CMake project. 2014-01-21 13:58:15 -05:00
Ryan C. Gordon
3dfc14ade2 Implemented the Dynamic API magic. 2013-12-09 16:03:18 -05:00