2 # Find the native vorbis includes and libraries
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.
10 # Already in cache, be silent
11 set(VORBIS_FIND_QUIETLY TRUE)
12 endif(VORBIS_INCLUDE_DIR)
13 find_path(OGG_INCLUDE_DIR ogg/ogg.h)
14 find_path(VORBIS_INCLUDE_DIR vorbis/vorbisfile.h)
15 # MSVC built ogg/vorbis may be named ogg_static and vorbis_static
16 find_library(OGG_LIBRARY NAMES ogg ogg_static)
17 find_library(VORBIS_LIBRARY NAMES vorbis vorbis_static)
18 find_library(VORBISFILE_LIBRARY NAMES vorbisfile vorbisfile_static)
19 # Handle the QUIETLY and REQUIRED arguments and set VORBIS_FOUND
20 # to TRUE if all listed variables are TRUE.
21 include(FindPackageHandleStandardArgs)
22 find_package_handle_standard_args(VORBIS DEFAULT_MSG
23 OGG_INCLUDE_DIR VORBIS_INCLUDE_DIR
24 OGG_LIBRARY VORBIS_LIBRARY VORBISFILE_LIBRARY)
26 find_path(VORBIS_INCLUDE_DIR tremor/ivorbisfile.h)
27 find_library(VORBIS_LIBRARY NAMES vorbis_dec)
28 find_package_handle_standard_args(VORBIS DEFAULT_MSG
29 VORBIS_INCLUDE_DIR VORBIS_LIBRARY)
34 set(VORBIS_LIBRARIES ${VORBISFILE_LIBRARY} ${VORBIS_LIBRARY}
37 set(VORBIS_LIBRARIES ${VORBIS_LIBRARY})
43 mark_as_advanced(OGG_INCLUDE_DIR VORBIS_INCLUDE_DIR)
44 mark_as_advanced(OGG_LIBRARY VORBIS_LIBRARY VORBISFILE_LIBRARY)