coin3d / simage

Image file loading
ISC License
7 stars 9 forks source link

Fix Ogg and Vorbis static link order and use separate find packages #40

Closed rickertm closed 4 years ago

rickertm commented 4 years ago

Linking against a static libsndfile with libogg and libvorbis requires a different linking order (first libvorbis, then libogg):

/usr/bin/ld: libvorbis.a(block.c.o): in function `vorbis_block_init':
undefined reference to `oggpack_writeinit'
/usr/bin/ld: libvorbis.a(block.c.o): in function `vorbis_block_clear':
undefined reference to `oggpack_writeclear'
/usr/bin/ld: libvorbis.a(analysis.c.o): in function `vorbis_analysis':
undefined reference to `oggpack_reset'

This PR separates FindOggVorbis.cmake into two separate find modules and fixes the link order accordingly.

See also #39