include(FindPkgConfig) if(PKG_CONFIG_FOUND) pkg_check_modules(PULSE libpulse) endif() find_path(PULSE_INCLUDE_DIR pulse/pulseaudio.h PATHS ${PULSE_INCLUDE_DIRS} PATH_SUFFIXES pulse ) find_library(PULSE_LIBRARY pulse PATHS ${PULSE_LIBRARY_DIRS}) FIND_PACKAGE_HANDLE_STANDARD_ARGS(PulseAudio DEFAULT_MSG PULSE_INCLUDE_DIR PULSE_LIBRARY) mark_as_advanced(PULSE_INCLUDE_DIR PULSE_LIBRARY)