# RtMidi
#  RTMIDI_FOUND
#  RTMIDI_INCLUDE_DIR
#  RTMIDI_LIBRARIES
#  RTMIDI_DEFINITIONS

find_package(PkgConfig)
pkg_check_modules(PC_RTMIDI QUIET RtMidi)
set(RTMIDI_DEFINITIONS ${PC_RTMIDI_CFLAGS_OTHER})

find_path(RTMIDI_INCLUDE_DIR RtMidi.h
    HINTS ${PC_RTMIDI_INCLUDEDIR} ${PC_RTMIDI_INCLUDE_DIRS})

find_library(RTMIDI_LIBRARY NAMES rtmidi
    HINTS ${PC_RTMIDI_LIBDIR} ${PC_RTMIDI_LIBRARY_DIRS})

set(RTMIDI_LIBRARIES ${RTMIDI_LIBRARY})
set(RTMIDI_INCLUDE_DIRS ${RTMIDI_INCLUDE_DIR})

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(RtMidi DEFAULT_MSG
    RTMIDI_LIBRARY RTMIDI_INCLUDE_DIR)

mark_as_advanced(RTMIDI_INCLUDE_DIR RTMIDI_LIBRARY)
