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