Skip to content

Commit

Permalink
Add mp3 playback support in the test client
Browse files Browse the repository at this point in the history
  • Loading branch information
pcgod committed Mar 15, 2010
1 parent 25775cc commit 7d6e90c
Show file tree
Hide file tree
Showing 8 changed files with 719 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
*.db
*.a
*.so
*.pb.*
*.cmake
Makefile
main
pkcs11.txt
CMakeCache.txt
CMakeFiles/*
celt-build/CMakeFiles/*
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "celt"]
path = celt
url = git://git.xiph.org/celt.git/
22 changes: 20 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,36 @@ set (libmumbleclient_VERSION_MAJOR 0)
set (libmumbleclient_VERSION_MINOR 0)
set(CMAKE_INCLUDE_CURRENT_DIR ON)

include(FindPkgConfig)

find_package(Boost 1.38.0 REQUIRED COMPONENTS system thread)
find_package(OpenSSL REQUIRED)
find_package(Protobuf REQUIRED)

pkg_check_modules(CELT celt>=0.7.0)

if (NOT CELT_FOUND)
add_subdirectory(celt-build)
set(CELT_LIBRARIES celt0)
set(CELT_INCLUDE_DIR celt/libcelt)
endif()

SET(CMAKE_BUILD_TYPE Debug)
SET(CMAKE_C_FLAGS_DEBUG "-g -Wall -Wextra -pedantic -Wfatal-errors -Wshadow")
SET(CMAKE_CXX_FLAGS_DEBUG "-g -Wall -Wextra -Wfatal-errors -Wshadow -Woverloaded-virtual -Wold-style-cast")

include_directories(${Boost_INCLUDE_DIRS} ${OPENSSL_INCLUDE_DIR})
include_directories(${Boost_INCLUDE_DIRS} ${OPENSSL_INCLUDE_DIR} ${CELT_INCLUDE_DIR})

PROTOBUF_GENERATE_CPP(PROTO_SRCS PROTO_HDRS Mumble.proto)

add_library(mumbleclient client.cc client_lib.cc CryptState.cpp ${PROTO_SRCS} ${PROTO_HDRS})

option(WITH_MPG123 "Add mp3 playback support" ON)

if (WITH_MPG123)
add_definitions(-DWITH_MPG123)
set(LIBRARIES mpg123)
endif()

add_executable (main main.cc)
target_link_libraries (main mumbleclient ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES} ${PROTOBUF_LIBRARY})
target_link_libraries (main mumbleclient ${LIBRARIES} ${CELT_LIBRARIES} ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES} ${PROTOBUF_LIBRARY})
Loading

0 comments on commit 7d6e90c

Please sign in to comment.