[Orxonox-commit 3368] r8056 - in code/branches/mac_osx: cmake cmake/tools src/orxonox/sound

rgrieder at orxonox.net rgrieder at orxonox.net
Thu Mar 10 17:52:31 CET 2011


Author: rgrieder
Date: 2011-03-10 17:52:31 +0100 (Thu, 10 Mar 2011)
New Revision: 8056

Modified:
   code/branches/mac_osx/cmake/PackageConfigOSX.cmake
   code/branches/mac_osx/cmake/tools/FindALUT.cmake
   code/branches/mac_osx/src/orxonox/sound/BaseSound.cc
   code/branches/mac_osx/src/orxonox/sound/SoundBuffer.cc
   code/branches/mac_osx/src/orxonox/sound/SoundManager.cc
   code/branches/mac_osx/src/orxonox/sound/SoundStreamer.cc
   code/branches/mac_osx/src/orxonox/sound/WorldSound.cc
Log:
Fiddled around with ALUT and OpenAL headers.
The hack in PackageConfigOSX.cmake is just a guess so it really needs testing.

All ALUT and OpenAL headers should now be included with <alut.h> or <al.h> respectively because FindOpenAL.cmake defines the include directories this way.
There is still a hack in LibraryConfig.cmake for non MSVC/Apple systems because alut.h includes al.h with AL/al.h on most systems.

Modified: code/branches/mac_osx/cmake/PackageConfigOSX.cmake
===================================================================
--- code/branches/mac_osx/cmake/PackageConfigOSX.cmake	2011-03-10 15:45:00 UTC (rev 8055)
+++ code/branches/mac_osx/cmake/PackageConfigOSX.cmake	2011-03-10 16:52:31 UTC (rev 8056)
@@ -50,6 +50,13 @@
 SET(ENV{OGRE_HOME}             ${DEP_FRAMEWORK_DIR})
 SET(ENV{OGRE_PLUGIN_DIR}       ${DEP_BINARY_DIR})
 
+# For OS X 10.5 we have to ship modified headers to make it compile
+# on gcc >= 4.2 (binaries stay the same)
+# Sets the library path for the FIND_LIBRARY
+IF(CMAKE_SYSTEM_VERSION STREQUAL "10.5")
+  SET(ENV{OPENALDIR} ${DEP_INCLUDE_DIR}/openal)
+ENDIF()
+
 # Xcode won't be able to run the toluabind code generation if we're using the dependency package
 #IF(DEPENDENCY_PACKAGE_ENABLE)
 #  IF(${CMAKE_GENERATOR} STREQUAL "Xcode")

Modified: code/branches/mac_osx/cmake/tools/FindALUT.cmake
===================================================================
--- code/branches/mac_osx/cmake/tools/FindALUT.cmake	2011-03-10 15:45:00 UTC (rev 8055)
+++ code/branches/mac_osx/cmake/tools/FindALUT.cmake	2011-03-10 16:52:31 UTC (rev 8056)
@@ -1,43 +1,51 @@
-# Find ALUT includes and library
-#
-# This module defines
-#  ALUT_INCLUDE_DIR
-#  ALUT_LIBRARY, the library to link against to use ALUT.
-#  ALUT_FOUND, If false, do not try to use ALUT
-#
-# Copyright © 2007, Matt Williams
-# Modified by Nicolas Schlumberger to make it work on the Tardis-Infrastucture
-# of the ETH Zurich (removed later on)
-#
-# Redistribution and use is allowed according to the terms of the BSD license.
-#
-# Several changes and additions by Fabian 'x3n' Landau
-# Lots of simplifications by Adrian Friedli
-# Version checking by Reto Grieder
-# Adaption of the OGRE find script to ALUT by Kevin Young
-#                 > www.orxonox.net <
+ #
+ #             ORXONOX - the hottest 3D action shooter ever to exist
+ #                             > www.orxonox.net <
+ #
+ #        This program is free software; you can redistribute it and/or
+ #         modify it under the terms of the GNU General Public License
+ #        as published by the Free Software Foundation; either version 2
+ #            of the License, or (at your option) any later version.
+ #
+ #       This program is distributed in the hope that it will be useful,
+ #        but WITHOUT ANY WARRANTY; without even the implied warranty of
+ #        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ #                 GNU General Public License for more details.
+ #
+ #   You should have received a copy of the GNU General Public License along
+ #      with this program; if not, write to the Free Software Foundation,
+ #     Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ #
+ #
+ #  Author:
+ #    Kevin Young
+ #  Description:
+ #    Variables defined:
+ #      ALUT_FOUND
+ #      ALUT_INCLUDE_DIR
+ #      ALUT_LIBRARY
+ #
 
