Skip to content

Commit

Permalink
Make it so that the project compile on the Mac platform.
Browse files Browse the repository at this point in the history
  • Loading branch information
ricje committed Mar 4, 2012
1 parent dbb8ca7 commit 585d934
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
8 changes: 6 additions & 2 deletions CMakeLists.txt
Expand Up @@ -111,8 +111,12 @@ endif()
find_package(Doxygen)
find_package(PythonInterp)
if(USE_SDL)
set(SDL_BUILDING_LIBRARY 1) # Required to avoid linking with SDLmain...
find_package(SDL 1.2 EXACT)
if(!APPLE)
# Required to avoid linking with SDLmain except for OS X where it is necessary
# due to the need to have NSApplication correctly setup by SDLmain.
set(SDL_BUILDING_LIBRARY 1)
endif()
find_package(SDL 1.2 EXACT)
endif()

if(MSVC)
Expand Down
7 changes: 7 additions & 0 deletions src/core/Core.cpp
Expand Up @@ -147,6 +147,13 @@ ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.

#include "window/RenderWindow.h"

// Under OS X we want SDLmain to replace the entry point with its own.
// TODO: I don't think this is wanted and we'll need to add the NSApplication setup
// on the Arx Libertatis side instead of SDLmain's.
#if defined(__APPLE__) && defined(__MACH__)
#include <SDL.h>
#endif

class TextManager;

using std::min;
Expand Down

0 comments on commit 585d934

Please sign in to comment.