summaryrefslogtreecommitdiff
path: root/cmake/Modules/FindOSS.cmake
blob: 105b3ec9ca14d44f65996d620645e7878ed1c0f9 (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 Oss
# Find Oss headers and libraries.
#
#  OSS_INCLUDE_DIR  -  where to find soundcard.h, etc.
#  OSS_FOUND        - True if Oss found.


FIND_PATH(LINUX_OSS_INCLUDE_DIR "linux/soundcard.h"
  "/usr/include" "/usr/local/include"
)

FIND_PATH(SYS_OSS_INCLUDE_DIR "sys/soundcard.h"
  "/usr/include" "/usr/local/include"
)

FIND_PATH(MACHINE_OSS_INCLUDE_DIR "machine/soundcard.h"
  "/usr/include" "/usr/local/include"
)

SET(OSS_FOUND FALSE)

IF(LINUX_OSS_INCLUDE_DIR)
	SET(OSS_FOUND TRUE)
	SET(OSS_INCLUDE_DIR ${LINUX_OSS_INCLUDE_DIR})
	SET(HAVE_LINUX_SOUNDCARD_H 1)
ENDIF()

IF(SYS_OSS_INCLUDE_DIR)
	SET(OSS_FOUND TRUE)
	SET(OSS_INCLUDE_DIR ${SYS_OSS_INCLUDE_DIR})
	SET(HAVE_SYS_SOUNDCARD_H 1)
ENDIF()

IF(MACHINE_OSS_INCLUDE_DIR)
	SET(OSS_FOUND TRUE)
	SET(OSS_INCLUDE_DIR ${MACHINE_OSS_INCLUDE_DIR})
	SET(HAVE_MACHINE_SOUNDCARD_H 1)
ENDIF()

MARK_AS_ADVANCED (
	OSS_FOUND
	OSS_INCLUDE_DIR
	LINUX_OSS_INCLUDE_DIR
	SYS_OSS_INCLUDE_DIR
	MACHINE_OSS_INCLUDE_DIR
)