## Some default settings
-OPTION(DEBUG "Build with debugging options" FALSE)
OPTION(ENABLE_SQDBG "Build squirrel script interpreter with debugging options" FALSE)
OPTION(ENABLE_OPENGL "Enable OpenGL support" TRUE)
OPTION(GENERATE_WRAPPER "Build miniswig and generate the wrapper" ${DEBUG})
# )
#ENDIF(${XGETTEXT} STREQUAL "XGETTEXT-NOTFOUND")
+
+## Debug options
+
+OPTION(DEBUG "Build with debugging options" FALSE)
+IF (DEBUG)
+ REMOVE_DEFINITIONS(-O2)
+ ADD_DEFINITIONS(-O0 -g -pg -Wall -Werror)
+ELSE (DEBUG)
+ ADD_DEFINITIONS(-O2)
+ REMOVE_DEFINITIONS(-O0 -g -pg -Wall -Werror)
+ENDIF (DEBUG)
+
+
## Some additional compiler switches
+ADD_DEFINITIONS(-fno-strict-aliasing)
-ADD_DEFINITIONS(-O2 -fno-strict-aliasing)
## Generate supertux executable in the right place