# BioEmergences Workflow - A standalone workflow for embryo processing on personal computers 
# Written in 2015 by BioEmergences CNRS USR bioemergences@inaf.cnrs-gif.fr
# 
# To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty.
# You should have received a copy of the CC BY-NC-SA 4.0 Dedication along with this software. If not, see <https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode>.

PROJECT(ConvertLSMtoVTK)

cmake_minimum_required(VERSION 2.8)

SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/../EXE)



######################## ITK ########################
FIND_PACKAGE(ITK)
IF(ITK_FOUND)
  INCLUDE(${ITK_USE_FILE})
ELSE(ITK_FOUND)
  MESSAGE(FATAL_ERROR
          "Cannot build without ITK.  Please set ITK_DIR.")
ENDIF(ITK_FOUND)

######################## VTK ########################
FIND_PACKAGE(VTK)
IF(VTK_FOUND)
  INCLUDE(${VTK_USE_FILE})
ELSE(VTK_FOUND)
  MESSAGE(FATAL_ERROR
          "Cannot build without VTK.  Please set VTK_DIR.")
ENDIF(VTK_FOUND)



######################## EXE ########################


SET(TOOL_HEADS
  vtkLSMReader.h
  itkImageToVTKImageFilter.h
)

SET(TOOL_SRCS
  vtkLSMReader.cxx
  itkImageToVTKImageFilter.txx
)



ADD_EXECUTABLE(ConvertLSMtoVTK ConvertLSMtoVTK.cxx  ${TOOL_HEADS}   ${TOOL_SRCS})
TARGET_LINK_LIBRARIES(ConvertLSMtoVTK ${ITK_LIBRARIES} ${VTK_LIBRARIES})

ADD_EXECUTABLE(ConvertShortToByte   ConvertShortToByte.cxx) 
TARGET_LINK_LIBRARIES(ConvertShortToByte ${ITK_LIBRARIES} )
