mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 17:19:44 -06:00
CMake: move modules from CMakeTests/ -> CMake/
The name "CMakeTests" is inaccurate and irregular.
This commit is contained in:
42
CMake/FindPulseAudio.cmake
Normal file
42
CMake/FindPulseAudio.cmake
Normal file
@ -0,0 +1,42 @@
|
||||
# - Find PulseAudio library
|
||||
# This module defines
|
||||
# PulseAudio_INCLUDE_DIR
|
||||
# PulseAudio_LIBRARIES
|
||||
# PulseAudio_FOUND
|
||||
#
|
||||
# vim: expandtab sw=4 ts=4 sts=4:
|
||||
|
||||
include(FindPkgConfig)
|
||||
pkg_check_modules (PulseAudio_PKG QUIET libpulse)
|
||||
|
||||
find_path(PulseAudio_INCLUDE_DIR NAMES pulse/pulseaudio.h
|
||||
PATHS
|
||||
${PulseAudio_PKG_INCLUDE_DIRS}
|
||||
/usr/include/pulse
|
||||
/usr/include
|
||||
/usr/local/include/pulse
|
||||
/usr/local/include
|
||||
)
|
||||
|
||||
find_library(PulseAudio_LIBRARIES NAMES pulse
|
||||
PATHS
|
||||
${PulseAudio_PKG_LIBRARY_DIRS}
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(PulseAudio
|
||||
REQUIRED_VARS PulseAudio_LIBRARIES PulseAudio_INCLUDE_DIR)
|
||||
|
||||
if(PulseAudio_FOUND)
|
||||
if(NOT TARGET PulseAudio::PulseAudio)
|
||||
add_library(PulseAudio::PulseAudio UNKNOWN IMPORTED)
|
||||
set_target_properties(PulseAudio::PulseAudio PROPERTIES
|
||||
IMPORTED_LOCATION ${PulseAudio_LIBRARIES}
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${PulseAudio_INCLUDE_DIR}
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
mark_as_advanced(PulseAudio_INCLUDE_DIR PulseAudio_LIBRARIES)
|
Reference in New Issue
Block a user