cmake_modules/FindOggVorbis.cmake
changeset 2395 d01d3bf3e1de
parent 2336 66c751f7a28e
child 2400 2422ea85d100
--- a/cmake_modules/FindOggVorbis.cmake	Sat Sep 26 15:44:34 2009 +0000
+++ b/cmake_modules/FindOggVorbis.cmake	Sat Sep 26 20:54:13 2009 +0000
@@ -15,6 +15,7 @@
 # Redistribution and use is allowed according to the terms of the BSD license.
 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
 
+
 include (CheckLibraryExists)
 find_path(VORBIS_INCLUDE_DIR vorbis/vorbisfile.h)
 find_library(OGG_LIBRARY NAMES ogg)
@@ -45,28 +46,10 @@
 else (OGGVORBIS_FOUND)
    if (OggVorbis_FIND_REQUIRED)
       message(FATAL_ERROR "Could NOT find OggVorbis libraries")
-   endif (OggVorbis_FIND_REQUIRED)
-   if (NOT OggVorbis_FIND_QUIETLY)
-      message(STATUS "Could NOT find OggVorbis libraries")
-   endif (NOT OggVorbis_FIND_QUIETLY)
+   else (OggVorbis_FIND_REQUIRED)
+      if (NOT OggVorbis_FIND_QUIETLY)
+         message(STATUS "Could NOT find OggVorbis libraries")
+      endif (NOT OggVorbis_FIND_QUIETLY)
+   endif(OggVorbis_FIND_REQUIRED)
 endif (OGGVORBIS_FOUND)
-#check_include_files(vorbis/vorbisfile.h HAVE_VORBISFILE_H)
-#check_library_exists(ogg ogg_page_version "" HAVE_LIBOGG)
-#check_library_exists(vorbis vorbis_info_init "" HAVE_LIBVORBIS)
-#check_library_exists(vorbisfile ov_open "" HAVE_LIBVORBISFILE)
-#check_library_exists(vorbis vorbis_bitrate_addblock "" HAVE_LIBVORBISENC2)
-#if (HAVE_LIBOGG AND HAVE_VORBISFILE_H AND HAVE_LIBVORBIS AND HAVE_LIBVORBISFILE)
-#    message(STATUS "Ogg/Vorbis found")
-#    set (VORBIS_LIBS "-lvorbis -logg")
-#    set (VORBISFILE_LIBS "-lvorbisfile")
-#    set (OGGVORBIS_FOUND TRUE)
-#    if (HAVE_LIBVORBISENC2)
-#        set (HAVE_VORBIS 2)
-#    else (HAVE_LIBVORBISENC2)
-#        set (HAVE_VORBIS 1)
-#    endif (HAVE_LIBVORBISENC2)
-#else (HAVE_LIBOGG AND HAVE_VORBISFILE_H AND HAVE_LIBVORBIS AND HAVE_LIBVORBISFILE)
-#    message(STATUS "Ogg/Vorbis not found")
-#endif (HAVE_LIBOGG AND HAVE_VORBISFILE_H AND HAVE_LIBVORBIS AND HAVE_LIBVORBISFILE)
 
-