Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/buildsystem2/cmake/FindVorbis.cmake @ 2623

Last change on this file since 2623 was 2616, checked in by rgrieder, 16 years ago
  • Split FindOggVorbis.cmake in two. Having them in one file doesn't make sense, we can group it somewhere else.
  • Updated all find scripts
  • Removed all standard paths (like /usr /usr/local, etc.) because they're already searched by CMake anyway
  • Several workarounds for certain libraries when using the find script in the CMake module path.
  • Property svn:eol-style set to native
File size: 1.4 KB
Line 
1# - Try to find ogg/vorbis
2# Once done this will define
3#
4#  VORBIS_FOUND - system has vorbis
5#  VORBIS_INCLUDE_DIR
6#  VORBIS_LIBRARY
7#  VORBISENC_LIBRARY
8#  VORBISFILE_LIBRARY
9#
10# $VORBISDIR is an environment variable used
11# for finding vorbis.
12#
13# Several changes and additions by Fabian 'x3n' Landau
14# Most of all rewritten by Adrian Friedli
15#                 > www.orxonox.net <
16
17INCLUDE(FindPackageHandleStandardArgs)
18INCLUDE(HandleLibraryTypes)
19
20FIND_PATH(VORBIS_INCLUDE_DIR vorbis/codec.h
21  PATHS $ENV{VORBISDIR}
22  PATH_SUFFIXES include
23)
24FIND_LIBRARY(VORBIS_LIBRARY_OPTIMIZED
25  NAMES vorbis
26  PATHS $ENV{VORBISDIR}
27  PATH_SUFFIXES lib
28)
29FIND_LIBRARY(VORBIS_LIBRARY_DEBUG
30  NAMES vorbisd vorbis_d
31  PATHS $ENV{VORBISDIR}
32  PATH_SUFFIXES lib
33)
34FIND_LIBRARY(VORBISFILE_LIBRARY_OPTIMIZED
35  NAMES vorbisfile
36  PATHS $ENV{VORBISDIR}
37  PATH_SUFFIXES lib
38)
39FIND_LIBRARY(VORBISFILE_LIBRARY_DEBUG
40  NAMES vorbisfiled vorbisfile_d
41  PATHS $ENV{VORBISDIR}
42  PATH_SUFFIXES lib
43)
44
45# Handle the REQUIRED argument and set VORBIS_FOUND
46FIND_PACKAGE_HANDLE_STANDARD_ARGS(Vorbis DEFAULT_MSG
47  VORBIS_LIBRARY_OPTIMIZED
48  VORBISFILE_LIBRARY_OPTIMIZED
49  VORBIS_INCLUDE_DIR
50)
51
52# Collect optimized and debug libraries
53HANDLE_LIBRARY_TYPES(VORBIS)
54HANDLE_LIBRARY_TYPES(VORBISFILE)
55SET(VORBIS_LIBRARIES ${VORBIS_LIBRARY} ${VORBISFILE_LIBRARY})
56
57MARK_AS_ADVANCED(
58  VORBIS_INCLUDE_DIR
59  VORBIS_LIBRARY_OPTIMIZED
60  VORBIS_LIBRARY_DEBUG
61  VORBISFILE_LIBRARY_OPTIMIZED
62  VORBISFILE_LIBRARY_DEBUG
63)
Note: See TracBrowser for help on using the repository browser.