FIND_PATH(NanoFLANN_PATH nanoflann.hpp PATHS /usr /opt /var)

IF (NanoFLANN_PATH)
   SET(NanoFLANN_INCLUDE_DIR ${NanoFLANN_PATH})
   SET(NanoFLANN_FOUND TRUE)
ELSE (NanoFLANN_PATH)
   SET(NanoFLANN_INCLUDE_DIR "NOTFOUND")
   SET(NanoFLANN_FOUND FALSE)
ENDIF(NanoFLANN_PATH)

IF (NanoFLANN_FOUND)
   IF (NOT NanoFLANN_FIND_QUIETLY)
      MESSAGE(STATUS "Found NanoFLANN in: ${NanoFLANN_PATH}")
   ENDIF (NOT NanoFLANN_FIND_QUIETLY)
ELSE (NanoFLANN_FOUND)
   IF (NanoFLANN_FIND_REQUIRED)
      MESSAGE(FATAL_ERROR "Could not find NanoFLANN")
   ENDIF (NanoFLANN_FIND_REQUIRED)
ENDIF (NanoFLANN_FOUND)