Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/buildsystem2/cmake/FindOgg.cmake @ 2617

Last change on this file since 2617 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.0 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#
8# $OGGDIR is an environment variable used
9# for finding ogg.
10#
11# Several changes and additions by Fabian 'x3n' Landau
12# Most of all rewritten by Adrian Friedli
13#                 > www.orxonox.net <
14
15INCLUDE(FindPackageHandleStandardArgs)
16INCLUDE(HandleLibraryTypes)
17
18FIND_PATH(OGG_INCLUDE_DIR ogg/ogg.h
19  PATHS $ENV{OGGDIR}
20  PATH_SUFFIXES include
21)
22FIND_PATH(VORBIS_INCLUDE_DIR vorbis/codec.h
23  PATHS $ENV{OGGDIR}
24  PATH_SUFFIXES include
25)
26FIND_LIBRARY(OGG_LIBRARY_OPTIMIZED
27  NAMES ogg
28  PATHS $ENV{OGGDIR}
29  PATH_SUFFIXES lib
30)
31FIND_LIBRARY(OGG_LIBRARY_DEBUG
32  NAMES oggd ogg_d
33  PATHS $ENV{VORBISDIR}
34  PATH_SUFFIXES lib
35)
36
37# Handle the REQUIRED argument and set OGG_FOUND
38FIND_PACKAGE_HANDLE_STANDARD_ARGS(Ogg DEFAULT_MSG
39  OGG_INCLUDE_DIR
40  OGG_LIBRARY_OPTIMIZED
41)
42
43# Collect optimized and debug libraries
44HANDLE_LIBRARY_TYPES(OGG)
45
46MARK_AS_ADVANCED(
47  OGG_INCLUDE_DIR
48  OGG_LIBRARY_OPTIMIZED
49  OGG_LIBRARY_DEBUG
50)
Note: See TracBrowser for help on using the repository browser.