summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2018-06-10 13:17:39 (GMT)
committer Slávek Banko <slavek.banko@axis.cz>2018-06-10 13:17:39 (GMT)
commit43a99c946ec2187d0e276615d337ad47276f553a (patch)
treecd6a1526fde3389bcbc6641d563c88a0bb2aae0e
parent7464ab58d08bd3b6dd78d71a0ed46371cf9d1d72 (diff)
downloadtdemultimedia-43a99c94.zip
tdemultimedia-43a99c94.tar.gz
cmake: Add check of libvorbis versionHEADorigin/masterorigin/HEADmaster
This is essential for applications that encode to ogg Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
-rw-r--r--ConfigureChecks.cmake7
-rw-r--r--config.h.cmake2
2 files changed, 7 insertions, 2 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index c5b7c0f..c51954e 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -255,7 +255,12 @@ if( WITH_VORBIS )
tde_message_fatal( "Ogg/Vorbis support are requested, but `libvorbisenc` not found" )
endif( )
- set( HAVE_VORBIS 1 )
+ check_library_exists( vorbis vorbis_bitrate_addblock "${VORBIS_LIBRARY_DIRS}" HAVE_VORBIS_2 )
+ if( HAVE_VORBIS_2 )
+ set( HAVE_VORBIS 2 )
+ else( )
+ set( HAVE_VORBIS 1 )
+ endif( )
set( OGG_VORBIS 1 )
endif( WITH_VORBIS )
diff --git a/config.h.cmake b/config.h.cmake
index 61dd916..812818b 100644
--- a/config.h.cmake
+++ b/config.h.cmake
@@ -31,7 +31,7 @@
#cmakedefine HAVE_MACHINE_SOUNDCARD_H 1
#cmakedefine HAVE_LIBFLAC 1
-#cmakedefine HAVE_VORBIS 1
+#cmakedefine HAVE_VORBIS @HAVE_VORBIS@
#cmakedefine OGG_VORBIS 1
/* mpeglib */