#-----------------------------------------------------------------------------
# HDF4 Config file for compiling against hdf4 build directory
#-----------------------------------------------------------------------------
GET_FILENAME_COMPONENT (SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)

#-----------------------------------------------------------------------------
# User Options
#-----------------------------------------------------------------------------
set (HDF4_ENABLE_PARALLEL @HDF4_ENABLE_PARALLEL@)
set (HDF4_BUILD_FORTRAN   @HDF4_BUILD_FORTRAN@)
set (HDF4_BUILD_XDR_LIB   @HDF4_BUILD_XDR_LIB@)
set (HDF4_BUILD_TOOLS     @HDF4_BUILD_TOOLS@)
set (HDF4_BUILD_UTILS     @HDF4_BUILD_UTILS@)
set (HDF4_ENABLE_JPEG_LIB_SUPPORT @HDF4_ENABLE_JPEG_LIB_SUPPORT@)
set (HDF4_ENABLE_Z_LIB_SUPPORT @HDF4_ENABLE_Z_LIB_SUPPORT@)
set (HDF4_ENABLE_SZIP_SUPPORT  @HDF4_ENABLE_SZIP_SUPPORT@)
set (HDF4_ENABLE_SZIP_ENCODING @HDF4_ENABLE_SZIP_ENCODING@)
set (HDF4_BUILD_SHARED_LIBS    @BUILD_SHARED_LIBS@)

#-----------------------------------------------------------------------------
# Directories
#-----------------------------------------------------------------------------
set (HDF4_INCLUDE_DIR "@HDF4_INCLUDES_BUILD_TIME@")

if (HDF4_BUILD_FORTRAN)
  set (HDF4_INCLUDE_DIR_FORTRAN "@CMAKE_Fortran_MODULE_DIRECTORY@" )
endif (HDF4_BUILD_FORTRAN)
  
if (HDF4_BUILD_XDR_LIB)
  set (HDF4_INCLUDE_DIR_XDR ${HDF4_INCLUDE_DIR} )
endif (HDF4_BUILD_XDR_LIB)

if (HDF4_BUILD_TOOLS)
  set (HDF4_INCLUDE_DIR_TOOLS ${HDF4_INCLUDE_DIR} )
endif (HDF4_BUILD_TOOLS)

if (HDF4_BUILD_UTILS)
  set (HDF4_INCLUDE_DIR_UTILS ${HDF4_INCLUDE_DIR} )
endif (HDF4_BUILD_UTILS)

if (HDF4_BUILD_SHARED_LIBS)
  set (H4_BUILT_AS_DYNAMIC_LIB 1 )
else (HDF4_BUILD_SHARED_LIBS)
  set (H4_BUILT_AS_STATIC_LIB 1 )
endif (HDF4_BUILD_SHARED_LIBS)

#-----------------------------------------------------------------------------
# Version Strings
#-----------------------------------------------------------------------------
set (HDF4_VERSION_STRING @HDF4_VERSION_STRING@)
set (HDF4_VERSION_MAJOR  @HDF4_VERSION_MAJOR@)
set (HDF4_VERSION_MINOR  @HDF4_VERSION_MINOR@)

#-----------------------------------------------------------------------------
# Don't include targets if this file is being picked up by another
# project which has already build hdf4 as a subproject
#-----------------------------------------------------------------------------
if (NOT TARGET "@HDF4_PACKAGE@")
  include (${SELF_DIR}/@HDF4_PACKAGE@@HDF_PACKAGE_EXT@-targets.cmake)
  set (HDF4_LIBRARIES "@HDF4_LIBRARIES_TO_EXPORT@")
endif (NOT TARGET "@HDF4_PACKAGE@")
