Skip to content

Commit

Permalink
reorder ogg and vorbis library linking
Browse files Browse the repository at this point in the history
if vorbis has been built to depend of ogg, when trying to
statically link, the build of snapclient and snapserver fail.

reorder the libraries, to allow off symbols in vorbis to be
resolved.
  • Loading branch information
heitbaum authored and badaix committed Apr 15, 2024
1 parent 2459210 commit 5fa01b8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions client/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,6 @@ if(ANDROID)
list(APPEND CLIENT_LIBRARIES OpenSLES)

else()
# if OGG then tremor or vorbis
if(OGG_FOUND)
list(APPEND CLIENT_SOURCES decoder/ogg_decoder.cpp)
list(APPEND CLIENT_LIBRARIES ${OGG_LIBRARIES})
list(APPEND CLIENT_INCLUDE ${OGG_INCLUDE_DIRS})
endif(OGG_FOUND)

# Tremor (fixed-point) or libvorbis (floating-point)
if(TREMOR_FOUND)
list(APPEND CLIENT_LIBRARIES ${TREMOR_LIBRARIES})
Expand All @@ -92,6 +85,13 @@ else()
list(APPEND CLIENT_INCLUDE ${VORBIS_INCLUDE_DIRS})
endif(TREMOR_FOUND)

# if OGG then tremor or vorbis
if(OGG_FOUND)
list(APPEND CLIENT_SOURCES decoder/ogg_decoder.cpp)
list(APPEND CLIENT_LIBRARIES ${OGG_LIBRARIES})
list(APPEND CLIENT_INCLUDE ${OGG_INCLUDE_DIRS})
endif(OGG_FOUND)

if(FLAC_FOUND)
list(APPEND CLIENT_SOURCES decoder/flac_decoder.cpp)
list(APPEND CLIENT_LIBRARIES ${FLAC_LIBRARIES})
Expand Down
4 changes: 2 additions & 2 deletions server/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ else()
AND VORBIS_FOUND
AND VORBISENC_FOUND)
list(APPEND SERVER_SOURCES encoder/ogg_encoder.cpp)
list(APPEND SERVER_LIBRARIES ${OGG_LIBRARIES} ${VORBIS_LIBRARIES}
${VORBISENC_LIBRARIES})
list(APPEND SERVER_LIBRARIES ${VORBIS_LIBRARIES} ${VORBISENC_LIBRARIES}
${OGG_LIBRARIES})
list(APPEND SERVER_INCLUDE ${OGG_INCLUDE_DIRS} ${VORBIS_INCLUDE_DIRS}
${VORBISENC_INCLUDE_DIRS})
endif(
Expand Down

0 comments on commit 5fa01b8

Please sign in to comment.