# Config file for MOAB; use the CMake find_package() function to pull this into
# your own CMakeLists.txt file.
#
# This file defines the following variables:
# MOAB_FOUND        - boolean indicating that MOAB is found
# MOAB_INCLUDE_DIRS - include directories from which to pick up MOAB includes
# MOAB_LIBRARIES    - libraries need to link to MOAB; use this in target_link_libraries for MOAB-dependent targets
# MOAB_CXX, MOAB_CC, MOAB_F77, MOAB_FC - compilers used to compile MOAB
# MOAB_CXXFLAGS, MOAB_CCFLAGS, MOAB_FFLAGS, MOAB_FCFLAGS - compiler flags used to compile MOAB; possibly need to use these in add_definitions or CMAKE_<LANG>_FLAGS_<MODE>

set(MOAB_FOUND 1)

set(MOAB_CXX @CXX@)
set(MOAB_CC @CC@)
set(MOAB_FC @FC@)
set(MOAB_F77 @F77@)

set(MOAB_BUILT_SHARED @BUILD_SHARED_LIBS@)
set(MOAB_USE_MPI @MOAB_USE_MPI@)
set(MPI_DIR "@MPI_DIR@")
set(MOAB_USE_HDF @MOAB_USE_HDF@)
set(HDF5_DIR "@HDF5_DIR@")
set(MOAB_USE_SZIP @MOAB_USE_SZIP@)
set(SZIP_DIR "@SZIP_DIR@")
set(MOAB_USE_NETCDF @MOAB_USE_NETCDF@)
set(NetCDF_DIR "@NetCDF_DIR@")
set(MOAB_USE_PNETCDF @MOAB_USE_PNETCDF@)
set(PNetCDF_DIR "@PNetCDF_DIR@")
set(MOAB_USE_ZOLTAN @MOAB_USE_ZOLTAN@)
set(Zoltan_DIR "@Zoltan_DIR@")

set(ENABLE_IMESH @ENABLE_IMESH@)
set(ENABLE_IGEOM @ENABLE_IGEOM@)

# Compiler flags used by MOAB
set(MOAB_CFLAGS "@CFLAGS@ @AM_CFLAGS@")
set(MOAB_CXXFLAGS "@CXXFLAGS@ @AM_CXXFLAGS@")
set(MOAB_FCFLAGS "@FCFLAGS@ @AM_FCLAGS@")
set(MOAB_FFLAGS "@FFLAGS@ @AM_FFLAGS@")

# Library and include defs
get_filename_component(MOAB_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)

if(NOT TARGET MOAB AND NOT MOAB_BINARY_DIR)
  include("${MOAB_CMAKE_DIR}/MOABTargets.cmake")
endif()

# Target information
set(MOAB_HAS_FBIGEOM "@ENABLE_IGEOM@")
set(MOAB_HAS_IMESH "@ENABLE_IMESH@")
set(MOAB_HAS_MPI "@MOAB_HAS_MPI@")

if(MOAB_USE_HDF)
  if(EXISTS "@HDF5_DIR@/share/cmake/hdf5/hdf5-config.cmake")
    include(@HDF5_DIR@/share/cmake/hdf5/hdf5-config.cmake)
  endif()
endif()

set(MOAB_LIBRARY_DIRS, "@CMAKE_INSTALL_PREFIX@/lib")
set(MOAB_INCLUDE_DIRS "@CMAKE_INSTALL_PREFIX@/include")
set(MOAB_LIBRARIES MOAB)
set(MOAB_LIBS @LIBS@)
