client-root/cmake/FindPortAudio.cmake

54 lines
1.7 KiB
CMake
Raw Normal View History

2019-07-01 06:40:51 -04:00
# - Try to find PortAudio include dirs and libraries
#
# Usage of this module as follows:
#
# find_package(PortAudio)
#
# Variables used by this module, they can change the default behaviour and need
# to be set before calling find_package:
#
# PortAudio_ROOT_DIR Set this variable to the root installation of
# PortAudio if the module has problems finding the
# proper installation path.
#
# Variables defined by this module:
#
# PortAudio_FOUND System has PortAudio, include and library dirs found
# PortAudio_INCLUDE_DIR The PortAudio include directories.
# PortAudio_LIBRARIES_STATIC The PortAudio libraries.
# PortAudio_LIBRARIES_SHARED The PortAudio libraries.
include(tearoot-helper)
include(FindPackageHandleStandardArgs)
2019-07-01 06:40:51 -04:00
find_path(PortAudio_ROOT_DIR
NAMES include/portaudio.h
HINTS ${PortAudio_ROOT_DIR} ${PortAudio_ROOT_DIR}/${BUILD_OUTPUT}
2019-07-01 06:40:51 -04:00
)
find_path(PortAudio_INCLUDE_DIR
NAMES portaudio.h
HINTS ${PortAudio_ROOT_DIR} ${PortAudio_ROOT_DIR}/include/
2019-07-01 06:40:51 -04:00
)
find_library(PortAudio_LIBRARIES_STATIC
2019-11-09 17:14:06 -05:00
NAMES libportaudio.a libportaudio_static.a portaudio_static_x64.a portaudio_static_x64.lib
HINTS ${PortAudio_ROOT_DIR} ${PortAudio_ROOT_DIR}/lib
2019-07-01 06:40:51 -04:00
)
find_library(PortAudio_LIBRARIES_SHARED
2019-07-03 07:27:12 -04:00
NAMES libportaudio.so portaudio_shared_x64.dll portaudio_shared_x64.so
HINTS ${PortAudio_ROOT_DIR} ${PortAudio_ROOT_DIR}/lib
2019-07-01 06:40:51 -04:00
)
find_package_handle_standard_args(PortAudio DEFAULT_MSG
PortAudio_INCLUDE_DIR
)
mark_as_advanced(
PortAudio_ROOT_DIR
PortAudio_INCLUDE_DIR
PortAudio_LIBRARIES_STATIC
PortAudio_LIBRARIES_SHARED
2019-11-09 17:14:06 -05:00
)