# This file sets:
# - FCGI_INCLUDE_DIRS
# - FCGI_LIBRARIES
# - FCGI_FOUND
#
# Taking into account:
# - FCGI_PREFIX

FIND_PATH(FCGI_INCLUDE_DIR
    fcgio.h
  PATHS
    /usr/include
    /usr/local/include
    /usr/include/fastcgi
)

FIND_LIBRARY(FCGI_LIB fcgi
  ${FCGI_PREFIX}/lib
  /usr/lib
  /usr/local/lib
)

FIND_LIBRARY(FCGIPP_LIB fcgi++
  ${FCGI_PREFIX}/lib
  /usr/lib
  /usr/local/lib
)

SET(FCGI_FOUND FALSE)

IF(FCGI_INCLUDE_DIR
    AND FCGI_LIB
    AND FCGIPP_LIB)
  SET(FCGI_FOUND TRUE)
  SET(FCGI_LIBRARIES ${FCGI_LIB} ${FCGIPP_LIB})
  SET(FCGI_INCLUDE_DIRS ${FCGI_INCLUDE_DIR})
ENDIF(FCGI_INCLUDE_DIR
    AND FCGI_LIB
    AND FCGIPP_LIB)
