Commit graph

103 commits

Author SHA1 Message Date
Ryan C. Gordon
79c41b1692 cpuinfo: first attempt at SDL_HasNEON() implementation. 2016-11-17 01:15:16 -05:00
Sam Lantinga
52aad80cf2 Fixed building with cmake when fcitx isn't installed 2016-10-14 01:04:21 -07:00
Sam Lantinga
321fdcc4d1 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.
2016-10-03 03:42:10 -07:00
Sam Lantinga
6511fa631f 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.
2016-10-01 15:11:18 -07:00
Alex Szpakowski
d5032acfc4 Fix CMake setting an incorrect video backend on iOS 2016-10-01 17:05:29 -03:00
Sam Lantinga
13f3fd56de 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.
2016-10-01 12:54:48 -07:00
Sam Lantinga
7963feb3d1 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).
2016-10-01 12:48:08 -07:00
Sam Lantinga
79485875b5 Updated version to 2.0.5 in preparation for release 2016-09-28 22:24:01 -07:00
Sam Lantinga
8d2e2aad1d Fixed set of libraries needed to build on Mac OS X 2016-09-15 08:57:56 -07:00
Sam Lantinga
ed62fd26c8 Hopefully fixed the cmake build on Mac OS X 2016-09-15 08:46:14 -07:00
Jukka Jylänki
115362770b Fix CMake CMAKE_REQUIRED_FLAGS handling to preserve existing CMake flags required by Emscripten toolchain. 2016-09-13 00:03:50 -07:00
Charlie Birks
7c5a528749 Include timers when using cmake (#29) 2016-09-13 00:03:40 -07:00
Ryan C. Gordon
546eb95ce0 mac: Patched to compile with CMake project. 2016-09-04 01:42:46 -04:00
Alex Szpakowski
a1c1b64a93 Windows CMake: don't try to link dxguid, it's unavailable when using Visual Studio's XP-compatible toolset. 2016-03-18 22:15:53 -03:00
Sam Lantinga
438241a969 Expose the EGL display and window for Vivante SDL windows 2016-01-16 21:58:49 -08:00
Ryan C. Gordon
6b6cb64d42 CMake: only set "-O3 -g" defaults if CMAKE_BUILD_TYPE wasn't set at all. 2016-01-08 07:32:51 -05:00
Sam Lantinga
6aa640c48d Fixed --enable-new-dtags check with cmake 2016-01-07 17:21:50 -08:00
Sam Lantinga
cb0161a65f Use --enable-new-dtags to set RUNPATH rather than RPATH so that LD_LIBRARY_PATH is not overridden by the application. 2016-01-07 16:42:30 -08:00
Ryan C. Gordon
612da1ec3e 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.
2016-01-05 05:44:32 -05:00
Ryan C. Gordon
d76bd41747 CMake: Let static libraries optionally be built with Position Independent Code.
--HG--
extra : histedit_source : 3eb8e36a43b9760753b643401799020b8626b8f4
2016-01-05 01:26:32 -05:00
Ryan C. Gordon
7406930291 CMake: use the old MACOSX_RPATH behavior (for now), silence the warning.
--HG--
extra : histedit_source : 66863b16c3a9c4d7cdd43ae36bbcd869f5fcab73
2016-01-05 01:25:54 -05:00
Ryan C. Gordon
914be5d09c 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.

--HG--
extra : amend_source : 2a21da040338a9f796b8baf7038cf866ce54b595
2016-01-04 22:58:38 -05:00
Ryan C. Gordon
4f8b05a556 CMake: Don't make a libSDL2.so symlink on Mac OS X (do .dylib instead). 2016-01-03 20:52:44 -05:00
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