
CONFIGURE_FILE( tensorgeometryregistration_v2.pl ${EXECUTABLE_OUTPUT_PATH}/tensorgeometryregistration_v2.pl @ONLY)
CONFIGURE_FILE( convertVoxelToSequentDT.sh ${EXECUTABLE_OUTPUT_PATH}/convertVoxelToSequentDT.sh @ONLY)
CONFIGURE_FILE( linearlyregisterbyfsl.sh ${EXECUTABLE_OUTPUT_PATH}/linearlyregisterbyfsl.sh @ONLY)
CONFIGURE_FILE( convertSequentToVoxelDT.sh ${EXECUTABLE_OUTPUT_PATH}/convertSequentToVoxelDT.sh @ONLY)
CONFIGURE_FILE( rigidlyregisterdt.sh ${EXECUTABLE_OUTPUT_PATH}/rigidlyregisterdt.sh @ONLY)
CONFIGURE_FILE( dtiDroid_in.py ${EXECUTABLE_OUTPUT_PATH}/dtiDroid @ONLY)

IF (UNIX)
  EXEC_PROGRAM(chmod ARGS 755 ${EXECUTABLE_OUTPUT_PATH}/tensorgeometryregistration_v2.pl)
  EXEC_PROGRAM(chmod ARGS 755 ${EXECUTABLE_OUTPUT_PATH}/convertVoxelToSequentDT.sh)
  EXEC_PROGRAM(chmod ARGS 755 ${EXECUTABLE_OUTPUT_PATH}/linearlyregisterbyfsl.sh)
  EXEC_PROGRAM(chmod ARGS 755 ${EXECUTABLE_OUTPUT_PATH}/convertSequentToVoxelDT.sh)
  EXEC_PROGRAM(chmod ARGS 755 ${EXECUTABLE_OUTPUT_PATH}/rigidlyregisterdt.sh)
  EXEC_PROGRAM(chmod ARGS 755 ${EXECUTABLE_OUTPUT_PATH}/dtiDroid)
ENDIF (UNIX)

INSTALL(PROGRAMS 
  ${EXECUTABLE_OUTPUT_PATH}/tensorgeometryregistration_v2.pl
  ${EXECUTABLE_OUTPUT_PATH}/convertVoxelToSequentDT.sh 
  ${EXECUTABLE_OUTPUT_PATH}/linearlyregisterbyfsl.sh
  ${EXECUTABLE_OUTPUT_PATH}/rigidlyregisterdt.sh
  ${EXECUTABLE_OUTPUT_PATH}/convertSequentToVoxelDT.sh
  ${EXECUTABLE_OUTPUT_PATH}/dtiDroid
  DESTINATION bin)

