| 1 |
# - Find vorbis |
| 2 |
# Find the native vorbis includes and libraries |
| 3 |
# |
| 4 |
# VORBIS_INCLUDE_DIR - where to find vorbis.h, etc. |
| 5 |
# VORBIS_LIBRARIES - List of libraries when using vorbis(file). |
| 6 |
# VORBIS_FOUND - True if vorbis found. |
| 7 |
|
| 8 |
if(VORBIS_INCLUDE_DIR) |
| 9 |
# Already in cache, be silent |
| 10 |
set(VORBIS_FIND_QUIETLY TRUE) |
| 11 |
endif(VORBIS_INCLUDE_DIR) |
| 12 |
|
| 13 |
find_path(VORBIS_INCLUDE_DIR vorbis/vorbisfile.h) |
| 14 |
|
| 15 |
find_library(OGG_LIBRARY NAMES ogg) |
| 16 |
find_library(VORBIS_LIBRARY NAMES vorbis) |
| 17 |
find_library(VORBISFILE_LIBRARY NAMES vorbisfile) |
| 18 |
|
| 19 |
# Handle the QUIETLY and REQUIRED arguments and set VORBIS_FOUND to TRUE if |
| 20 |
# all listed variables are TRUE. |
| 21 |
include(FindPackageHandleStandardArgs) |
| 22 |
find_package_handle_standard_args(VORBIS DEFAULT_MSG |
| 23 |
VORBIS_INCLUDE_DIR OGG_LIBRARY VORBIS_LIBRARY VORBIS_LIBRARY) |
| 24 |
|
| 25 |
if(VORBIS_FOUND) |
| 26 |
set(VORBIS_LIBRARIES ${VORBISFILE_LIBRARY} ${VORBIS_LIBRARY} ${OGG_LIBRARY}) |
| 27 |
else(VORBIS_FOUND) |
| 28 |
set(VORBIS_LIBRARIES) |
| 29 |
endif(VORBIS_FOUND) |
| 30 |
|
| 31 |
mark_as_advanced(VORBIS_INCLUDE_DIR) |
| 32 |
mark_as_advanced(OGG_LIBRARY VORBIS_LIBRARY VORBISFILE_LIBRARY) |