Project(MRMLIDImageIO)

SET(MRMLIDImageIO_SRCS
itkMRMLIDImageIO.cxx
itkMRMLIDImageIOFactory.cxx
)

INCLUDE_DIRECTORIES(
  ${MRML_SOURCE_DIR}
  ${MRML_BINARY_DIR}
  ${MRMLIDImageIO_SOURCE_DIR}
  ${MRMLIDImageIO_BINARY_DIR}
  )


ADD_LIBRARY (MRMLIDIO ${MRMLIDImageIO_SRCS})
TARGET_LINK_LIBRARIES(MRMLIDIO ITKIO MRML)

# Shared library that when placed in ITK_AUTOLOAD_PATH, will add MRMLIDImageIO
# as an ImageIOFactory.  Need to have separate shared library for each new format.
ADD_LIBRARY(MRMLIDIOPlugin SHARED itkMRMLIDIOPlugin.cxx)
TARGET_LINK_LIBRARIES(MRMLIDIOPlugin MRMLIDIO)

IF(BUILD_SHARED_LIBS)
  INSTALL_TARGETS(${SLICER3_LIB_INSTALL_DIR} MRMLIDIO MRMLIDIOPlugin)
ELSE(BUILD_SHARED_LIBS)
  INSTALL_TARGETS(${SLICER3_LIB_INSTALL_DIR} MRMLIDIOPlugin)
ENDIF(BUILD_SHARED_LIBS)

CONFIGURE_FILE(
  ${MRMLIDImageIO_SOURCE_DIR}/itkMRMLIDImageIOConfigure.h.in 
  ${MRMLIDImageIO_BINARY_DIR}/itkMRMLIDImageIOConfigure.h
)
