aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNiels Ole Salscheider <niels_ole@salscheider-online.de>2017-09-03 22:27:25 +0200
committerNiels Ole Salscheider <niels_ole@salscheider-online.de>2017-09-04 20:34:53 +0200
commit77d52eb507474ae5a2c1b2f540e3c67945eaea37 (patch)
tree7f0a9e19bd8cdff3f5ecb72ce04708c42e9558c7 /src
parent8e0415d0bacbce3fc6d7b66304936d578d52b214 (diff)
downloadqxmpp-77d52eb507474ae5a2c1b2f540e3c67945eaea37.tar.gz
Re-add codecs support to the build system
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index dedfccae..62b4693f 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -157,6 +157,36 @@ set(SOURCE_FILES
server/QXmppServerPlugin.cpp
)
+option(WITH_SPEEX "Support the Speex codec" OFF)
+option(WITH_OPUS "Support the Opus codec" OFF)
+option(WITH_THEORA "Support the Theora codec" OFF)
+option(WITH_VPX "Support the VPX codec" OFF)
+
+if(WITH_SPEEX)
+ find_package(Speex REQUIRED)
+ include_directories(${Speex_INCLUDE_DIRS})
+ set(MULTIMEDIA_LIBS ${MULTIMEDIA_LIBS} ${Speex_LIBRARIES})
+ add_definitions(-DQXMPP_USE_SPEEX)
+endif()
+if(WITH_OPUS)
+ find_package(Opus REQUIRED)
+ include_directories(${Opus_INCLUDE_DIRS})
+ set(MULTIMEDIA_LIBS ${MULTIMEDIA_LIBS} ${Opus_LIBRARIES})
+ add_definitions(-DQXMPP_USE_OPUS)
+endif()
+if(WITH_THEORA)
+ find_package(Theora REQUIRED)
+ include_directories(${Theora_INCLUDE_DIRS})
+ set(MULTIMEDIA_LIBS ${MULTIMEDIA_LIBS} ${Theora_LIBRARIES})
+ add_definitions(-DQXMPP_USE_THEORA)
+endif()
+if(WITH_VPX)
+ find_package(VPX REQUIRED)
+ include_directories(${VPX_INCLUDE_DIRS})
+ set(MULTIMEDIA_LIBS ${MULTIMEDIA_LIBS} ${VPX_LIBRARIES})
+ add_definitions(-DQXMPP_USE_VPX)
+endif()
+
add_library(qxmpp SHARED ${SOURCE_FILES})
set_target_properties(qxmpp PROPERTIES
@@ -171,6 +201,8 @@ target_link_libraries(qxmpp
Qt5::Core
Qt5::Network
Qt5::Xml
+ PRIVATE
+ ${MULTIMEDIA_LIBS}
)
install(