mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 21:53:51 +00:00
Merge remote-tracking branch 'mmd/vsdebugfixes'
This commit is contained in:
commit
98219323b7
2 changed files with 10 additions and 4 deletions
|
@ -257,13 +257,15 @@ if (APPLE)
|
||||||
"${APP_BUNDLE_DIR}/Contents/Resources/OpenMW.icns" COPYONLY)
|
"${APP_BUNDLE_DIR}/Contents/Resources/OpenMW.icns" COPYONLY)
|
||||||
endif (APPLE)
|
endif (APPLE)
|
||||||
|
|
||||||
|
# Set up DEBUG define
|
||||||
|
set_directory_properties(PROPERTIES COMPILE_DEFINITIONS_DEBUG DEBUG=1)
|
||||||
|
|
||||||
# Set up Ogre plugin folder & debug suffix
|
# Set up Ogre plugin folder & debug suffix
|
||||||
# Ogre on OS X doesn't use "_d" suffix (see Ogre's CMakeLists.txt)
|
if (APPLE)
|
||||||
if (DEFINED CMAKE_BUILD_TYPE AND CMAKE_BUILD_TYPE STREQUAL "Debug" AND NOT APPLE)
|
# Ogre on OS X doesn't use "_d" suffix (see Ogre's CMakeLists.txt)
|
||||||
add_definitions(-DOGRE_PLUGIN_DEBUG_SUFFIX="_d")
|
|
||||||
else()
|
|
||||||
add_definitions(-DOGRE_PLUGIN_DEBUG_SUFFIX="")
|
add_definitions(-DOGRE_PLUGIN_DEBUG_SUFFIX="")
|
||||||
|
else ()
|
||||||
|
add_definitions(-DOGRE_PLUGIN_DEBUG_SUFFIX="_d")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_definitions(-DOGRE_PLUGIN_DIR_REL="${OGRE_PLUGIN_DIR_REL}")
|
add_definitions(-DOGRE_PLUGIN_DIR_REL="${OGRE_PLUGIN_DIR_REL}")
|
||||||
|
|
|
@ -6,7 +6,11 @@
|
||||||
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;
|
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;
|
||||||
|
|
Loading…
Reference in a new issue