# - Find lucene++
# LUCENEPP_INCLUDE_DIR root lucene++ include dir
# LUCENEPP_LIBRARIES path to the lucene++ shared library 

FIND_PACKAGE(PkgConfig)
pkg_check_modules(PC_LUCENEPP liblucene++)

FIND_PATH(LUCENEPP_INCLUDE_DIR NAMES Lucene.h
    HINTS
    ${PC_LUCENEPP_INCLUDEDIR}
    ${PC_LUCENEPP_INCLUDE_DIRS}
    ${CMAKE_INSTALL_INCLUDEDIR}/lucene++
    )

FIND_LIBRARY(LUCENEPP_LIBRARIES NAMES lucene++
    HINTS
    ${PC_LUCENEPP_LIBDIR}
    ${PC_LUCENEPP_LIBRARY_DIRS}
    ${CMAKE_INSTALL_LIBDIR}
    )

FIND_PACKAGE_HANDLE_STANDARD_ARGS(LUCENEPP
    REQUIRED_VARS LUCENEPP_INCLUDE_DIR LUCENEPP_LIBRARIES)

MARK_AS_ADVANCED(LUCENEPP_INCLUDE_DIR LUCENEPP_LIBRARIES)
