[Orxonox-commit 2985] r7682 - in code/branches/ois_update: cmake src

youngk at orxonox.net youngk at orxonox.net
Tue Nov 30 23:08:38 CET 2010


Author: youngk
Date: 2010-11-30 23:08:38 +0100 (Tue, 30 Nov 2010)
New Revision: 7682

Added:
   code/branches/ois_update/cmake/LibraryConfigOSX.cmake
Removed:
   code/branches/ois_update/cmake/LibraryConfigApple.cmake
Modified:
   code/branches/ois_update/cmake/LibraryConfig.cmake
   code/branches/ois_update/cmake/PackageConfigOSX.cmake
   code/branches/ois_update/src/SpecialConfig.h.in
Log:
Changed handling of the dependency package and increased consistence for options.

Modified: code/branches/ois_update/cmake/LibraryConfig.cmake
===================================================================
--- code/branches/ois_update/cmake/LibraryConfig.cmake	2010-11-30 21:55:06 UTC (rev 7681)
+++ code/branches/ois_update/cmake/LibraryConfig.cmake	2010-11-30 22:08:38 UTC (rev 7682)
@@ -47,6 +47,7 @@
 
 # Scripts for specific library and CMake config
 INCLUDE(LibraryConfigTardis)
+#INCLUDE(LibraryConfigOSX)
 
 IF(DEPENDENCY_PACKAGE_ENABLE)
   GET_FILENAME_COMPONENT(_dep_dir_1 ${CMAKE_SOURCE_DIR}/../dependencies ABSOLUTE)

Deleted: code/branches/ois_update/cmake/LibraryConfigApple.cmake
===================================================================
--- code/branches/ois_update/cmake/LibraryConfigApple.cmake	2010-11-30 21:55:06 UTC (rev 7681)
+++ code/branches/ois_update/cmake/LibraryConfigApple.cmake	2010-11-30 22:08:38 UTC (rev 7682)
@@ -1,43 +0,0 @@
- #
- #             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:
- #    Yuning Chai
- #  Description:
- #    Sets necessary library options and paths on Mac.
- #
-
-IF(APPLE)
-  MESSAGE(STATUS "Running on Apple. Using customized paths and options.")
-
-  SET(ENV{OGRE_HOME} "/Developer/SDKs/OgreSDK/Dependencies")
-  SET(ENV{CEGUIDIR} "/Developer/SDKs/OgreSDK/Dependencies")
-
-  #MESSAGE(STATUS $ENV{OGRE_HOME})
-
-  SET(CMAKE_FIND_FRAMEWORK "FIRST")
-
-#  SET(OGRE_LIBRARY_OPTIMIZED "/Developer/SDKs/OgreSDK/Dependencies/Ogre.framework/Ogre")
-
-#  SET(CEGUI_LIBRARY_OPTIMIZED "/Developer/SDKs/OgreSDK/Dependencies/CEGUI.framework/CEGUI")
-
-#  SET(OGRE_LIBRARY_OPTIMIZED  "/Developer/SDKs/OgreSDK/Dependencies/Ogre.framework" CACHE STRING "Ogre lib for OSX")
-#  SET(CEGUI_LIBRARY_OPTIMIZED  "/Developer/SDKs/OgreSDK/Dependencies/CEGUI.framework" CACHE STRING "CEGUI lib for OSX")
-
-ENDIF(APPLE)

Added: code/branches/ois_update/cmake/LibraryConfigOSX.cmake
===================================================================
--- code/branches/ois_update/cmake/LibraryConfigOSX.cmake	                        (rev 0)
+++ code/branches/ois_update/cmake/LibraryConfigOSX.cmake	2010-11-30 22:08:38 UTC (rev 7682)
@@ -0,0 +1,29 @@
+ #
+ #             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:
+ #    Sets necessary library options and paths on Mac.
+ #
+
+IF(APPLE)
+  MESSAGE(STATUS "Running on Apple. Using customized paths and options.")
+  
+ENDIF(APPLE)

Modified: code/branches/ois_update/cmake/PackageConfigOSX.cmake
===================================================================
--- code/branches/ois_update/cmake/PackageConfigOSX.cmake	2010-11-30 21:55:06 UTC (rev 7681)
+++ code/branches/ois_update/cmake/PackageConfigOSX.cmake	2010-11-30 22:08:38 UTC (rev 7682)
@@ -40,28 +40,24 @@
 # Sets the library path for the FIND_LIBRARY
 SET(CMAKE_LIBRARY_PATH ${DEP_LIBRARY_DIR})
 
