blob: 2d74fd629640cc4df50b993f7a8bb6ae8e0e9796 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
INCLUDE(FindPkgConfig)
PKG_CHECK_MODULES(alsa alsa)
PKG_CHECK_MODULES(pulseaudio libpulse libpulse-simple)
INCLUDE(FindThreads)
FIND_PACKAGE(Threads)
IF(alsa_FOUND)
MESSAGE(STATUS "ALSA found ; will compile Audio plugin... (PLUGIN)")
IF(pulseaudio_FOUND)
MESSAGE(STATUS "PulseAudio found ; Audio plugin will have PulseAudio support")
ADD_DEFINITIONS(-DHAVE_PULSE=1)
SET(pulse_sources audio-pulse.c)
ENDIF(pulseaudio_FOUND)
INCLUDE_DIRECTORIES(${include_dirs} ${alsa_INCLUDE_DIRS} ${pulseaudio_INCLUDE_DIRS})
ADD_LIBRARY(audio-api MODULE audio-api.c audio-alsa.c ${pulse_sources})
SET_TARGET_PROPERTIES(audio-api PROPERTIES
PREFIX ""
LINK_FLAGS "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/export.map"
)
TARGET_LINK_LIBRARIES(audio-api ${link_libraries} ${alsa_LIBRARIES} ${pulseaudio_LIBRARIES})
INSTALL(TARGETS audio-api
LIBRARY DESTINATION ${plugin_install_dir})
ENDIF(alsa_FOUND)
|