# QEXTSERIALPORT_FOUND - system has the QextSerialPort library
# QEXTSERIALPORT_INCLUDE_DIR - the QextSerialPort include directory
# QEXTSERIALPORT_LIBRARIES - The libraries needed to use QextSerialPort

if(QEXTSERIALPORT_INCLUDE_DIR AND QEXTSERIALPORT_LIBRARIES)
  set(QEXTSERIALPORT_FOUND TRUE)
else(QEXTSERIALPORT_INCLUDE_DIR AND QEXTSERIALPORT_LIBRARIES)

  find_path(QEXTSERIALPORT_INCLUDE_DIR NAMES qextserialport.h PATH_SUFFIXES QtExtSerialPort HINTS ${QT_INCLUDE_DIR})
  find_library(QEXTSERIALPORT_LIBRARIES NAMES qextserialport HINTS ${QT_LIBRARY_DIR})

  include(FindPackageHandleStandardArgs)
  find_package_handle_standard_args(QextSerialPort DEFAULT_MSG QEXTSERIALPORT_INCLUDE_DIR QEXTSERIALPORT_LIBRARIES)

  mark_as_advanced(QEXTSERIALPORT_INCLUDE_DIR QEXTSERIALPORT_LIBRARIES)
endif(QEXTSERIALPORT_INCLUDE_DIR AND QEXTSERIALPORT_LIBRARIES)
