CMake: Add vorbisenc.c to vorbis target for WIN32 builds
authorMarcel Metz <mmetz@adrian-broher.net>
Mon, 7 Mar 2016 20:20:21 +0000 (21:20 +0100)
committerRalph Giles <giles@thaumas.net>
Sat, 22 Jul 2017 16:29:38 +0000 (09:29 -0700)
On Windows the vorbis shared library exports some symbols defined in the
vorbisen.c file.  To allow error free linking this file should be added
to to the VORBIS_SOURCES.

Signed-off-by: Ralph Giles <giles@thaumas.net>
lib/CMakeLists.txt

index a682ed4..e808e77 100644 (file)
@@ -57,6 +57,10 @@ set(VORBISENC_SOURCES
     vorbisenc.c
 )
 
+if(WIN32)
+    list(APPEND VORBIS_SOURCES vorbisenc.c)
+endif()
+
 if(MSVC)
     list(APPEND VORBIS_SOURCES ../win32/vorbis.def)
     list(APPEND VORBISENC_SOURCES ../win32/vorbisenc.def)