blob: 28bd4083d07ca388b876872e02d9a43a057f81cd (
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
#
# Find ALSA for linux platforms
# by etnlegend@newsmth
IF ( ALSA_INCLUDE_DIR )
SET ( ALSA_FIND_QUIETLY TRUE )
ENDIF ( ALSA_INCLUDE_DIR )
SET ( ALSA_HDR_NAME "alsa/asoundlib.h" )
FIND_PATH ( ALSA_INCLUDE_DIR "${ALSA_HDR_NAME}"
"/usr/local/include" "/usr/include"
)
SET ( ALSA_LIB_NAME "asound" )
FIND_LIBRARY ( ALSA_LIBRARY
NAMES "${ALSA_LIB_NAME}"
PATHS "/usr/local/lib" "/usr/lib"
)
IF ( ALSA_INCLUDE_DIR AND ALSA_LIBRARY )
SET ( ALSA_FOUND TRUE )
SET ( ALSA_LIBRARIES "${ALSA_LIBRARY}" )
ELSE ( ALSA_INCLUDE_DIR AND ALSA_LIBRARY )
SET ( ALSA_FOUND FALSE )
SET ( ALSA_LIBRARIES )
ENDIF ( ALSA_INCLUDE_DIR AND ALSA_LIBRARY )
IF ( ALSA_FOUND )
IF ( NOT ALSA_FIND_QUIETLY )
MESSAGE ( STATUS "Found ALSA: ${ALSA_LIBRARY} ${ALSA_INCLUDE_DIR}/${ALSA_HDR_NAME}" )
ENDIF ( NOT ALSA_FIND_QUIETLY )
ELSE ( ALSA_FOUND )
IF ( ALSA_FIND_REQUIRED )
MESSAGE ( FATAL_ERROR "FAILED to found ALSA - REQUIRED" )
ELSE ( ALSA_FIND_REQUIRED )
MESSAGE ( STATUS "Disabled ALSA" )
ENDIF ( ALSA_FIND_REQUIRED )
ENDIF ( ALSA_FOUND )
MARK_AS_ADVANCED (
ALSA_LIBRARY
ALSA_INCLUDE_DIR
)
|