forked from facebookarchive/RakNet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
FindPortAudio.cmake
28 lines (22 loc) · 946 Bytes
/
FindPortAudio.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# 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)
# include dir
find_path(PORTAUDIO_INCLUDE_DIR portaudio.h
/usr/include/
)
# Finally the library itself.
find_library(libPortAudio NAMES portaudio)
find_library(libPortAudioCpp NAMES portaudiocpp)
set(PORTAUDIO_LIBRARIES ${libPortAudio} ${libPortAudioCpp})
# 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)