PROJECT(DICOMParser)

INCLUDE_DIRECTORIES(${DICOMParser_SOURCE_DIR})
INCLUDE_DIRECTORIES(${DICOMParser_BINARY_DIR})

IF(WIN32)
  IF(BUILD_SHARED_LIBS)
    SET(DICOM_DLL 1)
  ELSE(BUILD_SHARED_LIBS)
    SET(DICOM_STATIC 1)
  ENDIF(BUILD_SHARED_LIBS)
ENDIF(WIN32)

IF(VTK_SOURCE_DIR)
   # Inside VTK, use its setting.
   SET(DICOM_ANSI_STDLIB ${VTK_USE_ANSI_STDLIB})
ELSE(VTK_SOURCE_DIR)
   # Not inside VTK, use ANSI streams.
   SET(DICOM_ANSI_STDLIB 1)
ENDIF(VTK_SOURCE_DIR)

INCLUDE(${CMAKE_ROOT}/Modules/TestForSTDNamespace.cmake)
SET(DICOM_NO_STD_NAMESPACE ${CMAKE_NO_STD_NAMESPACE})


CONFIGURE_FILE(${DICOMParser_SOURCE_DIR}/DICOMCMakeConfig.h.in
               ${DICOMParser_BINARY_DIR}/DICOMCMakeConfig.h)

ADD_LIBRARY(vtkDICOMParser DICOMFile.cxx DICOMParser.cxx DICOMAppHelper.cxx)

INSTALL_TARGETS(/lib/vtk vtkDICOMParser)
INSTALL_FILES(/include/vtk "(\\.h|\\.txx)$")

