Simplified and made to work on OS X
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@6086 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: 119f17bc22375f9226b737441418f81c775d9137 Former-commit-id: facfb1056885ecead44debfd78632a1ffa9252a8
This commit is contained in:
parent
4894ef0424
commit
d83671314c
3 changed files with 36 additions and 240 deletions
|
@ -8,88 +8,20 @@
|
|||
# correspond to the ./configure --prefix=$OGG_DIR
|
||||
# used in building OGG.
|
||||
#
|
||||
# Created by Joe Thompson (based on Jean-Philippe Meuret's FindSOLID.cmake).
|
||||
# Created by Joe Thompson
|
||||
|
||||
# No use to do all of this twice.
|
||||
IF(OGG_FOUND)
|
||||
RETURN()
|
||||
ENDIF(OGG_FOUND)
|
||||
find_path(OGG_INCLUDE_DIR ogg/ogg.h)
|
||||
|
||||
# First, try with PkgConfig if available.
|
||||
FIND_PACKAGE(PkgConfig)
|
||||
IF(PKGCONFIG_FOUND)
|
||||
set(OGG_NAMES ${OGG_NAMES} ogg)
|
||||
find_library(OGG_LIBRARY NAMES ${OGG_NAMES})
|
||||
|
||||
PKG_CHECK_MODULES(OGG ogg)
|
||||
IF(NOT OGG_FOUND)
|
||||
PKG_CHECK_MODULES(OGG OGG)
|
||||
ENDIF (NOT OGG_FOUND)
|
||||
# handle the QUIETLY and REQUIRED arguments and set OGG_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OGG DEFAULT_MSG OGG_LIBRARY OGG_INCLUDE_DIR)
|
||||
|
||||
IF(OGG_FOUND)
|
||||
SET(OGG_FOUND TRUE)
|
||||
SET(OGG_INCLUDE_DIR ${OGG_INCLUDE_DIRS} CACHE STRING "OGG include paths")
|
||||
SET(OGG_LIBRARY ${OGG_LIBRARIES} CACHE STRING "OGG library")
|
||||
MESSAGE(STATUS "Looking for OGG --- found using pkg-config (${OGG_LIBRARY})")
|
||||
RETURN()
|
||||
ENDIF(OGG_FOUND)
|
||||
|
||||
ENDIF(PKGCONFIG_FOUND)
|
||||
|
||||
# Then try the good old way for include dirs.
|
||||
IF(NOT APPLE)
|
||||
|
||||
FIND_PATH(OGG_INCLUDE_DIR ogg/ogg.h
|
||||
HINTS ENV OGG_DIR
|
||||
PATH_SUFFIXES
|
||||
include/ogg include/OGG include
|
||||
PATHS
|
||||
/usr /usr/local
|
||||
DOC "Non-Apple include dir for OGG")
|
||||
|
||||
ELSE(NOT APPLE)
|
||||
|
||||
FIND_PATH(OGG_INCLUDE_DIR ogg.h
|
||||
HINTS ENV OGG_DIR
|
||||
PATH_SUFFIXES
|
||||
Headers include/ogg
|
||||
PATHS
|
||||
#Additional MacOS Paths
|
||||
~/Library/Frameworks/OGG.framework
|
||||
/Library/Frameworks/OGG.framework
|
||||
/System/Library/Frameworks/OGG.framework # Tiger
|
||||
|
||||
/usr /usr/local
|
||||
DOC "Apple include dir for OGG")
|
||||
|
||||
ENDIF(NOT APPLE)
|
||||
|
||||
# Then try the good old way for libs.
|
||||
FIND_LIBRARY(OGG_LIBRARY
|
||||
NAMES ogg
|
||||
HINTS ENV OGG_DIR
|
||||
PATH_SUFFIXES lib64 lib libs64 libs libs/Win32 libs/Win64
|
||||
PATHS /usr /usr/local)
|
||||
|
||||
IF(WIN32)
|
||||
|
||||
FIND_LIBRARY(OGG_LIBRARY
|
||||
NAMES ogg
|
||||
HINTS ENV OGG_DIR
|
||||
PATH_SUFFIXES lib64 lib libs64 libs libs/Win32 libs/Win64
|
||||
PATHS /usr /usr/local)
|
||||
|
||||
ENDIF(WIN32)
|
||||
|
||||
IF(OGG_INCLUDE_DIR AND OGG_LIBRARY AND (NOT WIN32 OR OGG_LIBRARY))
|
||||
SET(OGG_FOUND TRUE)
|
||||
ENDIF(OGG_INCLUDE_DIR AND OGG_LIBRARY AND (NOT WIN32 OR OGG_LIBRARY))
|
||||
|
||||
IF(OGG_FOUND)
|
||||
MESSAGE(STATUS "Looking for OGG - found (${OGG_LIBRARY})")
|
||||
SET(OGG_LIBRARY ${OGG_LIBRARY})
|
||||
IF(WIN32)
|
||||
SET(OGG_LIBRARY ${OGG_LIBRARY})
|
||||
ENDIF(WIN32)
|
||||
ELSE(OGG_FOUND)
|
||||
MESSAGE(FATAL_ERROR "Could not find OGG")
|
||||
ENDIF(OGG_FOUND)
|
||||
if(OGG_FOUND)
|
||||
set(OGG_LIBRARIES ${OGG_LIBRARY})
|
||||
endif()
|
||||
|
||||
mark_as_advanced(OGG_LIBRARY OGG_INCLUDE_DIR)
|
||||
|
|
|
@ -8,88 +8,20 @@
|
|||
# correspond to the ./configure --prefix=$VORBIS_DIR
|
||||
# used in building VORBIS.
|
||||
#
|
||||
# Created by Joe Thompson (based on Jean-Philippe Meuret's FindSOLID.cmake).
|
||||
# Created by Joe Thompson
|
||||
|
||||
# No use to do all of this twice.
|
||||
IF(VORBIS_FOUND)
|
||||
RETURN()
|
||||
ENDIF(VORBIS_FOUND)
|
||||
find_path(VORBIS_INCLUDE_DIR vorbis/vorbisfile.h)
|
||||
|
||||
# First, try with PkgConfig if available.
|
||||
FIND_PACKAGE(PkgConfig)
|
||||
IF(PKGCONFIG_FOUND)
|
||||
set(VORBIS_NAMES ${VORBIS_NAMES} vorbis)
|
||||
find_library(VORBIS_LIBRARY NAMES ${VORBIS_NAMES})
|
||||
|
||||
PKG_CHECK_MODULES(VORBIS vorbis)
|
||||
IF(NOT VORBIS_FOUND)
|
||||
PKG_CHECK_MODULES(VORBIS VORBIS)
|
||||
ENDIF (NOT VORBIS_FOUND)
|
||||
# handle the QUIETLY and REQUIRED arguments and set VORBIS_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(VORBIS DEFAULT_MSG VORBIS_LIBRARY VORBIS_INCLUDE_DIR)
|
||||
|
||||
IF(VORBIS_FOUND)
|
||||
SET(VORBIS_FOUND TRUE)
|
||||
SET(VORBIS_INCLUDE_DIR ${VORBIS_INCLUDE_DIRS} CACHE STRING "VORBIS include paths")
|
||||
SET(VORBIS_LIBRARY ${VORBIS_LIBRARIES} CACHE STRING "VORBIS library")
|
||||
MESSAGE(STATUS "Looking for VORBIS --- found using pkg-config (${VORBIS_LIBRARY})")
|
||||
RETURN()
|
||||
ENDIF(VORBIS_FOUND)
|
||||
|
||||
ENDIF(PKGCONFIG_FOUND)
|
||||
|
||||
# Then try the good old way for include dirs.
|
||||
IF(NOT APPLE)
|
||||
|
||||
FIND_PATH(VORBIS_INCLUDE_DIR vorbis/vorbisfile.h
|
||||
HINTS ENV VORBIS_DIR
|
||||
PATH_SUFFIXES
|
||||
include/vorbis include/VORBIS include
|
||||
PATHS
|
||||
/usr /usr/local
|
||||
DOC "Non-Apple include dir for VORBIS")
|
||||
|
||||
ELSE(NOT APPLE)
|
||||
|
||||
FIND_PATH(VORBIS_INCLUDE_DIR vorbisfile.h
|
||||
HINTS ENV VORBIS_DIR
|
||||
PATH_SUFFIXES
|
||||
Headers include/vorbis
|
||||
PATHS
|
||||
#Additional MacOS Paths
|
||||
~/Library/Frameworks/VORBIS.framework
|
||||
/Library/Frameworks/VORBIS.framework
|
||||
/System/Library/Frameworks/VORBIS.framework # Tiger
|
||||
|
||||
/usr /usr/local
|
||||
DOC "Apple include dir for VORBIS")
|
||||
|
||||
ENDIF(NOT APPLE)
|
||||
|
||||
# Then try the good old way for libs.
|
||||
FIND_LIBRARY(VORBIS_LIBRARY
|
||||
NAMES vorbis
|
||||
HINTS ENV VORBIS_DIR
|
||||
PATH_SUFFIXES lib64 lib libs64 libs libs/Win32 libs/Win64
|
||||
PATHS /usr /usr/local)
|
||||
|
||||
IF(WIN32)
|
||||
|
||||
FIND_LIBRARY(VORBIS_LIBRARY
|
||||
NAMES vorbis
|
||||
HINTS ENV VORBIS_DIR
|
||||
PATH_SUFFIXES lib64 lib libs64 libs libs/Win32 libs/Win64
|
||||
PATHS /usr /usr/local)
|
||||
|
||||
ENDIF(WIN32)
|
||||
|
||||
IF(VORBIS_INCLUDE_DIR AND VORBIS_LIBRARY AND (NOT WIN32 OR VORBIS_LIBRARY))
|
||||
SET(VORBIS_FOUND TRUE)
|
||||
ENDIF(VORBIS_INCLUDE_DIR AND VORBIS_LIBRARY AND (NOT WIN32 OR VORBIS_LIBRARY))
|
||||
|
||||
IF(VORBIS_FOUND)
|
||||
MESSAGE(STATUS "Looking for VORBIS - found (${VORBIS_LIBRARY})")
|
||||
SET(VORBIS_LIBRARY ${VORBIS_LIBRARY})
|
||||
IF(WIN32)
|
||||
SET(VORBIS_LIBRARY ${VORBIS_LIBRARY})
|
||||
ENDIF(WIN32)
|
||||
ELSE(VORBIS_FOUND)
|
||||
MESSAGE(FATAL_ERROR "Could not find VORBIS")
|
||||
ENDIF(VORBIS_FOUND)
|
||||
if(VORBIS_FOUND)
|
||||
set(VORBIS_LIBRARIES ${VORBIS_LIBRARY})
|
||||
endif()
|
||||
|
||||
mark_as_advanced(VORBIS_LIBRARY VORBIS_INCLUDE_DIR)
|
||||
|
|
|
@ -8,88 +8,20 @@
|
|||
# correspond to the ./configure --prefix=$VORBISFILE_DIR
|
||||
# used in building VORBISFILE.
|
||||
#
|
||||
# Created by Joe Thompson (based on Jean-Philippe Meuret's FindSOLID.cmake).
|
||||
# Created by Joe Thompson
|
||||
|
||||
# No use to do all of this twice.
|
||||
IF(VORBISFILE_FOUND)
|
||||
RETURN()
|
||||
ENDIF(VORBISFILE_FOUND)
|
||||
find_path(VORBISFILE_INCLUDE_DIR vorbis/vorbisfile.h)
|
||||
|
||||
# First, try with PkgConfig if available.
|
||||
FIND_PACKAGE(PkgConfig)
|
||||
IF(PKGCONFIG_FOUND)
|
||||
set(VORBISFILE_NAMES ${VORBISFILE_NAMES} vorbisfile)
|
||||
find_library(VORBISFILE_LIBRARY NAMES ${VORBISFILE_NAMES})
|
||||
|
||||
PKG_CHECK_MODULES(VORBISFILE vorbisfile)
|
||||
IF(NOT VORBISFILE_FOUND)
|
||||
PKG_CHECK_MODULES(VORBISFILE VORBISFILE)
|
||||
ENDIF (NOT VORBISFILE_FOUND)
|
||||
# handle the QUIETLY and REQUIRED arguments and set VORBISFILE_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(VORBISFILE DEFAULT_MSG VORBISFILE_LIBRARY VORBISFILE_INCLUDE_DIR)
|
||||
|
||||
IF(VORBISFILE_FOUND)
|
||||
SET(VORBISFILE_FOUND TRUE)
|
||||
SET(VORBISFILE_INCLUDE_DIR ${VORBISFILE_INCLUDE_DIRS} CACHE STRING "VORBISFILE include paths")
|
||||
SET(VORBISFILE_LIBRARY ${VORBISFILE_LIBRARIES} CACHE STRING "VORBISFILE library")
|
||||
MESSAGE(STATUS "Looking for VORBISFILE --- found using pkg-config (${VORBISFILE_LIBRARY})")
|
||||
RETURN()
|
||||
ENDIF(VORBISFILE_FOUND)
|
||||
|
||||
ENDIF(PKGCONFIG_FOUND)
|
||||
|
||||
# Then try the good old way for include dirs.
|
||||
IF(NOT APPLE)
|
||||
|
||||
FIND_PATH(VORBISFILE_INCLUDE_DIR vorbis/vorbisfile.h
|
||||
HINTS ENV VORBISFILE_DIR
|
||||
PATH_SUFFIXES
|
||||
include/vorbis include/VORBIS include
|
||||
PATHS
|
||||
/usr /usr/local
|
||||
DOC "Non-Apple include dir for VORBISFILE")
|
||||
|
||||
ELSE(NOT APPLE)
|
||||
|
||||
FIND_PATH(VORBISFILE_INCLUDE_DIR vorbisfile.h
|
||||
HINTS ENV VORBISFILE_DIR
|
||||
PATH_SUFFIXES
|
||||
Headers include/vorbis
|
||||
PATHS
|
||||
#Additional MacOS Paths
|
||||
~/Library/Frameworks/VORBIS.framework
|
||||
/Library/Frameworks/VORBIS.framework
|
||||
/System/Library/Frameworks/VORBIS.framework # Tiger
|
||||
|
||||
/usr /usr/local
|
||||
DOC "Apple include dir for VORBISFILE")
|
||||
|
||||
ENDIF(NOT APPLE)
|
||||
|
||||
# Then try the good old way for libs.
|
||||
FIND_LIBRARY(VORBISFILE_LIBRARY
|
||||
NAMES vorbisfile
|
||||
HINTS ENV VORBISFILE_DIR
|
||||
PATH_SUFFIXES lib64 lib libs64 libs libs/Win32 libs/Win64
|
||||
PATHS /usr /usr/local)
|
||||
|
||||
IF(WIN32)
|
||||
|
||||
FIND_LIBRARY(VORBISFILE_LIBRARY
|
||||
NAMES vorbisfile
|
||||
HINTS ENV VORBISFILE_DIR
|
||||
PATH_SUFFIXES lib64 lib libs64 libs libs/Win32 libs/Win64
|
||||
PATHS /usr /usr/local)
|
||||
|
||||
ENDIF(WIN32)
|
||||
|
||||
IF(VORBISFILE_INCLUDE_DIR AND VORBISFILE_LIBRARY AND (NOT WIN32 OR VORBISFILE_LIBRARY))
|
||||
SET(VORBISFILE_FOUND TRUE)
|
||||
ENDIF(VORBISFILE_INCLUDE_DIR AND VORBISFILE_LIBRARY AND (NOT WIN32 OR VORBISFILE_LIBRARY))
|
||||
|
||||
IF(VORBISFILE_FOUND)
|
||||
MESSAGE(STATUS "Looking for VORBISFILE - found (${VORBISFILE_LIBRARY})")
|
||||
SET(VORBISFILE_LIBRARY ${VORBISFILE_LIBRARY})
|
||||
IF(WIN32)
|
||||
SET(VORBISFILE_LIBRARY ${VORBISFILE_LIBRARY})
|
||||
ENDIF(WIN32)
|
||||
ELSE(VORBISFILE_FOUND)
|
||||
MESSAGE(FATAL_ERROR "Could not find VORBISFILE")
|
||||
ENDIF(VORBISFILE_FOUND)
|
||||
if(VORBISFILE_FOUND)
|
||||
set(VORBISFILE_LIBRARIES ${VORBISFILE_LIBRARY})
|
||||
endif()
|
||||
|
||||
mark_as_advanced(VORBISFILE_LIBRARY VORBISFILE_INCLUDE_DIR)
|
||||
|
|
Loading…
Reference in a new issue