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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2200
8192be6e3aef koda/Smaxx changes to openal for crossplatform building
nemo
parents: 2194
diff changeset
     1
FIND_PATH(VORBIS_INCLUDE_DIR vorbis/vorbisfile.h)
8192be6e3aef koda/Smaxx changes to openal for crossplatform building
nemo
parents: 2194
diff changeset
     2
FIND_PATH(OGG_INCLUDE_DIR ogg/ogg.h)
8192be6e3aef koda/Smaxx changes to openal for crossplatform building
nemo
parents: 2194
diff changeset
     3
8192be6e3aef koda/Smaxx changes to openal for crossplatform building
nemo
parents: 2194
diff changeset
     4
FIND_LIBRARY(OGG_LIBRARY NAMES ogg)
8192be6e3aef koda/Smaxx changes to openal for crossplatform building
nemo
parents: 2194
diff changeset
     5
8192be6e3aef koda/Smaxx changes to openal for crossplatform building
nemo
parents: 2194
diff changeset
     6
FIND_LIBRARY(VORBIS_LIBRARY NAMES vorbis)
8192be6e3aef koda/Smaxx changes to openal for crossplatform building
nemo
parents: 2194
diff changeset
     7
FIND_LIBRARY(VORBISFILE_LIBRARY NAMES vorbisfile)
2194
1597710c6118 koda adds threading for fadein/out. Untested under windows, but works beautifully under Linux (and presumably OSX, right koda?)
nemo
parents:
diff changeset
     8
2200
8192be6e3aef koda/Smaxx changes to openal for crossplatform building
nemo
parents: 2194
diff changeset
     9
IF(VORBIS_INCLUDE_DIR AND OGG_LIBRARY AND VORBIS_LIBRARY AND VORBISFILE_LIBRARY)
8192be6e3aef koda/Smaxx changes to openal for crossplatform building
nemo
parents: 2194
diff changeset
    10
    SET(OGGVORBIS_FOUND TRUE)
8192be6e3aef koda/Smaxx changes to openal for crossplatform building
nemo
parents: 2194
diff changeset
    11
    SET(OGGVORBIS_LIBRARIES ${OGG_LIBRARY} ${VORBIS_LIBRARY} ${VORBISFILE_LIBRARY})
8192be6e3aef koda/Smaxx changes to openal for crossplatform building
nemo
parents: 2194
diff changeset
    12
    SET(OGGVORBIS_INCLUDE_DIRS ${VORBIS_INCLUDE_DIR} ${OGG_INCLUDE_DIR})
8192be6e3aef koda/Smaxx changes to openal for crossplatform building
nemo
parents: 2194
diff changeset
    13
ELSE(VORBIS_INCLUDE_DIR AND OGG_LIBRARY AND VORBIS_LIBRARY AND VORBISFILE_LIBRARY)
8192be6e3aef koda/Smaxx changes to openal for crossplatform building
nemo
parents: 2194
diff changeset
    14
    SET(OGGVORBIS_FOUND FALSE)
8192be6e3aef koda/Smaxx changes to openal for crossplatform building
nemo
parents: 2194
diff changeset
    15
ENDIF(VORBIS_INCLUDE_DIR AND OGG_LIBRARY AND VORBIS_LIBRARY AND VORBISFILE_LIBRARY)
2194
1597710c6118 koda adds threading for fadein/out. Untested under windows, but works beautifully under Linux (and presumably OSX, right koda?)
nemo
parents:
diff changeset
    16
2200
8192be6e3aef koda/Smaxx changes to openal for crossplatform building
nemo
parents: 2194
diff changeset
    17
IF(OGGVORBIS_FOUND)
8192be6e3aef koda/Smaxx changes to openal for crossplatform building
nemo
parents: 2194
diff changeset
    18
    MESSAGE(STATUS "Found OggVorbis: ${OGGVORBIS_LIBRARIES}")
8192be6e3aef koda/Smaxx changes to openal for crossplatform building
nemo
parents: 2194
diff changeset
    19
ELSE(OGGVORBIS_FOUND)
2211
288360b78f30 - fade in/out functions merged, but kept binary compatibility
koda
parents: 2200
diff changeset
    20
    MESSAGE(FATAL_ERROR "Could NOT find Ogg and/or Vorbis - Visit xiph.org and download latest version")
2200
8192be6e3aef koda/Smaxx changes to openal for crossplatform building
nemo
parents: 2194
diff changeset
    21
ENDIF(OGGVORBIS_FOUND)
2194
1597710c6118 koda adds threading for fadein/out. Untested under windows, but works beautifully under Linux (and presumably OSX, right koda?)
nemo
parents:
diff changeset
    22
1597710c6118 koda adds threading for fadein/out. Untested under windows, but works beautifully under Linux (and presumably OSX, right koda?)
nemo
parents:
diff changeset
    23