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

50 lines
922 B
CMake
Raw Permalink Normal View History

2010-05-06 00:08:41 +00:00
# - Locate Ogg library
# This module defines
# OGG_LIBRARY, the library to link against
# OGG_FOUND, if false, do not try to link to OGG
# OGG_INCLUDE_DIR, where to find headers.
IF(OGG_LIBRARY AND OGG_INCLUDE_DIR)
# in cache already
SET(OGG_FIND_QUIETLY TRUE)
2016-10-27 08:54:09 +00:00
ENDIF()
2010-05-06 00:08:41 +00:00
FIND_PATH(OGG_INCLUDE_DIR
ogg/ogg.h
2010-05-06 00:08:41 +00:00
PATHS
$ENV{OGG_DIR}/include
/usr/local/include
/usr/include
/sw/include
/opt/local/include
/opt/csw/include
/opt/include
)
FIND_LIBRARY(OGG_LIBRARY
NAMES ogg libogg
PATHS
$ENV{OGG_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(OGG_LIBRARY AND OGG_INCLUDE_DIR)
SET(OGG_FOUND "YES")
IF(NOT OGG_FIND_QUIETLY)
MESSAGE(STATUS "Found Ogg: ${OGG_LIBRARY}")
2016-10-27 08:54:09 +00:00
ENDIF()
ELSE()
2010-05-06 00:08:41 +00:00
IF(NOT OGG_FIND_QUIETLY)
MESSAGE(STATUS "Warning: Unable to find Ogg!")
2016-10-27 08:54:09 +00:00
ENDIF()
ENDIF()