Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/buildsystem2/cmake/FindOggVorbis.cmake @ 2559

Last change on this file since 2559 was 2510, checked in by rgrieder, 16 years ago

Merged revisions 2279-2401 of the buildsystem branch to buildsystem2.

  • Property svn:eol-style set to native
File size: 1.6 KB
Line 
1# - Try to find ogg/vorbis
2# Once done this will define
3#
4#  OGG_FOUND - system has ogg
5#  OGG_INCLUDE_DIR
6#  OGG_LIBRARY
7#  VORBIS_FOUND - system has vorbis
8#  VORBIS_INCLUDE_DIR
9#  VORBIS_LIBRARY
10#  VORBISENC_LIBRARY
11#  VORBISFILE_LIBRARY
12#
13# $OGGVORBISDIR is an environment variable used for finding ogg/vorbis.
14#
15# Several changes and additions by Fabian 'x3n' Landau
16# Most of all rewritten by Adrian Friedli
17#                 > www.orxonox.net <
18
19SET(OGG_SEARCH_PATHS
20  $ENV{OGGVORBISDIR}
21  /usr/local
22  /usr
23  /sw
24  /opt/local
25  /opt/csw
26  /opt
27)
28
29FIND_PATH(OGG_INCLUDE_DIR ogg/ogg.h
30  PATHS ${OGG_SEARCH_PATHS}
31  PATH_SUFFIXES include
32)
33
34FIND_PATH(VORBIS_INCLUDE_DIR vorbis/codec.h
35  PATHS ${OGG_SEARCH_PATHS}
36  PATH_SUFFIXES include
37)
38
39FIND_LIBRARY(OGG_LIBRARY NAMES ogg
40  PATHS ${OGG_SEARCH_PATHS}
41  PATH_SUFFIXES lib
42)
43
44FIND_LIBRARY(VORBIS_LIBRARY NAMES vorbis
45  PATHS ${OGG_SEARCH_PATHS}
46  PATH_SUFFIXES lib
47)
48
49#FIND_LIBRARY(VORBISENC_LIBRARY NAMES vorbisenc
50#  PATHS ${OGG_SEARCH_PATHS}
51#  PATH_SUFFIXES lib
52#)
53
54FIND_LIBRARY(VORBISFILE_LIBRARY NAMES vorbisfile
55  PATHS ${OGG_SEARCH_PATHS}
56  PATH_SUFFIXES lib
57)
58
59# handle the QUIETLY and REQUIRED arguments and set *_FOUND to TRUE if
60# all listed variables are TRUE
61INCLUDE(FindPackageHandleStandardArgs)
62FIND_PACKAGE_HANDLE_STANDARD_ARGS(OGG DEFAULT_MSG OGG_LIBRARY OGG_INCLUDE_DIR)
63FIND_PACKAGE_HANDLE_STANDARD_ARGS(VORBIS DEFAULT_MSG
64  VORBIS_LIBRARY
65  VORBISFILE_LIBRARY
66  #VORBISENC_LIBRARY
67  VORBIS_INCLUDE_DIR
68)
69
70MARK_AS_ADVANCED(
71  OGG_LIBRARY
72  OGG_INCLUDE_DIR
73  VORBIS_LIBRARY
74  VORBISFILE_LIBRARY
75  #VORBISENC_LIBRARY
76  VORBIS_INCLUDE_DIR
77)
Note: See TracBrowser for help on using the repository browser.