diff options
author | Chris Want <cwant@ualberta.ca> | 2006-12-13 05:54:59 +0300 |
---|---|---|
committer | Chris Want <cwant@ualberta.ca> | 2006-12-13 05:54:59 +0300 |
commit | a119216a535d64100e1d3b7aa5e181e81b051059 (patch) | |
tree | 582965fc7e8e5cdc90a7b4052845a0cb7aa21ceb /intern | |
parent | d80f673f5d90d477be964b2b571337a9d855e7b7 (diff) |
Crude test so that if openal comes from apple framework stuff, use the
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)
Diffstat (limited to 'intern')
-rw-r--r-- | intern/SoundSystem/CMakeLists.txt | 4 | ||||
-rw-r--r-- | intern/SoundSystem/openal/SND_OpenALDevice.cpp | 6 |
2 files changed, 10 insertions, 0 deletions
diff --git a/intern/SoundSystem/CMakeLists.txt b/intern/SoundSystem/CMakeLists.txt index f80d9defc45..080c5b945e1 100644 --- a/intern/SoundSystem/CMakeLists.txt +++ b/intern/SoundSystem/CMakeLists.txt @@ -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) diff --git a/intern/SoundSystem/openal/SND_OpenALDevice.cpp b/intern/SoundSystem/openal/SND_OpenALDevice.cpp index 399008b3b28..a278384dfd8 100644 --- a/intern/SoundSystem/openal/SND_OpenALDevice.cpp +++ b/intern/SoundSystem/openal/SND_OpenALDevice.cpp @@ -43,9 +43,15 @@ #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> |