# Locate Carbon
# This module defines
# CARBON_LIBRARY
# CARBON_FOUND
# CARBON_INCLUDE_DIR

IF(APPLE)
  FIND_PATH(CARBON_INCLUDE_DIR Carbon/Carbon.h)
  FIND_LIBRARY(CARBON_LIBRARY Carbon)
ELSE(APPLE)
  FIND_PATH(CARBON_INCLUDE_DIR Carbon.h
    HINTS
    $ENV{CARBON_DIR}/include
    $ENV{CARBON_DIR}
  )
  FIND_LIBRARY(CARBON_LIBRARY Carbon
    HINTS
    $ENV{CARBON_DIR}/lib
    $ENV{CARBON_DIR}
  )
ENDIF(APPLE)

SET(CARBON_FOUND "NO")
IF(CARBON_LIBRARY AND CARBON_INCLUDE_DIR)
  SET(CARBON_FOUND "YES")
ENDIF(CARBON_LIBRARY AND CARBON_INCLUDE_DIR)
