Files
itgmania212121/CMake/Modules/FindPulseAudio.cmake
T
Jason Felds dc94728628 Introduce cmake (min 2.8.12) to StepMania.
tl-dr: view the Build directory to see.

This is intended to replace the project files that we presently maintain
so that only a single set is needed instead of multiples.

The following setups were used for testing:

* Windows 8 and Visual Studio 2013 Desktop Express
* Windows 7 and Visual Studio 2012
* Mac OS X Mavericks and Xcode
* Ubuntu and makefiles
* Fedora 21 and makefiles

All three operating systems can generate projects, compile, link, and
run. Windows and Mac OS X users will find their compiled binary in the
same location as before, but Linux users will be surprised: it goes
straight into the root directory, along with a symlinked GtkModules.so
as appropriate. There is no more need for a manual symlinking step.

Known issues:

* At this time, MinGW likely does not work. Extra time will be needed.
* The WITH_JPEG option may go away, and we'll just always require it.
* Some linux libraries can use the system equivalents, but that is not up yet.

For more information, check out the Build directory.
2015-03-21 20:15:15 -04:00

48 lines
1.6 KiB
CMake

# This comes from the PulseAudio QT project.
# Try to find the PulseAudio library
#
# Once done this will define:
#
# PULSEAUDIO_FOUND - system has the PulseAudio library
# PULSEAUDIO_INCLUDE_DIR - the PulseAudio include directory
# PULSEAUDIO_LIBRARY - the libraries needed to use PulseAudio
#
# Copyright (c) 2008, Matthias Kretz, <kretz@kde.org>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
#
# There was no COPYING-CMAKE-SCRIPTS file in the repo in question. --wolfman
if (PULSEAUDIO_INCLUDE_DIR AND PULSEAUDIO_LIBRARY)
# Already in cache, be silent
set(PULSEAUDIO_FIND_QUIETLY TRUE)
endif (PULSEAUDIO_INCLUDE_DIR AND PULSEAUDIO_LIBRARY)
if (NOT WIN32)
include(FindPkgConfig)
pkg_check_modules(PULSEAUDIO libpulse)
if(PULSEAUDIO_FOUND)
set(PULSEAUDIO_LIBRARY ${PULSEAUDIO_LIBRARIES} CACHE FILEPATH "Path to the PulseAudio library")
set(PULSEAUDIO_INCLUDE_DIR ${PULSEAUDIO_INCLUDEDIR} CACHE PATH "Path to the PulseAudio includes")
# PULSEAUDIO_DEFINITIONS - Compiler switches required for using PulseAudio
# set(PULSEAUDIO_DEFINITIONS ${PULSEAUDIO_CFLAGS})
endif(PULSEAUDIO_FOUND)
endif (NOT WIN32)
if (NOT PULSEAUDIO_INCLUDE_DIR)
FIND_PATH(PULSEAUDIO_INCLUDE_DIR pulse/pulseaudio.h)
endif (NOT PULSEAUDIO_INCLUDE_DIR)
if (NOT PULSEAUDIO_LIBRARY)
FIND_LIBRARY(PULSEAUDIO_LIBRARY NAMES pulse)
endif (NOT PULSEAUDIO_LIBRARY)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(PULSEAUDIO DEFAULT_MSG
PULSEAUDIO_INCLUDE_DIR PULSEAUDIO_LIBRARY)
mark_as_advanced(PULSEAUDIO_INCLUDE_DIR PULSEAUDIO_LIBRARY)