mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-06 13:45:34 +00:00
Mix debug and release if necessary under non Windows systems.
This commit is contained in:
parent
274ff530dc
commit
85bdb49d1b
1 changed files with 19 additions and 9 deletions
|
@ -6,11 +6,6 @@
|
||||||
namespace Files {
|
namespace Files {
|
||||||
|
|
||||||
bool loadOgrePlugin(const std::string &pluginDir, std::string pluginName, Ogre::Root &ogreRoot) {
|
bool loadOgrePlugin(const std::string &pluginDir, std::string pluginName, Ogre::Root &ogreRoot) {
|
||||||
// Append plugin suffix if debugging.
|
|
||||||
#if defined(DEBUG)
|
|
||||||
pluginName = pluginName + OGRE_PLUGIN_DEBUG_SUFFIX;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE
|
#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE
|
||||||
std::ostringstream verStream;
|
std::ostringstream verStream;
|
||||||
verStream << "." << OGRE_VERSION_MAJOR << "." << OGRE_VERSION_MINOR << "." << OGRE_VERSION_PATCH;
|
verStream << "." << OGRE_VERSION_MAJOR << "." << OGRE_VERSION_MINOR << "." << OGRE_VERSION_PATCH;
|
||||||
|
@ -28,7 +23,22 @@ bool loadOgrePlugin(const std::string &pluginDir, std::string pluginName, Ogre::
|
||||||
pluginExt = ".so";
|
pluginExt = ".so";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
std::string pluginPath = pluginDir + "/" + pluginName + pluginExt;
|
// Append plugin suffix if debugging.
|
||||||
|
std::string pluginPath;
|
||||||
|
#if defined(DEBUG)
|
||||||
|
pluginPath = pluginDir + "/" + pluginName + OGRE_PLUGIN_DEBUG_SUFFIX + pluginExt;
|
||||||
|
if (boost::filesystem::exists(pluginPath)) {
|
||||||
|
ogreRoot.loadPlugin(pluginPath);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
|
||||||
|
return false;
|
||||||
|
#endif //OGRE_PLATFORM == OGRE_PLATFORM_WIN32
|
||||||
|
}
|
||||||
|
#endif //defined(DEBUG)
|
||||||
|
|
||||||
|
pluginPath = pluginDir + "/" + pluginName + pluginExt;
|
||||||
if (boost::filesystem::exists(pluginPath)) {
|
if (boost::filesystem::exists(pluginPath)) {
|
||||||
ogreRoot.loadPlugin(pluginPath);
|
ogreRoot.loadPlugin(pluginPath);
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue