Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/pickups2/cmake/FindOggVorbis.cmake @ 2576

Last change on this file since 2576 was 1873, checked in by rgrieder, 16 years ago

Bugfix in CMakeLists

  • Property svn:eol-style set to native
File size: 4.3 KB
Line 
1# Several changes and additions by Fabian 'x3n' Landau
2#                 > www.orxonox.net <
3
4IF (OGG_INCLUDE_DIR AND OGG_LIBRARY)
5  SET(OGG_FIND_QUIETLY TRUE)
6ENDIF (OGG_INCLUDE_DIR AND OGG_LIBRARY)
7
8IF (VORBIS_INCLUDE_DIR AND VORBIS_LIBRARY AND VORBISENC_LIBRARY AND VORBISFILE_LIBRARY)
9  SET(VORBIS_FIND_QUIETLY TRUE)
10ENDIF (VORBIS_INCLUDE_DIR AND VORBIS_LIBRARY AND VORBISENC_LIBRARY AND VORBISFILE_LIBRARY) 
11
12
13#SET(OGGVORBIS_LIBRARY_DIR "/usr/pack/oggvorbis-1.0-ds/i686-debian-linux3.0/lib")
14#SET(OGGVORBIS_LIBRARY "-L ${OGGVORBIS_LIBRARY_DIR} -lvorbisenc -lvorbisfile -logg -lvorbis ")
15#SET(OGGVORBIS_INCLUDE_DIR "/usr/pack/oggvorbis-1.0-ds/i686-debian-linux3.0/include")
16
17#
18# Includes
19#
20
21FIND_PATH(OGG_INCLUDE_DIR ogg/ogg.h
22  /usr/pack/oggvorbis-1.0-ds/i686-debian-linux3.0/include               # Tardis specific hack
23  /usr/local/include
24  /usr/include
25  /sw/include
26  /opt/local/include
27  /opt/csw/include
28  /opt/csw/include
29  /opt/include
30  ../libs/libogg-1.1.3/include
31  ${DEPENDENCY_DIR}/libogg-1.1.3/include
32  )
33
34FIND_PATH(VORBIS_INCLUDE_DIR vorbis/codec.h
35  /usr/pack/oggvorbis-1.0-ds/i686-debian-linux3.0/include               # Tardis specific hack
36  /usr/local/include
37  /usr/include
38  /sw/include
39  /opt/local/include
40  /opt/csw/include
41  /opt/csw/include
42  /opt/include
43  ../libs/libvorbis-1.2.0/include
44  ${DEPENDENCY_DIR}/libvorbis-1.2.0/include
45  )
46
47#
48# Libs
49#
50
51FIND_LIBRARY(OGG_LIBRARY
52  NAMES ogg
53  PATHS
54  /usr/pack/oggvorbis-1.0-ds/i686-debian-linux3.1/lib
55  /usr/local/lib
56  /usr/lib
57  /sw/lib
58  /opt/local/lib
59  /opt/csw/lib
60  /opt/lib
61  ../libs/libogg-1.1.3/src/.libs
62  ${DEPENDENCY_DIR}/libogg-1.1.3/lib
63  )
64
65FIND_LIBRARY(VORBIS_LIBRARY
66  NAMES vorbis
67  PATHS
68  /usr/pack/oggvorbis-1.0-ds/i686-debian-linux3.1/lib
69  /usr/local/lib
70  /usr/lib
71  /sw/lib
72  /opt/local/lib
73  /opt/csw/lib
74  /opt/lib
75  ../libs/libvorbis-1.2.0/lib/.libs
76  ${DEPENDENCY_DIR}/libvorbis-1.2.0/lib
77  )
78
79#FIND_LIBRARY(VORBISENC_LIBRARY
80#  NAMES vorbisenc
81#  PATHS
82#  /usr/pack/oggvorbis-1.0-ds/i686-debian-linux3.1/lib
83#  /usr/local/lib
84#  /usr/lib
85#  /sw/lib
86#  /opt/local/lib
87#  /opt/csw/lib
88#  /opt/lib
89#  ../libs/libvorbis-1.2.0/lib/.libs
90#  )
91
92FIND_LIBRARY(VORBISFILE_LIBRARY
93  NAMES vorbisfile
94  PATHS
95  /usr/pack/oggvorbis-1.0-ds/i686-debian-linux3.1/lib
96  /usr/local/lib
97  /usr/lib
98  /sw/lib
99  /opt/local/lib
100  /opt/csw/lib
101  /opt/lib
102  ../libs/libvorbis-1.2.0/lib/.libs
103  ${DEPENDENCY_DIR}/libvorbis-1.2.0/lib
104  )
105
106SET (OGG_FOUND "NO")
107
108IF (OGG_INCLUDE_DIR AND OGG_LIBRARY)
109  SET (OGG_FOUND "YES")
110  IF (NOT OGG_FIND_QUIETLY)
111    MESSAGE (STATUS "Ogg was found.")
112    IF (VERBOSE_FIND)
113      MESSAGE (STATUS "  include path: ${OGG_INCLUDE_DIR}")
114      MESSAGE (STATUS "  library path: ${OGG_LIBRARY}")
115      MESSAGE (STATUS "  libraries:    ogg")
116    ENDIF (VERBOSE_FIND)
117  ENDIF (NOT OGG_FIND_QUIETLY)
118ELSE (OGG_INCLUDE_DIR AND OGG_LIBRARY)
119  IF (NOT OGG_INCLUDE_DIR)
120    MESSAGE (SEND_ERROR "Ogg include path was not found.")
121  ENDIF (NOT OGG_INCLUDE_DIR)
122  IF (NOT OGG_LIBRARY)
123    MESSAGE (SEND_ERROR "Ogg library was not found.")
124  ENDIF (NOT OGG_LIBRARY)
125ENDIF (OGG_INCLUDE_DIR AND OGG_LIBRARY)
126
127
128SET (VORBIS_FOUND "NO")
129
130IF (VORBIS_INCLUDE_DIR AND VORBIS_LIBRARY AND VORBISFILE_LIBRARY)# AND VORBISENC_LIBRARY)
131  SET (VORBIS_FOUND "YES")
132  IF (NOT VORBIS_FIND_QUIETLY)
133    MESSAGE (STATUS "Vorbis was found.")
134    IF (VERBOSE_FIND)
135      MESSAGE (STATUS "  include path: ${VORBIS_INCLUDE_DIR}")
136      MESSAGE (STATUS "  library path: ${VORBIS_LIBRARY}")
137      #MESSAGE (STATUS "  library path: ${VORBISENC_LIBRARY}")
138      MESSAGE (STATUS "  library path: ${VORBISFILE_LIBRARY}")
139      MESSAGE (STATUS "  libraries:    vorbis vorbisenc vorbisfile")
140    ENDIF (VERBOSE_FIND)
141  ENDIF (NOT VORBIS_FIND_QUIETLY)
142ELSE (VORBIS_INCLUDE_DIR AND VORBIS_LIBRARY AND VORBISFILE_LIBRARY)# AND VORBISENC_LIBRARY)
143  IF (NOT VORBIS_INCLUDE_DIR)
144    MESSAGE (SEND_ERROR "Vorbis include path was not found.")
145  ENDIF (NOT VORBIS_INCLUDE_DIR)
146  IF (NOT VORBIS_LIBRARY)
147    MESSAGE (SEND_ERROR "Vorbis library \"vorbis\" was not found.")
148  ENDIF (NOT VORBIS_LIBRARY)
149  #IF (NOT VORBISENC_LIBRARY)
150  #  MESSAGE (SEND_ERROR "Vorbis library \"vorbisenc\" was not found.")
151  #ENDIF (NOT VORBISENC_LIBRARY)
152  IF (NOT VORBISFILE_LIBRARY)
153    MESSAGE (SEND_ERROR "Vorbis library \"vorbisfile\" was not found.")
154  ENDIF (NOT VORBISFILE_LIBRARY)
155ENDIF (VORBIS_INCLUDE_DIR AND VORBIS_LIBRARY AND VORBISFILE_LIBRARY)# AND VORBISENC_LIBRARY)
156
Note: See TracBrowser for help on using the repository browser.