diff --git a/CMakeLists.txt b/CMakeLists.txt index a3b1e131..9226281c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -527,8 +527,17 @@ else(NOT enable-pkgconfig) pkg_check_modules ( LIBSNDFILE sndfile>=1.0.0 ) set ( LIBSNDFILE_SUPPORT ${LIBSNDFILE_FOUND} ) if ( LIBSNDFILE_SUPPORT ) - pkg_check_modules ( LIBSNDFILE_VORBIS sndfile>=1.0.18 ) - set ( LIBSNDFILE_HASVORBIS ${LIBSNDFILE_VORBIS_FOUND} ) + message (DEBUG "LIBSNDFILE_STATIC_LIBRARIES: ${LIBSNDFILE_STATIC_LIBRARIES}") + message (DEBUG "LIBSNDFILE_STATIC_LINK_LIBRARIES: ${LIBSNDFILE_STATIC_LINK_LIBRARIES}") + message (DEBUG "LIBSNDFILE_STATIC_LDFLAGS: ${LIBSNDFILE_STATIC_LDFLAGS}") + message (DEBUG "LIBSNDFILE_STATIC_LDFLAGS_OTHER: ${LIBSNDFILE_STATIC_LDFLAGS_OTHER}") + if ( LIBSNDFILE_STATIC_LIBRARIES MATCHES "vorbis" OR + LIBSNDFILE_STATIC_LDFLAGS MATCHES "vorbis" OR + LIBSNDFILE_STATIC_LDFLAGS_OTHER MATCHES "vorbis" ) + set ( LIBSNDFILE_HASVORBIS 1 ) + else () + message ( NOTICE "Seems like libsndfile was compiled without OGG/Vorbis support." ) + endif () endif ( LIBSNDFILE_SUPPORT ) else ( enable-libsndfile ) unset_pkg_config ( LIBSNDFILE )