author | unc0rr |
Mon, 16 May 2011 22:08:28 +0400 | |
branch | cursor_issues |
changeset 5193 | 16eda3643fc3 |
parent 5169 | e353ca78d28b |
child 8660 | 6370e545fd5f |
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) |
|
2606
ed687a8d081f
updated build files for macosx and optimization system
koda
parents:
2437
diff
changeset
|
21 |
|
2609 | 22 |
find_library(OGG_LIBRARY NAMES ogg) |
23 |
find_library(VORBIS_LIBRARY NAMES vorbis) |
|
24 |
find_library(VORBISFILE_LIBRARY NAMES vorbisfile) |
|
5169 | 25 |
if(APPLE AND NOT VORBISFILE_LIBRARY) |
26 |
# [koda] (for Hedgewars) frameworks don't come with libvorbisfile |
|
27 |
set(VORBISFILE_LIBRARY "${VORBIS_LIBRARY}") |
|
28 |
endif() |
|
2437 | 29 |
|
2336
66c751f7a28e
fix windows compilation with dll (frontend and engine)
koda
parents:
2214
diff
changeset
|
30 |
if (OGG_LIBRARY AND VORBIS_LIBRARY AND VORBISFILE_LIBRARY) |
2214 | 31 |
set(OGGVORBIS_FOUND TRUE) |
32 |
# [sommer] (for SuperTux) reversed order of libraries, so that cmake 2.4.5 for Windows generates an MSYS Makefile that will link correctly |
|
33 |
# set(OGGVORBIS_LIBRARIES ${OGG_LIBRARY} ${VORBIS_LIBRARY} ${VORBISFILE_LIBRARY}) |
|
34 |
set(OGGVORBIS_LIBRARIES ${VORBISFILE_LIBRARY} ${VORBIS_LIBRARY} ${OGG_LIBRARY}) |
|
35 |
set(_CMAKE_REQUIRED_LIBRARIES_TMP ${CMAKE_REQUIRED_LIBRARIES}) |
|
36 |
set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${OGGVORBIS_LIBRARIES}) |
|
37 |
check_library_exists(vorbis vorbis_bitrate_addblock "" HAVE_LIBVORBISENC2) |
|
38 |
set(CMAKE_REQUIRED_LIBRARIES ${_CMAKE_REQUIRED_LIBRARIES_TMP}) |
|
39 |
if (HAVE_LIBVORBISENC2) |
|
40 |
set (OGGVORBIS_VERSION 2) |
|
41 |
else (HAVE_LIBVORBISENC2) |
|
42 |
set (OGGVORBIS_VERSION 1) |
|
43 |
endif (HAVE_LIBVORBISENC2) |
|
2336
66c751f7a28e
fix windows compilation with dll (frontend and engine)
koda
parents:
2214
diff
changeset
|
44 |
else () |
2437 | 45 |
set(OGGVORBIS_VERSION) |
2214 | 46 |
set(OGGVORBIS_FOUND FALSE) |
2336
66c751f7a28e
fix windows compilation with dll (frontend and engine)
koda
parents:
2214
diff
changeset
|
47 |
endif () |
2214 | 48 |
if (OGGVORBIS_FOUND) |
49 |
if (NOT OggVorbis_FIND_QUIETLY) |
|
50 |
message(STATUS "Found OggVorbis: ${OGGVORBIS_LIBRARIES}") |
|
51 |
endif (NOT OggVorbis_FIND_QUIETLY) |
|
52 |
else (OGGVORBIS_FOUND) |
|
53 |
if (OggVorbis_FIND_REQUIRED) |
|
54 |
message(FATAL_ERROR "Could NOT find OggVorbis libraries") |
|
2395 | 55 |
else (OggVorbis_FIND_REQUIRED) |
56 |
if (NOT OggVorbis_FIND_QUIETLY) |
|
57 |
message(STATUS "Could NOT find OggVorbis libraries") |
|
58 |
endif (NOT OggVorbis_FIND_QUIETLY) |
|
59 |
endif(OggVorbis_FIND_REQUIRED) |
|
2214 | 60 |
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
|
61 |