-INCLUDE(FindPackageHandleAdvancedArgs)
+INCLUDE(FindPackageHandleStandardArgs)
 INCLUDE(HandleLibraryTypes)
 
 FIND_PATH(ALUT_INCLUDE_DIR alut.h
   PATHS $ENV{ALUTDIR}
-  PATH_SUFFIXES include include/AL ALUT
+  PATH_SUFFIXES include include/AL Headers Headers/AL
 )
 FIND_LIBRARY(ALUT_LIBRARY_OPTIMIZED
-  NAMES ALUT alut
+  NAMES alut ALUT
   PATHS $ENV{ALUTDIR}
   PATH_SUFFIXES lib bin/Release bin/release Release release ALUT
 )
 FIND_LIBRARY(ALUT_LIBRARY_DEBUG
-  NAMES ALUTD alutd alut_d alutD alut_D
+  NAMES alutd alut_d alutD alut_D ALUTd ALUT_d ALUTD ALUT_D
   PATHS $ENV{ALUTDIR}
   PATH_SUFFIXES lib bin/Debug bin/debug Debug debug ALUT
 )
 
 # Handle the REQUIRED argument and set ALUT_FOUND
-# Also check the version requirements
-FIND_PACKAGE_HANDLE_ADVANCED_ARGS(ALUT DEFAULT_MSG
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(ALUT DEFAULT_MSG
   ALUT_LIBRARY_OPTIMIZED
   ALUT_INCLUDE_DIR
 )

Modified: code/branches/mac_osx/src/orxonox/sound/BaseSound.cc
===================================================================
--- code/branches/mac_osx/src/orxonox/sound/BaseSound.cc	2011-03-10 15:45:00 UTC (rev 8055)
+++ code/branches/mac_osx/src/orxonox/sound/BaseSound.cc	2011-03-10 16:52:31 UTC (rev 8056)
@@ -30,12 +30,7 @@
 
 #include <cassert>
 #include <vector>
-
-#ifdef ORXONOX_PLATFORM_APPLE
-#include "openal/al.h"
-#else
 #include <al.h>
-#endif
 
 #include "util/Math.h"
 #include "core/CoreIncludes.h"

Modified: code/branches/mac_osx/src/orxonox/sound/SoundBuffer.cc
===================================================================
--- code/branches/mac_osx/src/orxonox/sound/SoundBuffer.cc	2011-03-10 15:45:00 UTC (rev 8055)
+++ code/branches/mac_osx/src/orxonox/sound/SoundBuffer.cc	2011-03-10 16:52:31 UTC (rev 8056)
@@ -29,11 +29,7 @@
 
 #include "SoundBuffer.h"
 
-#if defined(ORXONOX_PLATFORM_APPLE)
-#include <ALUT/alut.h>
-#else
-#include <AL/alut.h>
-#endif
+#include <alut.h>
 #include <vorbis/vorbisfile.h>
 
 #include "util/Exception.h"

Modified: code/branches/mac_osx/src/orxonox/sound/SoundManager.cc
===================================================================
--- code/branches/mac_osx/src/orxonox/sound/SoundManager.cc	2011-03-10 15:45:00 UTC (rev 8055)
+++ code/branches/mac_osx/src/orxonox/sound/SoundManager.cc	2011-03-10 16:52:31 UTC (rev 8056)
@@ -30,12 +30,8 @@
 
 #include "SoundManager.h"
 
-#if defined(__APPLE__)
-#include <ALUT/alut.h>
-#else
-#include <AL/alut.h>
-#endif
 #include <utility>
+#include <alut.h>
 #include <loki/ScopeGuard.h>
 
 #include "util/Exception.h"

Modified: code/branches/mac_osx/src/orxonox/sound/SoundStreamer.cc
===================================================================
--- code/branches/mac_osx/src/orxonox/sound/SoundStreamer.cc	2011-03-10 15:45:00 UTC (rev 8055)
+++ code/branches/mac_osx/src/orxonox/sound/SoundStreamer.cc	2011-03-10 16:52:31 UTC (rev 8056)
@@ -26,12 +26,7 @@
  */
 #include "SoundStreamer.h"
 
-#ifdef ORXONOX_PLATFORM_APPLE
-#include "openal/al.h"
-#else
 #include <al.h>
-#endif
-
 #include <vorbis/vorbisfile.h>
 #include "SoundManager.h"
 

Modified: code/branches/mac_osx/src/orxonox/sound/WorldSound.cc
===================================================================
--- code/branches/mac_osx/src/orxonox/sound/WorldSound.cc	2011-03-10 15:45:00 UTC (rev 8055)
+++ code/branches/mac_osx/src/orxonox/sound/WorldSound.cc	2011-03-10 16:52:31 UTC (rev 8056)
@@ -29,11 +29,8 @@
 
 #include "WorldSound.h"
 
-#if defined(__APPLE__)
-#include <ALUT/alut.h>
-#else
-#include <AL/alut.h>
-#endif
+#include <alut.h>
+
 #include "util/Math.h"
 #include "core/CoreIncludes.h"
 #include "core/EventIncludes.h"




More information about the Orxonox-commit mailing list