From: Neal Gompa Date: Wed, 12 May 2010 18:46:50 +0000 (-0500) Subject: Updated 'FindOggVorbis.cmake' to work better on Linux (hopefully fixes Windows Ogg... X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=7fb9a2ab3e2386488357b6e2ae3ed1108d1bb65b;p=lugaru.git Updated 'FindOggVorbis.cmake' to work better on Linux (hopefully fixes Windows Ogg detection too) --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 0ea8c47..3506973 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -49,7 +49,7 @@ include_directories( ${OGG_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/Source) -set(LUGARU_LIBS ${OPENAL_LIBRARY} ${PNG_LIBRARY} ${JPEG_LIBRARY} ${BZIP2_LIBRARIES} ${ZLIB_LIBRARIES} ${SDL_LIBRARY} ${GLU_LIBRARY} ${OPENGL_LIBRARY} ${VORBISFILE_LIBS} ${OGG_LIBS}) +set(LUGARU_LIBS ${OPENAL_LIBRARY} ${PNG_LIBRARY} ${JPEG_LIBRARY} ${BZIP2_LIBRARIES} ${ZLIB_LIBRARIES} ${SDL_LIBRARY} ${GLU_LIBRARY} ${OPENGL_LIBRARY} ${VORBISFILE_LIBRARY} ${OGG_LIBRARY}) add_subdirectory(Source) diff --git a/cmake/Modules/FindOggVorbis.cmake b/cmake/Modules/FindOggVorbis.cmake index 46ec694..8f90b9d 100644 --- a/cmake/Modules/FindOggVorbis.cmake +++ b/cmake/Modules/FindOggVorbis.cmake @@ -65,27 +65,27 @@ else (OGGVORBIS_FOUND) endif (NOT OggVorbis_FIND_QUITELY) 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(vorbisenc vorbis_info_clear "" HAVE_LIBVORBISENC) -check_library_exists(vorbis vorbis_bitrate_addblock "" HAVE_LIBVORBISENC2) - -if (HAVE_LIBOGG AND HAVE_VORBISFILE_H AND HAVE_LIBVORBIS AND HAVE_LIBVORBISFILE AND HAVE_LIBVORBISENC) - message(STATUS "Ogg/Vorbis found") - set (VORBIS_LIBS "-lvorbis") - set (OGG_LIBS "-logg") - set (VORBISFILE_LIBS "-lvorbisfile") - set (VORBISENC_LIBS "-lvorbisenc") - 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 AND HAVE_LIBVORBISENC) - message(STATUS "Ogg/Vorbis not found") -endif (HAVE_LIBOGG AND HAVE_VORBISFILE_H AND HAVE_LIBVORBIS AND HAVE_LIBVORBISFILE AND HAVE_LIBVORBISENC) +#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(vorbisenc vorbis_info_clear "" HAVE_LIBVORBISENC) +#check_library_exists(vorbis vorbis_bitrate_addblock "" HAVE_LIBVORBISENC2) + +#if (HAVE_LIBOGG AND HAVE_VORBISFILE_H AND HAVE_LIBVORBIS AND HAVE_LIBVORBISFILE AND HAVE_LIBVORBISENC) +# message(STATUS "Ogg/Vorbis found") +# set (VORBIS_LIBS "-lvorbis") +# set (OGG_LIBS "-logg") +# set (VORBISFILE_LIBS "-lvorbisfile") +# set (VORBISENC_LIBS "-lvorbisenc") +# 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 AND HAVE_LIBVORBISENC) +# message(STATUS "Ogg/Vorbis not found") +#endif (HAVE_LIBOGG AND HAVE_VORBISFILE_H AND HAVE_LIBVORBIS AND HAVE_LIBVORBISFILE AND HAVE_LIBVORBISENC)