# modified by Kongbin to add support for volume rendering

SET (HAS_BGUI3D "NO")
IF (BGUI3D_FOUND)

  # Find the Coin3D library
  INCLUDE( ${MODULE_PATH}/NewCMake/FindCoin3D.cmake )
  
  IF (COIN3D_FOUND)
    INCLUDE_DIRECTORIES( ${COIN3D_INCLUDE_DIR} )
    SET( HAS_BGUI3D "YES" )
    ADD_DEFINITIONS( -DHAS_BGUI3D )
    LINK_LIBRARIES( ${COIN3D_LIBRARY} )
  ENDIF (COIN3D_FOUND)

  # Find the SimVoleon library
  INCLUDE( ${MODULE_PATH}/NewCMake/FindSIMVoleon.cmake )

  IF (SIMVOLEON_FOUND)
    INCLUDE_DIRECTORIES( ${SIMVOLEON_INCLUDE_DIR} )
    LINK_LIBRARIES ( ${SIMVOLEON_LIBRARY} )
  ENDIF (SIMVOLEON_FOUND)

  INCLUDE_DIRECTORIES( ${brl_INCLUDE_DIR} )

ENDIF (BGUI3D_FOUND)

# This case is for using BGUI3D in an external project
IF (VXL_BGUI3D_FOUND)

  INCLUDE_DIRECTORIES( ${VXL_BRL_INCLUDE_DIR} )
  INCLUDE_DIRECTORIES( ${VXL_COIN3D_INCLUDE_DIR} )
  ADD_DEFINITIONS( -DHAS_BGUI3D )
  ADD_DEFINITIONS ( -DCOIN_NOT_DLL )
  SET( HAS_BGUI3D "YES" )

ENDIF (VXL_BGUI3D_FOUND)