-# Certain find scripts don't behave as ecpected so we have
-# to specify the libraries ourselves.
-#SET(TCL_LIBRARY  ${DEP_BINARY_DIR}/tcl85.dll CACHE FILEPATH "")
-#SET(ZLIB_LIBRARY ${DEP_BINARY_DIR}/zlib1.dll CACHE FILEPATH "")
-
 # Include paths and other special treatments
 SET(ENV{ALUTDIR}               ${DEP_FRAMEWORK_DIR})
 SET(ENV{BOOST_ROOT}            ${DEPENDENCY_PACKAGE_DIR})
 SET(ENV{CEGUIDIR}              ${DEP_FRAMEWORK_DIR})
-#SET(ENV{DBGHELP_DIR}           ${DEP_INCLUDE_DIR}/dbghelp)
-#SET(ENV{DXSDK_DIR}             ${DEP_INCLUDE_DIR}/directx)
-#SET(ENV{ENETDIR}               ${DEP_INCLUDE_DIR}/enet)
 SET(ENV{LUA_DIR}               ${DEP_INCLUDE_DIR}/lua)
 SET(ENV{OGGDIR}                ${DEP_INCLUDE_DIR})
 SET(ENV{VORBISDIR}             ${DEP_INCLUDE_DIR})
 SET(ENV{OGRE_HOME}             ${DEP_FRAMEWORK_DIR})
 SET(ENV{OGRE_PLUGIN_DIR}       ${DEP_BINARY_DIR})
-#SET(ENV{OPENALDIR}             ${DEP_INCLUDE_DIR}/openal)
-#SET(ENV{POCODIR}               ${DEP_INCLUDE_DIR}/poco)
-#LIST(APPEND CMAKE_INCLUDE_PATH ${DEP_INCLUDE_DIR}/tcl/include)
-#LIST(APPEND CMAKE_INCLUDE_PATH ${DEP_INCLUDE_DIR}/zlib/include)
 
+# 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")
+#    SET(ENV{DYLD_LIBRARY_PATH}               ${DEPENDENCY_PACKAGE_DIR}/lib)
+#    SET(ENV{DYLD_FRAMEWORK_PATH}             ${DEPENDENCY_PACKAGE_DIR}/Library/Frameworks)
+#  ENDIF(${CMAKE_GENERATOR} STREQUAL "Xcode")
+#ENDIF(DEPENDENCY_PACKAGE_ENABLE)
+
 ### INSTALL ###
 
 # Tcl script library

Modified: code/branches/ois_update/src/SpecialConfig.h.in
===================================================================
--- code/branches/ois_update/src/SpecialConfig.h.in	2010-11-30 21:55:06 UTC (rev 7681)
+++ code/branches/ois_update/src/SpecialConfig.h.in	2010-11-30 22:08:38 UTC (rev 7682)
@@ -93,17 +93,27 @@
     const char moduleExtension[] = "@ORXONOX_MODULE_EXTENSION@";
 
     // OGRE PLUGINS
+    // Apple has trouble finding OGRE plugins because of its install-name convention
+    // Adopting the executable_path structure for later use in app bundles
 #ifdef NDEBUG
     const char ogrePlugins[] = "@OGRE_PLUGINS_RELEASE@";
 #  ifdef DEPENDENCY_PACKAGE_ENABLE
-    const char ogrePluginsDirectory[] = ".";
+#    ifdef ORXONOX_PLATFORM_APPLE
+       const char ogrePluginsDirectory[] = "@executable_path/../Plugins";
+#    else
+       const char ogrePluginsDirectory[] = ".";
+#    endif
 #  else
     const char ogrePluginsDirectory[] = "@OGRE_PLUGINS_FOLDER_RELEASE@";
 #  endif
 #else
     const char ogrePlugins[] = "@OGRE_PLUGINS_DEBUG@";
 #  ifdef DEPENDENCY_PACKAGE_ENABLE
-    const char ogrePluginsDirectory[] = ".";
+#    ifdef ORXONOX_PLATFORM_APPLE
+       const char ogrePluginsDirectory[] = "@OGRE_PLUGINS_FOLDER_DEBUG@";
+#    else
+       const char ogrePluginsDirectory[] = ".";
+#    endif
 #  else
     const char ogrePluginsDirectory[] = "@OGRE_PLUGINS_FOLDER_DEBUG@";
 #  endif




More information about the Orxonox-commit mailing list