#####dtiDroid CMakeLists       ########################################
##### $Id: CMakeLists.txt 296 2009-09-23 00:31:23Z rouchdyy@UPHS.PENNHEALTH.PRV $ ##########
#######################################################################

PROJECT(dtiDroid)

SET(RELEASE_ID 0.1.0)

cmake_minimum_required(VERSION 2.4)

SET(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake_modules")

# Find GSL.
#FIND_PACKAGE(GSL REQUIRED)
#IF(GSL_FOUND)
#  INCLUDE(${ITK_USE_FILE})
#ENDIF(GSL_FOUND)

SET (CXX_TEST_PATH ${EXECUTABLE_OUTPUT_PATH} )

SET (BUILD_TEST ON CACHE BOOL "Do you want to build tests")

SET (USE_SVN OFF CACHE BOOL "Gather info from svn")

SET(CMAKE_CXX_FLAGS "-O3 -DRELEASE_ID=\\\"${RELEASE_ID}\\\" ${CMAKE_CXX_FLAGS}")
SET(SVN_REV "NO SVN")

IF (USE_SVN)
  #get svninfo
  FIND_PACKAGE(Subversion)
    IF(Subversion_FOUND)
      Subversion_WC_INFO(${PROJECT_SOURCE_DIR} Project)
#      MESSAGE("Current revision is ${Project_WC_REVISION}")
      SET(SVN_REV ${Project_WC_REVISION})
      SET(CMAKE_CXX_FLAGS "-DSVN_REV=\\\"${Project_WC_REVISION}\\\" ${CMAKE_CXX_FLAGS}")
    ENDIF(Subversion_FOUND)
ENDIF (USE_SVN)

ENABLE_TESTING()

INCLUDE_DIRECTORIES(
  ${PROJECT_SOURCE_DIR}/include
)

SET (CMAKE_EXE_LINKER_FLAGS -lm ${CMAKE_EXE_LINKER_FLAGS})

ADD_SUBDIRECTORY(src)
ADD_SUBDIRECTORY(scripts)
