OS X: attempt to fix #1045

actorid
Nikolay Kasyanov 11 years ago
parent fc21dd1f3a
commit 892ff93489

@ -288,7 +288,8 @@ endif()
add_definitions(-DOGRE_PLUGIN_DIR_REL="${OGRE_PLUGIN_DIR_REL}") add_definitions(-DOGRE_PLUGIN_DIR_REL="${OGRE_PLUGIN_DIR_REL}")
add_definitions(-DOGRE_PLUGIN_DIR_DBG="${OGRE_PLUGIN_DIR_DBG}") add_definitions(-DOGRE_PLUGIN_DIR_DBG="${OGRE_PLUGIN_DIR_DBG}")
if (APPLE AND OPENMW_OSX_DEPLOYMENT) if (APPLE AND OPENMW_OSX_DEPLOYMENT)
add_definitions(-DOGRE_PLUGIN_DIR="${APP_BUNDLE_NAME}/Contents/Plugins") # make it empty so plugin loading code can check this and try to find plugins inside app bundle
add_definitions(-DOGRE_PLUGIN_DIR="")
else() else()
add_definitions(-DOGRE_PLUGIN_DIR="${OGRE_PLUGIN_DIR}") add_definitions(-DOGRE_PLUGIN_DIR="${OGRE_PLUGIN_DIR}")
endif() endif()

@ -6,6 +6,10 @@
#include <OgreParticleEmitterFactory.h> #include <OgreParticleEmitterFactory.h>
#include <OgreParticleSystemManager.h> #include <OgreParticleSystemManager.h>
#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE
#include <OSX/macUtils.h>
#endif
#include <components/nifogre/particles.hpp> #include <components/nifogre/particles.hpp>
#include "ogreplugin.hpp" #include "ogreplugin.hpp"
@ -127,6 +131,9 @@ namespace OgreInit
#endif #endif
#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE #if OGRE_PLATFORM == OGRE_PLATFORM_APPLE
pluginDir = OGRE_PLUGIN_DIR; pluginDir = OGRE_PLUGIN_DIR;
// if path is not specified try to find plugins inside the app bundle
if (pluginDir.empty())
pluginDir = Ogre::macPluginPath();
#endif #endif
#if OGRE_PLATFORM == OGRE_PLATFORM_LINUX #if OGRE_PLATFORM == OGRE_PLATFORM_LINUX
pluginDir = OGRE_PLUGIN_DIR_REL; pluginDir = OGRE_PLUGIN_DIR_REL;

Loading…
Cancel
Save