File tree Expand file tree Collapse file tree 3 files changed +22
-0
lines changed Expand file tree Collapse file tree 3 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -99,6 +99,18 @@ set(OGRE_SET_USE_SIMD 0)
99
99
set (OGRE_SET_RESTRICT_ALIASING 0 )
100
100
set (OGRE_SET_IDSTRING_ALWAYS_READABLE 0 )
101
101
set (OGRE_SET_DISABLE_AMD_AGS 0 )
102
+ if ((OGRE_EMBED_DEBUG_MODE STREQUAL "auto" AND
103
+ (CMAKE_GENERATOR STREQUAL "Unix Makefiles" OR CMAKE_GENERATOR STREQUAL "Ninja" ))
104
+ OR OGRE_EMBED_DEBUG_MODE STREQUAL "always" )
105
+ set ( OGRE_SET_EMBED_DEBUG_MODE 1 )
106
+ if ( OGRE_BUILD_TYPE STREQUAL "debug" )
107
+ set ( OGRE_SET_DEBUG_MODE "OGRE_DEBUG_LEVEL_DEBUG" )
108
+ else ()
109
+ set ( OGRE_SET_DEBUG_MODE "OGRE_DEBUG_LEVEL_RELEASE" )
110
+ endif ()
111
+ else ()
112
+ set ( OGRE_SET_EMBED_DEBUG_MODE 0 )
113
+ endif ()
102
114
if (OGRE_CONFIG_DOUBLE )
103
115
set (OGRE_SET_DOUBLE 1 )
104
116
endif ()
Original file line number Diff line number Diff line change 7
7
#define OGRE_DEBUG_LEVEL_DEBUG @OGRE_DEBUG_LEVEL_DEBUG@
8
8
#define OGRE_DEBUG_LEVEL_RELEASE @OGRE_DEBUG_LEVEL_RELEASE@
9
9
10
+ #if @OGRE_SET_EMBED_DEBUG_MODE @
11
+ # define OGRE_DEBUG_MODE @OGRE_SET_DEBUG_MODE @
12
+ #endif
13
+
10
14
#cmakedefine OGRE_BUILD_RENDERSYSTEM_D3D11
11
15
#cmakedefine OGRE_BUILD_RENDERSYSTEM_GL3PLUS
12
16
#cmakedefine OGRE_BUILD_RENDERSYSTEM_GLES
Original file line number Diff line number Diff line change @@ -491,6 +491,12 @@ set(OGRE_CONFIG_ALLOCATOR 0 CACHE STRING
491
491
)
492
492
endif ()
493
493
494
+ set ( OGRE_EMBED_DEBUG_MODE auto CACHE STRING
495
+ "Specify whether OGRE_DEBUG_MODE should be embedded into OgreBuildSettings.h
496
+ auto - Use 'never' for multi-config generators like MSVC & XCode. Use 'always' for Make & Ninja generators
497
+ never - Compile headers will determine whether it's a debug build based on macros like _DEBUG, DEBUG & NDEBUG
498
+ always - OGRE_DEBUG_MODE is embedded into OgreBuildSettings.h, its value is based on CMAKE_BUILD_TYPE"
499
+ )
494
500
set ( OGRE_DEBUG_LEVEL_DEBUG 3 CACHE STRING
495
501
"Specify debug level for debug builds:
496
502
0 - None. Disabled. No checks done at all.
You can’t perform that action at this time.
0 commit comments