
remove_definitions(-DHAVE_ZLIB)

add_executable(ConcatenateFields ConcatenateFields.cxx itkDisplacementFieldCompositionFilter.h itkDisplacementFieldCompositionFilter.txx)
add_executable(ResampleDeformationField ResampleDeformationField.cxx)
add_executable(ResampleImage ResampleImage.cxx)
add_executable(ReverseDeformationField ReverseDeformationField.cxx)
add_executable(WarpImage WarpImage.cxx)
add_executable(WarpImageNN WarpImageNN.cxx)
add_executable(ConvertFormat ConvertFormat.cpp ../stdafx.cpp ../stdafx.h)
add_executable(NormalizeImage NormalizeImage.cpp itkBSplineControlPointImageFilter.h itkBSplineControlPointImageFilter.txx ../stdafx.cpp ../stdafx.h ../MyUtils.cpp ../MyUtils.h)

if(ITKHasMetaIO EQUAL -1)
	set(NormalizeImage_LIBRARIES MetaIO NIFTI zlib ${ITK_LIBRARIES})
else()
	set(NormalizeImage_LIBRARIES NIFTI zlib ${ITK_LIBRARIES})
endif()

target_link_libraries(ConcatenateFields ${ITK_LIBRARIES})
target_link_libraries(ResampleDeformationField ${ITK_LIBRARIES})
target_link_libraries(ResampleImage ${ITK_LIBRARIES})
target_link_libraries(ReverseDeformationField ${ITK_LIBRARIES})
target_link_libraries(WarpImage ${ITK_LIBRARIES})
target_link_libraries(WarpImageNN ${ITK_LIBRARIES})
target_link_libraries(ConvertFormat ${ITK_LIBRARIES})
target_link_libraries(NormalizeImage ${NormalizeImage_LIBRARIES})

install(TARGETS ConcatenateFields DESTINATION bin)
install(TARGETS ResampleDeformationField DESTINATION bin)
install(TARGETS ResampleImage DESTINATION bin)
install(TARGETS ReverseDeformationField DESTINATION bin)
install(TARGETS WarpImage DESTINATION bin)
install(TARGETS WarpImageNN DESTINATION bin)
install(TARGETS ConvertFormat DESTINATION bin)
install(TARGETS NormalizeImage DESTINATION bin)
