khanat-code-old/code/CMakeModules/FindVorbis.cmake

66 lines
1.3 KiB
CMake
Raw Permalink Normal View History

2010-05-06 00:08:41 +00:00
# - Locate Vorbis library
# This module defines
# VORBIS_LIBRARY, the library to link against
# VORBIS_FOUND, if false, do not try to link to VORBIS
# VORBIS_INCLUDE_DIR, where to find headers.
IF(VORBIS_LIBRARY AND VORBIS_INCLUDE_DIR)
# in cache already
SET(VORBIS_FIND_QUIETLY TRUE)
2016-10-27 08:54:09 +00:00
ENDIF()
2010-05-06 00:08:41 +00:00
FIND_PATH(VORBIS_INCLUDE_DIR
vorbis/vorbisfile.h
2010-05-06 00:08:41 +00:00
PATHS
$ENV{VORBIS_DIR}/include
/usr/local/include
/usr/include
/sw/include
/opt/local/include
/opt/csw/include
/opt/include
)
FIND_LIBRARY(VORBIS_LIBRARY
NAMES vorbis libvorbis
PATHS
$ENV{VORBIS_DIR}/lib
/usr/local/lib
/usr/lib
/usr/local/X11R6/lib
/usr/X11R6/lib
/sw/lib
/opt/local/lib
/opt/csw/lib
/opt/lib
/usr/freeware/lib64
)
FIND_LIBRARY(VORBISFILE_LIBRARY
NAMES vorbisfile libvorbisfile
PATHS
$ENV{VORBIS_DIR}/lib
/usr/local/lib
/usr/lib
/usr/local/X11R6/lib
/usr/X11R6/lib
/sw/lib
/opt/local/lib
/opt/csw/lib
/opt/lib
/usr/freeware/lib64
)
IF(VORBIS_LIBRARY AND VORBISFILE_LIBRARY AND VORBIS_INCLUDE_DIR)
SET(VORBIS_FOUND "YES")
SET(VORBIS_LIBRARIES ${VORBIS_LIBRARY} ${VORBISFILE_LIBRARY})
IF(NOT VORBIS_FIND_QUIETLY)
MESSAGE(STATUS "Found Vorbis: ${VORBIS_LIBRARY}")
2016-10-27 08:54:09 +00:00
ENDIF()
ELSE()
2010-05-06 00:08:41 +00:00
IF(NOT VORBIS_FIND_QUIETLY)
MESSAGE(STATUS "Warning: Unable to find Vorbis!")
2016-10-27 08:54:09 +00:00
ENDIF()
ENDIF()