From: Mattia Basaglia Date: Sun, 26 Jul 2015 13:46:07 +0000 (+0200) Subject: Set as a proper debug build X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a84837d342415e55f68f8f46fe1e08031a336de6;p=xonotic%2Fnetradiant.git Set as a proper debug build --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 0730b774..6649e4da 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,6 +46,13 @@ endif() set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH}) +# Enable Debug by default, can be changed with -D CMAKE_BUILD_TYPE=Release +if(CMAKE_BUILD_TYPE STREQUAL "") + set(CMAKE_BUILD_TYPE Debug) + add_definitions(-D_DEBUG=1) +else() +endif() + find_package(LibXml2 REQUIRED) include_directories(${LIBXML2_INCLUDE_DIR}) @@ -59,7 +66,6 @@ include_directories(${GTKGL_INCLUDE_DIRS}) find_package(OpenGL REQUIRED) add_definitions( - -D_DEBUG=1 -DRADIANT_VERSION="${RADIANT_VERSION_STRING}" -DRADIANT_MAJOR_VERSION="${NetRadiant_VERSION_MINOR}" -DRADIANT_MINOR_VERSION="${NetRadiant_VERSION_PATCH}"