projects
/
supertux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
4a8b226
)
Made compiles on MacOS X a bit smoother, activated MacOS-specific code for CMake...
author
Christoph Sommer
<mail@christoph-sommer.de>
Sun, 16 Dec 2007 00:30:02 +0000
(
00:30
+0000)
committer
Christoph Sommer
<mail@christoph-sommer.de>
Sun, 16 Dec 2007 00:30:02 +0000
(
00:30
+0000)
SVN-Revision: 5192
CMakeLists.txt
patch
|
blob
|
history
src/audio/openal_sound_source.hpp
patch
|
blob
|
history
src/audio/sound_manager.hpp
patch
|
blob
|
history
src/main.cpp
patch
|
blob
|
history
src/tinygettext/findlocale.cpp
patch
|
blob
|
history
src/video/glutil.hpp
patch
|
blob
|
history
tools/miniswig/CMakeLists.txt
patch
|
blob
|
history
diff --git
a/CMakeLists.txt
b/CMakeLists.txt
index
725b3f9
..
c15419b
100644
(file)
--- a/
CMakeLists.txt
+++ b/
CMakeLists.txt
@@
-56,6
+56,8
@@
MARK_AS_ADVANCED(
CMAKE_INSTALL_PREFIX
EXECUTABLE_OUTPUT_PATH
LIBRARY_OUTPUT_PATH
CMAKE_INSTALL_PREFIX
EXECUTABLE_OUTPUT_PATH
LIBRARY_OUTPUT_PATH
+ CMAKE_OSX_ARCHITECTURES
+ CMAKE_OSX_SYSROOT
)
## For autopackage
)
## For autopackage
@@
-266,6
+268,10
@@
IF(CMAKE_COMPILER_IS_GNUCC)
ADD_DEFINITIONS(-fno-strict-aliasing)
ENDIF(CMAKE_COMPILER_IS_GNUCC)
ADD_DEFINITIONS(-fno-strict-aliasing)
ENDIF(CMAKE_COMPILER_IS_GNUCC)
+IF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+ ADD_DEFINITIONS(-DMACOSX)
+ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+
## On Windows, add an icon
## On Windows, add an icon
diff --git
a/src/audio/openal_sound_source.hpp
b/src/audio/openal_sound_source.hpp
index
88f6454
..
4b03ed6
100644
(file)
--- a/
src/audio/openal_sound_source.hpp
+++ b/
src/audio/openal_sound_source.hpp
@@
-19,7
+19,12
@@
#ifndef __OPENAL_SOUND_SOURCE_H__
#define __OPENAL_SOUND_SOURCE_H__
#ifndef __OPENAL_SOUND_SOURCE_H__
#define __OPENAL_SOUND_SOURCE_H__
-#include <al.h>
+#ifndef MACOSX
+#include <AL/al.h>
+#else
+#include <OpenAL/al.h>
+#endif
+
#include "math/vector.hpp"
#include "sound_source.hpp"
#include "math/vector.hpp"
#include "sound_source.hpp"
diff --git
a/src/audio/sound_manager.hpp
b/src/audio/sound_manager.hpp
index
921b859
..
12f1944
100644
(file)
--- a/
src/audio/sound_manager.hpp
+++ b/
src/audio/sound_manager.hpp
@@
-23,8
+23,14
@@
#include <vector>
#include <map>
#include <vector>
#include <map>
-#include <alc.h>
-#include <al.h>
+#ifndef MACOSX
+#include <AL/alc.h>
+#include <AL/al.h>
+#else
+#include <OpenAL/alc.h>
+#include <OpenAL/al.h>
+#endif
+
#include "math/vector.hpp"
class SoundFile;
#include "math/vector.hpp"
class SoundFile;
diff --git
a/src/main.cpp
b/src/main.cpp
index
2148861
..
8144ecd
100644
(file)
--- a/
src/main.cpp
+++ b/
src/main.cpp
@@
-35,7
+35,9
@@
#include <SDL_image.h>
#ifdef MACOSX
#include <SDL_image.h>
#ifdef MACOSX
-# include <CoreFoundation/CoreFoundation.h>
+namespace supertux_apple {
+#include <CoreFoundation/CoreFoundation.h>
+}
#endif
#include "gameconfig.hpp"
#endif
#include "gameconfig.hpp"
@@
-168,13
+170,16
@@
static void init_physfs(const char* argv0)
}
#ifdef MACOSX
}
#ifdef MACOSX
+{
+ using namespace supertux_apple;
+
// when started from Application file on Mac OS X...
char path[PATH_MAX];
CFBundleRef mainBundle = CFBundleGetMainBundle();
assert(mainBundle != 0);
CFURLRef mainBundleURL = CFBundleCopyBundleURL(mainBundle);
assert(mainBundleURL != 0);
// when started from Application file on Mac OS X...
char path[PATH_MAX];
CFBundleRef mainBundle = CFBundleGetMainBundle();
assert(mainBundle != 0);
CFURLRef mainBundleURL = CFBundleCopyBundleURL(mainBundle);
assert(mainBundleURL != 0);
- CFStringRef pathStr = CFU
rl
CopyFileSystemPath(mainBundleURL, kCFURLPOSIXPathStyle);
+ CFStringRef pathStr = CFU
RL
CopyFileSystemPath(mainBundleURL, kCFURLPOSIXPathStyle);
assert(pathStr != 0);
CFStringGetCString(pathStr, path, PATH_MAX, kCFStringEncodingUTF8);
CFRelease(mainBundleURL);
assert(pathStr != 0);
CFStringGetCString(pathStr, path, PATH_MAX, kCFStringEncodingUTF8);
CFRelease(mainBundleURL);
@@
-192,6
+197,7
@@
static void init_physfs(const char* argv0)
sourcedir = true;
}
}
sourcedir = true;
}
}
+}
#endif
#ifdef _WIN32
#endif
#ifdef _WIN32
diff --git
a/src/tinygettext/findlocale.cpp
b/src/tinygettext/findlocale.cpp
index
42398db
..
f559011
100644
(file)
--- a/
src/tinygettext/findlocale.cpp
+++ b/
src/tinygettext/findlocale.cpp
@@
-38,7
+38,7
@@
from the Author.
#endif
#ifdef MACOSX
#endif
#ifdef MACOSX
-#include <C
arbon/Carb
on.h>
+#include <C
oreFoundation/CoreFoundati
on.h>
#endif
#include "findlocale.hpp"
#endif
#include "findlocale.hpp"
diff --git
a/src/video/glutil.hpp
b/src/video/glutil.hpp
index
b19ce8b
..
85200bd
100644
(file)
--- a/
src/video/glutil.hpp
+++ b/
src/video/glutil.hpp
@@
-25,8
+25,14
@@
#include <sstream>
#include <stdexcept>
#include <sstream>
#include <stdexcept>
+
+#ifndef MACOSX
#include <GL/gl.h>
#include <GL/glext.h>
#include <GL/gl.h>
#include <GL/glext.h>
+#else
+#include <OpenGL/gl.h>
+#include <OpenGL/glext.h>
+#endif
static inline void check_gl_error(const char* message)
{
static inline void check_gl_error(const char* message)
{
diff --git
a/tools/miniswig/CMakeLists.txt
b/tools/miniswig/CMakeLists.txt
index
6f1cbe7
..
93607a0
100644
(file)
--- a/
tools/miniswig/CMakeLists.txt
+++ b/
tools/miniswig/CMakeLists.txt
@@
-36,6
+36,7
@@
FILE(GLOB MINISWIG_SOURCES RELATIVE ${MINISWIG_SOURCE_DIR} create_docu.cpp creat
## Add target for bison parser generation
## Add target for bison parser generation
+MARK_AS_ADVANCED(BISON_EXECUTABLE)
FIND_PROGRAM(BISON_EXECUTABLE bison)
IF (NOT BISON_EXECUTABLE)
MESSAGE(FATAL_ERROR "bison not found - aborting")
FIND_PROGRAM(BISON_EXECUTABLE bison)
IF (NOT BISON_EXECUTABLE)
MESSAGE(FATAL_ERROR "bison not found - aborting")
@@
-49,6
+50,7
@@
ADD_CUSTOM_COMMAND(
## Add target for flex lexical analyzer generation
## Add target for flex lexical analyzer generation
+MARK_AS_ADVANCED(FLEX_EXECUTABLE)
FIND_PROGRAM(FLEX_EXECUTABLE flex)
IF (NOT FLEX_EXECUTABLE)
MESSAGE(FATAL_ERROR "flex not found - aborting")
FIND_PROGRAM(FLEX_EXECUTABLE flex)
IF (NOT FLEX_EXECUTABLE)
MESSAGE(FATAL_ERROR "flex not found - aborting")