cmake_modules/FindOggVorbis.cmake
author koda
Mon, 29 Jun 2009 20:01:05 +0000
changeset 2211 288360b78f30
parent 2200 8192be6e3aef
child 2214 eacb5b19d587
permissions -rw-r--r--
- fade in/out functions merged, but kept binary compatibility - reworked memory initialization, now uses less memory and allocates more only when needed - other fixes to openalbridge

FIND_PATH(VORBIS_INCLUDE_DIR vorbis/vorbisfile.h)
FIND_PATH(OGG_INCLUDE_DIR ogg/ogg.h)

FIND_LIBRARY(OGG_LIBRARY NAMES ogg)

FIND_LIBRARY(VORBIS_LIBRARY NAMES vorbis)
FIND_LIBRARY(VORBISFILE_LIBRARY NAMES vorbisfile)

IF(VORBIS_INCLUDE_DIR AND OGG_LIBRARY AND VORBIS_LIBRARY AND VORBISFILE_LIBRARY)
    SET(OGGVORBIS_FOUND TRUE)
    SET(OGGVORBIS_LIBRARIES ${OGG_LIBRARY} ${VORBIS_LIBRARY} ${VORBISFILE_LIBRARY})
    SET(OGGVORBIS_INCLUDE_DIRS ${VORBIS_INCLUDE_DIR} ${OGG_INCLUDE_DIR})
ELSE(VORBIS_INCLUDE_DIR AND OGG_LIBRARY AND VORBIS_LIBRARY AND VORBISFILE_LIBRARY)
    SET(OGGVORBIS_FOUND FALSE)
ENDIF(VORBIS_INCLUDE_DIR AND OGG_LIBRARY AND VORBIS_LIBRARY AND VORBISFILE_LIBRARY)

IF(OGGVORBIS_FOUND)
    MESSAGE(STATUS "Found OggVorbis: ${OGGVORBIS_LIBRARIES}")
ELSE(OGGVORBIS_FOUND)
    MESSAGE(FATAL_ERROR "Could NOT find Ogg and/or Vorbis - Visit xiph.org and download latest version")
ENDIF(OGGVORBIS_FOUND)