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
RevLine 
[2509]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#
[1776]15# Several changes and additions by Fabian 'x3n' Landau
[2509]16# Most of all rewritten by Adrian Friedli
[1776]17#                 > www.orxonox.net <
[1505]18
[2509]19SET(OGG_SEARCH_PATHS
20  $ENV{OGGVORBISDIR}
21  /usr/local
22  /usr
23  /sw
24  /opt/local
25  /opt/csw
26  /opt
27)
[1776]28
[1505]29FIND_PATH(OGG_INCLUDE_DIR ogg/ogg.h
[2509]30  PATHS ${OGG_SEARCH_PATHS}
31  PATH_SUFFIXES include
32)
[1505]33
34FIND_PATH(VORBIS_INCLUDE_DIR vorbis/codec.h
[2509]35  PATHS ${OGG_SEARCH_PATHS}
36  PATH_SUFFIXES include
37)
[1505]38
[2509]39FIND_LIBRARY(OGG_LIBRARY NAMES ogg
40  PATHS ${OGG_SEARCH_PATHS}
41  PATH_SUFFIXES lib
42)
[1505]43
[2509]44FIND_LIBRARY(VORBIS_LIBRARY NAMES vorbis
45  PATHS ${OGG_SEARCH_PATHS}
46  PATH_SUFFIXES lib
47)
[1505]48
[2509]49#FIND_LIBRARY(VORBISENC_LIBRARY NAMES vorbisenc
50#  PATHS ${OGG_SEARCH_PATHS}
51#  PATH_SUFFIXES lib
52#)
[1505]53
[2509]54FIND_LIBRARY(VORBISFILE_LIBRARY NAMES vorbisfile
55  PATHS ${OGG_SEARCH_PATHS}
56  PATH_SUFFIXES lib
57)
[1505]58
[2509]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)
[1505]69
[2509]70MARK_AS_ADVANCED(
71  OGG_LIBRARY
72  OGG_INCLUDE_DIR
73  VORBIS_LIBRARY
74  VORBISFILE_LIBRARY
[2510]75  #VORBISENC_LIBRARY
[2509]76  VORBIS_INCLUDE_DIR
77)
Note: See TracBrowser for help on using the repository browser.