|
|
1.1 root 1: #
2: # Find the native PORTAUDIO (version 2) includes and library
3: #
4: # PORTAUDIO_INCLUDE_DIR - where to find portaudio.h, etc.
5: # PORTAUDIO_LIBRARY - List of libraries when using portaudio.
6: # PORTAUDIO_FOUND - True if portaudio found.
7:
8: include(FindPackageHandleStandardArgs)
1.1.1.2 ! root 9: include(CheckSymbolExists)
1.1 root 10:
11: if(PORTAUDIO_INCLUDE_DIR)
12: # Already in cache, be silent
13: set(PORTAUDIO_FIND_QUIETLY TRUE)
14: endif(PORTAUDIO_INCLUDE_DIR)
15:
16: find_path(PORTAUDIO_INCLUDE_DIR portaudio.h)
17:
18: find_library(PORTAUDIO_LIBRARY NAMES portaudio)
19:
20: # handle the QUIETLY and REQUIRED arguments and set PORTAUDIO_FOUND to TRUE if
21: # all listed variables are TRUE
22: find_package_handle_standard_args(PORTAUDIO DEFAULT_MSG
23: PORTAUDIO_LIBRARY PORTAUDIO_INCLUDE_DIR)
24:
25: # Check if it's really a portaudio2 installation...
26: if(PORTAUDIO_FOUND)
27: set(CMAKE_REQUIRED_LIBRARIES ${PORTAUDIO_LIBRARY})
1.1.1.2 ! root 28: set(CMAKE_REQUIRED_INCLUDES ${PORTAUDIO_INCLUDE_DIR})
! 29: check_symbol_exists(Pa_GetDefaultInputDevice "portaudio.h" HAVE_PA_GETDEFAULTINPUTDEVICE)
1.1 root 30: if (NOT HAVE_PA_GETDEFAULTINPUTDEVICE)
31: unset (PORTAUDIO_FOUND)
32: endif(NOT HAVE_PA_GETDEFAULTINPUTDEVICE)
1.1.1.2 ! root 33: set(CMAKE_REQUIRED_INCLUDES "")
1.1 root 34: set(CMAKE_REQUIRED_LIBRARIES "")
35: endif(PORTAUDIO_FOUND)
36:
37: mark_as_advanced(PORTAUDIO_LIBRARY PORTAUDIO_INCLUDE_DIR)
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.