Crude test so that if openal comes from apple framework stuff, use the
authorChris Want <cwant@ualberta.ca>
Wed, 13 Dec 2006 02:54:59 +0000 (02:54 +0000)
committerChris Want <cwant@ualberta.ca>
Wed, 13 Dec 2006 02:54:59 +0000 (02:54 +0000)
headers <al.h>, <alc.h>, and <alut.h> instead of <AL/al.h>, <AL/alc.h>,
and <AL/alut.h>

(cmake generated makefiles now work out of the box on my intel mac)

intern/SoundSystem/CMakeLists.txt
intern/SoundSystem/openal/SND_OpenALDevice.cpp

index f80d9defc4544afa8842fb18da1c0372d5eee79a..080c5b945e1f22b7d286c3ca414b8473fe1780dc 100644 (file)
@@ -32,6 +32,10 @@ SET(INC . intern ../moto/include ../string dummy openal sdl)
 IF(WITH_OPENAL)
   FILE(GLOB SRC dummy/*.cpp intern/*.cpp openal/*.cpp sdl/*.cpp)
   INCLUDE_DIRECTORIES(${OPENAL_INC} ${SDL_INC})
+  STRING(REGEX MATCH ".*ramework.*" FRAMEWORK ${OPENAL_INCLUDE_DIR})
+  IF(FRAMEWORK)
+    ADD_DEFINITIONS(-DAPPLE_FRAMEWORK_FIX)
+  ENDIF(FRAMEWORK)
 ELSE(WITH_OPENAL)
   FILE(GLOB SRC dummy/*.cpp intern/*.cpp)
   ADD_DEFINITIONS(-DNO_SOUND)
index 399008b3b2874e5fdc4b07bed92a478c613b658b..a278384dfd852df538009d2460c0972cc822b763 100644 (file)
 
 #include "SND_Utils.h"
 
+#ifdef APPLE_FRAMEWORK_FIX
+#include <al.h>
+#include <alc.h>
+#include <alut.h>
+#else
 #include <AL/al.h>
 #include <AL/alc.h>
 #include <AL/alut.h>
+#endif
 
 #include <stdio.h>
 #include <stdlib.h>