author | unc0rr |
Fri, 12 Nov 2010 19:48:38 +0300 | |
branch | mbait-rope_AI |
changeset 2563 | b1513722f966 |
parent 2437 | 10e4b5fc0d93 |
child 2606 | ed687a8d081f |
permissions | -rw-r--r-- |
2214 | 1 |
### SuperTux - Removed unused vorbisenc library |
2200
8192be6e3aef
koda/Smaxx changes to openal for crossplatform building
nemo
parents:
2194
diff
changeset
|
2 |
|
2214 | 3 |
# - Try to find the OggVorbis libraries |
4 |
# Once done this will define |
|
5 |
# |
|
6 |
# OGGVORBIS_FOUND - system has OggVorbis |
|
7 |
# OGGVORBIS_VERSION - set either to 1 or 2 |
|
8 |
# OGGVORBIS_INCLUDE_DIR - the OggVorbis include directory |
|
9 |
# OGGVORBIS_LIBRARIES - The libraries needed to use OggVorbis |
|
10 |
# OGG_LIBRARY - The Ogg library |
|
11 |
# VORBIS_LIBRARY - The Vorbis library |
|
12 |
# VORBISFILE_LIBRARY - The VorbisFile library |
|
13 |
# Copyright (c) 2006, Richard Laerkaeng, <richard@goteborg.utfors.se> |
|
14 |
# |
|
15 |
# Redistribution and use is allowed according to the terms of the BSD license. |
|
16 |
# For details see the accompanying COPYING-CMAKE-SCRIPTS file. |
|
2194
1597710c6118
koda adds threading for fadein/out. Untested under windows, but works beautifully under Linux (and presumably OSX, right koda?)
nemo
parents:
diff
changeset
|
17 |
|
2395 | 18 |
|
2214 | 19 |
include (CheckLibraryExists) |
20 |
find_path(VORBIS_INCLUDE_DIR vorbis/vorbisfile.h) |
|
2400
2422ea85d100
added a utility that warns the user to install hedgewars when it's run from the diskimage
koda
parents:
2395
diff
changeset
|
21 |
# [koda] (for Hedgewars) added libraries with capital names for compatibility with Mac frameworks |
2437 | 22 |
if(APPLE) |
23 |
set(CMAKE_FIND_FRAMEWORK "FIRST") |
|
24 |
endif(APPLE) |
|
2400
2422ea85d100
added a utility that warns the user to install hedgewars when it's run from the diskimage
koda
parents:
2395
diff
changeset
|
25 |
find_library(OGG_LIBRARY NAMES ogg Ogg) |
2422ea85d100
added a utility that warns the user to install hedgewars when it's run from the diskimage
koda
parents:
2395
diff
changeset
|
26 |
find_library(VORBIS_LIBRARY NAMES vorbis Vorbis) |
2422ea85d100
added a utility that warns the user to install hedgewars when it's run from the diskimage
koda
parents:
2395
diff
changeset
|
27 |
find_library(VORBISFILE_LIBRARY NAMES vorbisfile Vorbis) |
2437 | 28 |
|
2336
66c751f7a28e
fix windows compilation with dll (frontend and engine)
koda
parents:
2214
diff
changeset
|
29 |
if (OGG_LIBRARY AND VORBIS_LIBRARY AND VORBISFILE_LIBRARY) |
2214 | 30 |
set(OGGVORBIS_FOUND TRUE) |
31 |
# [sommer] (for SuperTux) reversed order of libraries, so that cmake 2.4.5 for Windows generates an MSYS Makefile that will link correctly |
|
32 |
# set(OGGVORBIS_LIBRARIES ${OGG_LIBRARY} ${VORBIS_LIBRARY} ${VORBISFILE_LIBRARY}) |
|
33 |
set(OGGVORBIS_LIBRARIES ${VORBISFILE_LIBRARY} ${VORBIS_LIBRARY} ${OGG_LIBRARY}) |
|
34 |
set(_CMAKE_REQUIRED_LIBRARIES_TMP ${CMAKE_REQUIRED_LIBRARIES}) |
|
35 |
set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${OGGVORBIS_LIBRARIES}) |
|
36 |
check_library_exists(vorbis vorbis_bitrate_addblock "" HAVE_LIBVORBISENC2) |
|
37 |
set(CMAKE_REQUIRED_LIBRARIES ${_CMAKE_REQUIRED_LIBRARIES_TMP}) |
|
38 |
if (HAVE_LIBVORBISENC2) |
|
39 |
set (OGGVORBIS_VERSION 2) |
|
40 |
else (HAVE_LIBVORBISENC2) |
|
41 |
set (OGGVORBIS_VERSION 1) |
|
42 |
endif (HAVE_LIBVORBISENC2) |
|
2336
66c751f7a28e
fix windows compilation with dll (frontend and engine)
koda
parents:
2214
diff
changeset
|
43 |
else () |
2437 | 44 |
set(OGGVORBIS_VERSION) |
2214 | 45 |
set(OGGVORBIS_FOUND FALSE) |
2336
66c751f7a28e
fix windows compilation with dll (frontend and engine)
koda
parents:
2214
diff
changeset
|
46 |
endif () |
2214 | 47 |
if (OGGVORBIS_FOUND) |
48 |
if (NOT OggVorbis_FIND_QUIETLY) |
|
49 |
message(STATUS "Found OggVorbis: ${OGGVORBIS_LIBRARIES}") |
|
50 |
endif (NOT OggVorbis_FIND_QUIETLY) |
|
51 |
else (OGGVORBIS_FOUND) |
|
52 |
if (OggVorbis_FIND_REQUIRED) |
|
53 |
message(FATAL_ERROR "Could NOT find OggVorbis libraries") |
|
2395 | 54 |
else (OggVorbis_FIND_REQUIRED) |
55 |
if (NOT OggVorbis_FIND_QUIETLY) |
|
56 |
message(STATUS "Could NOT find OggVorbis libraries") |
|
57 |
endif (NOT OggVorbis_FIND_QUIETLY) |
|
58 |
endif(OggVorbis_FIND_REQUIRED) |
|
2214 | 59 |
endif (OGGVORBIS_FOUND) |
2194
1597710c6118
koda adds threading for fadein/out. Untested under windows, but works beautifully under Linux (and presumably OSX, right koda?)
nemo
parents:
diff
changeset
|
60 |