mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-02 11:46:34 +02:00
add opus options to cmakefiles
This commit is contained in:
parent
258bab4f65
commit
2a47e0b672
3 changed files with 20 additions and 0 deletions
|
@ -14,6 +14,7 @@ option(BUILD_CLIENT "Build Snapclient" ON)
|
||||||
option(BUILD_WITH_FLAC "Build with FLAC support" ON)
|
option(BUILD_WITH_FLAC "Build with FLAC support" ON)
|
||||||
option(BUILD_WITH_VORBIS "Build with VORBIS support" ON)
|
option(BUILD_WITH_VORBIS "Build with VORBIS support" ON)
|
||||||
option(BUILD_WITH_TREMOR "Build with vorbis using TREMOR" ON)
|
option(BUILD_WITH_TREMOR "Build with vorbis using TREMOR" ON)
|
||||||
|
option(BUILD_WITH_OPUS "Build with OPUS support" ON)
|
||||||
option(BUILD_WITH_AVAHI "Build with AVAHI support" ON)
|
option(BUILD_WITH_AVAHI "Build with AVAHI support" ON)
|
||||||
|
|
||||||
|
|
||||||
|
@ -173,6 +174,13 @@ if(BUILD_WITH_VORBIS)
|
||||||
endif(VORBISENC_FOUND)
|
endif(VORBISENC_FOUND)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(BUILD_WITH_OPUS)
|
||||||
|
pkg_search_module(OPUS opus)
|
||||||
|
if (OPUS_FOUND)
|
||||||
|
add_definitions("-DHAS_OPUS")
|
||||||
|
endif (OPUS_FOUND)
|
||||||
|
endif()
|
||||||
|
|
||||||
find_package(Boost 1.70 REQUIRED)
|
find_package(Boost 1.70 REQUIRED)
|
||||||
add_definitions("-DBOOST_ERROR_CODE_HEADER_ONLY")
|
add_definitions("-DBOOST_ERROR_CODE_HEADER_ONLY")
|
||||||
|
|
||||||
|
|
|
@ -68,6 +68,12 @@ if (FLAC_FOUND)
|
||||||
list(APPEND CLIENT_INCLUDE ${FLAC_INCLUDE_DIRS})
|
list(APPEND CLIENT_INCLUDE ${FLAC_INCLUDE_DIRS})
|
||||||
endif (FLAC_FOUND)
|
endif (FLAC_FOUND)
|
||||||
|
|
||||||
|
if (OPUS_FOUND)
|
||||||
|
list(APPEND CLIENT_SOURCES decoder/opus_decoder.cpp)
|
||||||
|
list(APPEND CLIENT_LIBRARIES ${OPUS_LIBRARIES})
|
||||||
|
list(APPEND CLIENT_INCLUDE ${OPUS_INCLUDE_DIRS})
|
||||||
|
endif (OPUS_FOUND)
|
||||||
|
|
||||||
include_directories(${CLIENT_INCLUDE})
|
include_directories(${CLIENT_INCLUDE})
|
||||||
add_executable(snapclient ${CLIENT_SOURCES})
|
add_executable(snapclient ${CLIENT_SOURCES})
|
||||||
target_link_libraries(snapclient ${CLIENT_LIBRARIES})
|
target_link_libraries(snapclient ${CLIENT_LIBRARIES})
|
||||||
|
|
|
@ -59,6 +59,12 @@ if (FLAC_FOUND)
|
||||||
list(APPEND SERVER_INCLUDE ${FLAC_INCLUDE_DIRS})
|
list(APPEND SERVER_INCLUDE ${FLAC_INCLUDE_DIRS})
|
||||||
endif (FLAC_FOUND)
|
endif (FLAC_FOUND)
|
||||||
|
|
||||||
|
if (OPUS_FOUND)
|
||||||
|
list(APPEND SERVER_SOURCES encoder/opus_encoder.cpp)
|
||||||
|
list(APPEND SERVER_LIBRARIES ${OPUS_LIBRARIES})
|
||||||
|
list(APPEND SERVER_INCLUDE ${OPUS_INCLUDE_DIRS})
|
||||||
|
endif (OPUS_FOUND)
|
||||||
|
|
||||||
#list(APPEND SERVER_LIBRARIES Boost::boost)
|
#list(APPEND SERVER_LIBRARIES Boost::boost)
|
||||||
|
|
||||||
include_directories(${SERVER_INCLUDE})
|
include_directories(${SERVER_INCLUDE})
|
||||||
|
|
Loading…
Add table
Reference in a new issue