Permalink
Browse files

Added support for OS X 10.10

Note: this only fix the compilation process. SFML was not thoroughly
tested on this OS yet.
  • Loading branch information...
mantognini committed Sep 21, 2014
1 parent e157e7a commit 2427aaf3bb641b48137cebf81f3d65f2a70d7523
Showing with 2 additions and 2 deletions.
  1. +1 −1 cmake/Config.cmake
  2. +1 −1 src/SFML/Window/OSX/WindowImplCocoa.mm
@@ -53,7 +53,7 @@ elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
# detect OS X version. (use '/usr/bin/sw_vers -productVersion' to extract V from '10.V.x'.)
EXEC_PROGRAM(/usr/bin/sw_vers ARGS -productVersion OUTPUT_VARIABLE MACOSX_VERSION_RAW)
STRING(REGEX REPLACE "10\\.([0-9]).*" "\\1" MACOSX_VERSION "${MACOSX_VERSION_RAW}")
STRING(REGEX REPLACE "10\\.([0-9]+).*" "\\1" MACOSX_VERSION "${MACOSX_VERSION_RAW}")
if(${MACOSX_VERSION} LESS 7)
message(FATAL_ERROR "Unsupported version of OS X: ${MACOSX_VERSION_RAW}")
return()
@@ -225,7 +225,7 @@ void scaleOutXY(T& out, id<WindowImplDelegateProtocol> delegate)
// Register an application delegate if there is none
if (![[SFApplication sharedApplication] delegate])
[NSApp setDelegate:[[[SFApplicationDelegate alloc] init] autorelease]];
[[NSApplication sharedApplication] setDelegate:[[SFApplicationDelegate alloc] init]];

This comment has been minimized.

@Ceylo

Ceylo Sep 22, 2014

Contributor

I'm curious about why this change was needed. NSApp definition has changed?

This comment has been minimized.

@LaurentGomila

This comment has been minimized.

@Ceylo

Ceylo Sep 22, 2014

Contributor

Indeed, thanks :)

// Create menus for the application (before finishing launching!)
[SFApplication setUpMenuBar];

0 comments on commit 2427aaf

Please sign in to comment.