File: FindVorbis.cmake

package info (click to toggle)
jazz2-native 3.5.0-1
  • links: PTS, VCS
  • area: contrib
  • in suites:
  • size: 16,836 kB
  • sloc: cpp: 172,557; xml: 113; python: 36; makefile: 5; sh: 2
file content (65 lines) | stat: -rw-r--r-- 1,514 bytes parent folder | download | duplicates (3)
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# - Find vorbis
# Find the native vorbis includes and libraries
#
#  VORBIS_INCLUDE_DIR - where to find vorbis.h, etc.
#  VORBIS_LIBRARIES   - List of libraries when using vorbis(file).
#  VORBIS_FOUND       - True if vorbis found.

if(VORBIS_INCLUDE_DIR)
	# Already in cache, be silent
	set(VORBIS_FIND_QUIETLY TRUE)
endif(VORBIS_INCLUDE_DIR)

find_path(VORBIS_INCLUDE_DIR vorbis/vorbisfile.h
	PATHS
	~/Library/Frameworks
	/Library/Frameworks
	/usr/local/include/SDL2
	/usr/include/SDL2
	/sw # Fink
	/opt/local # DarwinPorts
	/opt/csw # Blastwave
	/opt
	${EXTERNAL_INCLUDES_DIR}/SDL2/
)

find_library(OGG_LIBRARY NAMES ogg
	PATHS
	/sw
	/opt/local
	/opt/csw
	/opt
	${NCINE_LIBS}/Linux/${CMAKE_SYSTEM_PROCESSOR}/
)
find_library(VORBIS_LIBRARY NAMES vorbis
	PATHS
	/sw
	/opt/local
	/opt/csw
	/opt
	${NCINE_LIBS}/Linux/${CMAKE_SYSTEM_PROCESSOR}/
)
find_library(VORBISFILE_LIBRARY NAMES vorbisfile
	PATHS
	/sw
	/opt/local
	/opt/csw
	/opt
	${NCINE_LIBS}/Linux/${CMAKE_SYSTEM_PROCESSOR}/
)

# Handle the QUIETLY and REQUIRED arguments and set VORBIS_FOUND to TRUE if
# all listed variables are TRUE.
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Vorbis DEFAULT_MSG
	OGG_LIBRARY VORBIS_LIBRARY VORBISFILE_LIBRARY VORBIS_INCLUDE_DIR)

if(VORBIS_FOUND)
	set(VORBIS_LIBRARIES ${VORBISFILE_LIBRARY} ${VORBIS_LIBRARY} ${OGG_LIBRARY})
else(VORBIS_FOUND)
	set(VORBIS_LIBRARIES)
endif(VORBIS_FOUND)

mark_as_advanced(VORBIS_INCLUDE_DIR)
mark_as_advanced(OGG_LIBRARY VORBIS_LIBRARY VORBISFILE_LIBRARY)