Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'build_files/cmake/Modules/FindPulse.cmake')
-rw-r--r--build_files/cmake/Modules/FindPulse.cmake60
1 files changed, 60 insertions, 0 deletions
diff --git a/build_files/cmake/Modules/FindPulse.cmake b/build_files/cmake/Modules/FindPulse.cmake
new file mode 100644
index 00000000000..d5c37e7df10
--- /dev/null
+++ b/build_files/cmake/Modules/FindPulse.cmake
@@ -0,0 +1,60 @@
+# - Find PulseAudio library
+# Find the native PulseAudio includes and library
+# This module defines
+# LIBPULSE_INCLUDE_DIRS, where to find pulse/pulseaudio.h, Set when
+# LIBPULSE_INCLUDE_DIR is found.
+# LIBPULSE_LIBRARIES, libraries to link against to use PulseAudio.
+# LIBPULSE_ROOT_DIR, The base directory to search for PulseAudio.
+# This can also be an environment variable.
+# PULSE_FOUND, If false, do not try to use PulseAudio.
+#
+# also defined, but not for general use are
+# LIBPULSE_LIBRARY, where to find the PulseAudio library.
+
+#=============================================================================
+# Copyright 2021 Blender Foundation.
+#
+# Distributed under the OSI-approved BSD 3-Clause License,
+# see accompanying file BSD-3-Clause-license.txt for details.
+#=============================================================================
+
+# If LIBPULSE_ROOT_DIR was defined in the environment, use it.
+IF(NOT LIBPULSE_ROOT_DIR AND NOT $ENV{LIBPULSE_ROOT_DIR} STREQUAL "")
+ SET(LIBPULSE_ROOT_DIR $ENV{LIBPULSE_ROOT_DIR})
+ENDIF()
+
+SET(_pulse_SEARCH_DIRS
+ ${LIBPULSE_ROOT_DIR}
+)
+
+FIND_PATH(LIBPULSE_INCLUDE_DIR pulse/pulseaudio.h
+ HINTS
+ ${_pulse_SEARCH_DIRS}
+ PATH_SUFFIXES
+ include
+)
+
+FIND_LIBRARY(LIBPULSE_LIBRARY
+ NAMES
+ pulse
+ HINTS
+ ${_pulse_SEARCH_DIRS}
+ PATH_SUFFIXES
+ lib64 lib
+ )
+
+# handle the QUIETLY and REQUIRED arguments and set PULSE_FOUND to TRUE if
+# all listed variables are TRUE
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(Pulse DEFAULT_MSG
+ LIBPULSE_LIBRARY LIBPULSE_INCLUDE_DIR)
+
+IF(PULSE_FOUND)
+ SET(LIBPULSE_LIBRARIES ${LIBPULSE_LIBRARY})
+ SET(LIBPULSE_INCLUDE_DIRS ${LIBPULSE_INCLUDE_DIR})
+ENDIF()
+
+MARK_AS_ADVANCED(
+ LIBPULSE_INCLUDE_DIR
+ LIBPULSE_LIBRARY
+)