From a84837d342415e55f68f8f46fe1e08031a336de6 Mon Sep 17 00:00:00 2001 From: Mattia Basaglia Date: Sun, 26 Jul 2015 15:46:07 +0200 Subject: [PATCH] Set as a proper debug build --- CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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}" -- 2.39.2