2010-01-22 04:36:49 +00:00
|
|
|
# Try to find PortAudio
|
|
|
|
# Once done, this will define
|
|
|
|
#
|
|
|
|
# PORTAUDIO_FOUND - system has PortAudio
|
|
|
|
# PORTAUDIO_INCLUDE_DIR - the PortAudio include directories
|
|
|
|
# PORTAUDIO_LIBRARIES - link these to use PortAudio
|
|
|
|
|
|
|
|
if(PORTAUDIO_INCLUDE_DIR AND PORTAUDIO_LIBRARIES)
|
|
|
|
set(PORTAUDIO_FIND_QUIETLY TRUE)
|
|
|
|
endif(PORTAUDIO_INCLUDE_DIR AND PORTAUDIO_LIBRARIES)
|
|
|
|
|
2011-03-02 18:18:26 +00:00
|
|
|
# Search both portaudio.h and pa_linux_alsa.h to ensure the user gets
|
|
|
|
# the include of the V2 API (V1 have only portaudio.h)
|
|
|
|
find_path(PORTAUDIO_INCLUDE_DIR NAMES portaudio.h pa_linux_alsa.h)
|
2010-01-22 04:36:49 +00:00
|
|
|
|
|
|
|
# finally the library itself
|
|
|
|
find_library(libPortAudio NAMES portaudio)
|
2011-03-02 18:18:26 +00:00
|
|
|
# Run OK without libportaudiocpp so do not pull additional dependency
|
2010-06-04 11:07:25 +00:00
|
|
|
set(PORTAUDIO_LIBRARIES ${libPortAudio})
|
2010-01-22 04:36:49 +00:00
|
|
|
|
|
|
|
# handle the QUIETLY and REQUIRED arguments and set PORTAUDIO_FOUND to TRUE if
|
|
|
|
# all listed variables are TRUE
|
|
|
|
include(FindPackageHandleStandardArgs)
|
|
|
|
find_package_handle_standard_args(PortAudio DEFAULT_MSG PORTAUDIO_LIBRARIES PORTAUDIO_INCLUDE_DIR)
|
|
|
|
|
|
|
|
mark_as_advanced(PORTAUDIO_LIBRARIES PORTAUDIO_INCLUDE_DIR)
|
|
|
|
|