mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-02 09:19:40 +00:00
check if CMAKE_BUILD_TYPE is defined instead of defining it by default
This commit is contained in:
parent
32e14907a2
commit
94c3fb81d1
1 changed files with 4 additions and 9 deletions
|
@ -20,17 +20,12 @@ set (OPENMW_VERSION_RELEASE 0)
|
|||
|
||||
set (OPENMW_VERSION "${OPENMW_VERSION_MAJOR}.${OPENMW_VERSION_MINOR}.${OPENMW_VERSION_RELEASE}")
|
||||
|
||||
# Add a sensible build type default and warning because empty means no optimization and no debug info.
|
||||
if(NOT CMAKE_BUILD_TYPE)
|
||||
message("WARNING: CMAKE_BUILD_TYPE is not defined!\n Defaulting to CMAKE_BUILD_TYPE=RelWithDebInfo. Use ccmake to set a proper value.")
|
||||
set(CMAKE_BUILD_TYPE RelWithDebInfo
|
||||
CACHE STRING "Type of build, options are: None Debug Release RelWithDebInfo MinSizeRel." FORCE)
|
||||
endif(NOT CMAKE_BUILD_TYPE)
|
||||
|
||||
# Debug suffix for plugins
|
||||
set(DEBUG_SUFFIX "")
|
||||
if (${CMAKE_BUILD_TYPE} STREQUAL "Debug")
|
||||
set(DEBUG_SUFFIX "_d")
|
||||
if (DEFINED CMAKE_BUILD_TYPE)
|
||||
if (${CMAKE_BUILD_TYPE} STREQUAL "Debug")
|
||||
set(DEBUG_SUFFIX "_d")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# doxygen main page
|
||||
|
|
Loading…
Reference in a new issue