FIND_PATH(SFST_INCLUDE_DIR NAMES sfst/compact.h PATHS /usr/include /usr/include/sfst-1.0 /usr/local/include PATH_SUFFIXES /sfst ) FIND_LIBRARY(SFST_LIBRARY NAMES sfst sfst1 PATH /usr/lib /usr/local/lib) MARK_AS_ADVANCED(SFST_LIBRARY) MARK_AS_ADVANCED(SFST_INCLUDE_DIR) IF (SFST_INCLUDE_DIR AND SFST_LIBRARY) SET(SFST_FOUND TRUE) ENDIF (SFST_INCLUDE_DIR AND SFST_LIBRARY) IF (SFST_FOUND) IF (NOT SFST_FIND_QUIETLY) MESSAGE(STATUS "Found libsfst: ${SFST_LIBRARY} ${SFST_INCLUDE_DIR}") ENDIF (NOT SFST_FIND_QUIETLY) ELSE (SFST_FOUND) IF (SFST_FIND_REQUIRED) MESSAGE(FATAL_ERROR "Could not find libsfst (${SFST_LIBRARY} ${SFST_INCLUDE_DIR})") ELSE (SFST_FIND_REQUIRED) IF (NOT SFST_FIND_QUIETLY) MESSAGE(STATUS "libsfst NOT found (${SFST_LIBRARY} ${SFST_INCLUDE_DIR})") ENDIF (NOT SFST_FIND_QUIETLY) ENDIF (SFST_FIND_REQUIRED) ENDIF (SFST_FOUND)