2 # Find the native vorbis includes and libraries
4 # VORBIS_INCLUDE_DIR - where to find vorbis.h, etc.
5 # OGG_INCLUDE_DIR - where to find ogg/ogg.h, etc.
6 # VORBIS_LIBRARIES - List of libraries when using vorbis(file).
7 # VORBIS_FOUND - True if vorbis found.
10 if(VORBIS_INCLUDE_DIR)
11 # Already in cache, be silent
12 set(VORBIS_FIND_QUIETLY TRUE)
13 endif(VORBIS_INCLUDE_DIR)
14 find_path(OGG_INCLUDE_DIR ogg/ogg.h)
15 find_path(VORBIS_INCLUDE_DIR vorbis/vorbisfile.h)
16 # MSVC built ogg/vorbis may be named ogg_static and vorbis_static
17 find_library(OGG_LIBRARY NAMES ogg ogg_static)
18 find_library(VORBIS_LIBRARY NAMES vorbis vorbis_static)
19 find_library(VORBISFILE_LIBRARY NAMES vorbisfile vorbisfile_static)
20 # Handle the QUIETLY and REQUIRED arguments and set VORBIS_FOUND
21 # to TRUE if all listed variables are TRUE.
22 include(FindPackageHandleStandardArgs)
23 find_package_handle_standard_args(VORBIS DEFAULT_MSG
24 OGG_INCLUDE_DIR VORBIS_INCLUDE_DIR
25 OGG_LIBRARY VORBIS_LIBRARY VORBISFILE_LIBRARY)
27 find_path(VORBIS_INCLUDE_DIR tremor/ivorbisfile.h)
28 find_library(VORBIS_LIBRARY NAMES vorbis_dec)
29 find_package_handle_standard_args(VORBIS DEFAULT_MSG
30 VORBIS_INCLUDE_DIR VORBIS_LIBRARY)
35 set(VORBIS_LIBRARIES ${VORBISFILE_LIBRARY} ${VORBIS_LIBRARY}
38 set(VORBIS_LIBRARIES ${VORBIS_LIBRARY})
44 mark_as_advanced(OGG_INCLUDE_DIR VORBIS_INCLUDE_DIR)
45 mark_as_advanced(OGG_LIBRARY VORBIS_LIBRARY VORBISFILE_LIBRARY)