
SET(HEADERS "")
SET(SOURCES "")

SET_AND_INC_DIRS(DIR ${CMAKE_CURRENT_SOURCE_DIR})
APPEND_GLOB(HEADERS ${DIR}/*.h)
APPEND_GLOB(SOURCES ${DIR}/*.C)

INCLUDE_DIRECTORIES(
  "${CMAKE_CURRENT_SOURCE_DIR}/../"
  "${CMAKE_CURRENT_BINARY_DIR}/../"
)

IF (${PACKAGE_NAME}_ENABLE_Pamgen)
  SET(PAMGENLIB Iopg)
ENDIF()

IF (TPL_ENABLE_Faodel)
    SET(FAODELLIB Iofaodel)
ENDIF()

IF (${PACKAGE_NAME}_ENABLE_SEACASExodus)
  SET(EXODUSLIB Ioex)
ENDIF()

IF (TPL_ENABLE_CGNS)
  SET(CGNSLIB Iocgns)
ENDIF()

IF (TPL_ENABLE_ADIOS2)
  SET(ADIOS2LIB Ioad)
ENDIF()

SET(IOVISLIB Iovs)

IF (TPL_ENABLE_Catalyst2)
  SET(CATALYST2LIB Iocatalyst)
endif()

TRIBITS_ADD_LIBRARY(
	Ionit
	HEADERS	${HEADERS}
	SOURCES ${SOURCES}
	DEPLIBS Ioss ${EXODUSLIB}
	        Iogn Iogs Iohb Iotm Iotr ${IOVISLIB}
          ${PAMGENLIB} ${CGNSLIB} ${VISLIB} ${FAODELLIB} ${ADIOS2LIB} ${CATALYST2LIB}
)

IF (BUILD_TESTING)
  ENABLE_TESTING()
ENDIF()

