]> git.xonotic.org Git - xonotic/netradiant.git/commitdiff
Set as a proper debug build
authorMattia Basaglia <mattia.basaglia@gmail.com>
Sun, 26 Jul 2015 13:46:07 +0000 (15:46 +0200)
committerMattia Basaglia <mattia.basaglia@gmail.com>
Sun, 26 Jul 2015 13:46:07 +0000 (15:46 +0200)
CMakeLists.txt

index 0730b7748a27505645370c1a207070d8137eaa50..6649e4da89d72bfef9ff57f2e715fcdfe2737129 100644 (file)
@@ -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}"