Annotation of hatari/cmake/FindPortAudio.cmake, revision 1.1

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)
        !             9: include(CheckFunctionExists)
        !            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})
        !            28:        check_function_exists(Pa_GetDefaultInputDevice HAVE_PA_GETDEFAULTINPUTDEVICE)
        !            29:        if (NOT HAVE_PA_GETDEFAULTINPUTDEVICE)
        !            30:                unset (PORTAUDIO_FOUND)
        !            31:        endif(NOT HAVE_PA_GETDEFAULTINPUTDEVICE)
        !            32:        set(CMAKE_REQUIRED_LIBRARIES "")
        !            33: endif(PORTAUDIO_FOUND)
        !            34: 
        !            35: mark_as_advanced(PORTAUDIO_LIBRARY PORTAUDIO_INCLUDE_DIR)

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.