CMAKE_MINIMUM_REQUIRED( VERSION 2.8 )

PROJECT( CLYZER )

SET( CMAKE_COLOR_MAKEFILE ON )
SET( CMAKE_VERBOSE_MAKEFILE OFF )
SET( CMAKE_INCLUDE_CURRENT_DIR TRUE )
SET( CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS TRUE )

IF( NOT CMAKE_BUILD_TYPE )
  SET( CMAKE_BUILD_TYPE Debug ) 
  SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DDEBUG -O0 -g" )
ENDIF( )

# Versioning.
SET( ${PROJECT_NAME}_MAJOR_VERSION 0 ) 
SET( ${PROJECT_NAME}_MINOR_VERSION 1 ) 
SET( ${PROJECT_NAME}_PATCH_LEVEL 0 )

# Dependencies.
FIND_PACKAGE( QT4 REQUIRED )
INCLUDE( ${QT_USE_FILE} )
ADD_DEFINITIONS( ${QT_DEFINITIONS} )

ADD_DEFINITIONS( "-Wall" )
ADD_SUBDIRECTORY( src )

MESSAGE( STATUS "--------------------------------------------------" )
MESSAGE( STATUS "VERSION        = ${${PROJECT_NAME}_MAJOR_VERSION}.${${PROJECT_NAME}_MINOR_VERSION}.${${PROJECT_NAME}_PATCH_LEVEL}" )
MESSAGE( STATUS "--------------------------------------------------" )

CMAKE_MINIMUM_REQUIRED( VERSION 2.8 )

PROJECT( CLYZER )

SET( CMAKE_COLOR_MAKEFILE ON )
SET( CMAKE_VERBOSE_MAKEFILE OFF )
SET( CMAKE_INCLUDE_CURRENT_DIR TRUE )
SET( CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS TRUE )

IF( NOT CMAKE_BUILD_TYPE )
  Message("Setting up for Release build (min size)")
  SET( CMAKE_BUILD_TYPE MinSizeRel ) 
ELSEIF (${CMAKE_BUILD_TYPE} MATCHES "Debug")
  Message("Setting up for Debug build")
  SET( CMAKE_BUILD_TYPE Debug ) 
  SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DDEBUG -O0 -g" )
  ADD_DEFINITIONS( "-Wall" )
ENDIF( )

# Versioning.
SET( ${PROJECT_NAME}_MAJOR_VERSION 0 ) 
SET( ${PROJECT_NAME}_MINOR_VERSION 1 ) 
SET( ${PROJECT_NAME}_PATCH_LEVEL 0 )

# Dependencies.
FIND_PACKAGE( QT4 REQUIRED )
INCLUDE( ${QT_USE_FILE} )
ADD_DEFINITIONS( ${QT_DEFINITIONS} )

ADD_SUBDIRECTORY( src )

MESSAGE( STATUS "--------------------------------------------------" )
MESSAGE( STATUS "VERSION        = ${${PROJECT_NAME}_MAJOR_VERSION}.${${PROJECT_NAME}_MINOR_VERSION}.${${PROJECT_NAME}_PATCH_LEVEL}" )
MESSAGE( STATUS "--------------------------------------------------" )

Set default build type to release if none selected, on debug -DDEBUG -O0 -g -Wall are specified.
Set default build type to release if none selected, on debug -DDEBUG -O0 -g -Wall are specified.
