CMakeLists.txt 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. cmake_minimum_required(VERSION 3.0.0)
  2. project(mumsi)
  3. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
  4. INCLUDE(FindPkgConfig)
  5. find_package(Boost COMPONENTS system unit_test_framework program_options filesystem REQUIRED)
  6. find_package(PkgConfig REQUIRED)
  7. pkg_check_modules(OPUS "opus")
  8. pkg_check_modules(PJSIP "libpjproject")
  9. pkg_check_modules(LOG4CPP "log4cpp")
  10. pkg_check_modules(SNDFILE "sndfile")
  11. include_directories(${OPUS_INCLUDE_DIRS})
  12. include_directories(${PJSIP_INCLUDE_DIRS})
  13. include_directories(${LOG4CPP_INCLUDE_DIRS})
  14. include_directories(${SNDFILE_INCLUDE_DIRS})
  15. include_directories(libmumble)
  16. link_directories(libmumble)
  17. set(SOURCE_FILES
  18. PjsuaCommunicator.cpp
  19. PjsuaCommunicator.hpp
  20. MumbleCommunicator.cpp
  21. MumbleCommunicator.hpp
  22. ISamplesBuffer.hpp
  23. Configuration.cpp
  24. Configuration.hpp)
  25. #set(TEST_SOURCE_FILES
  26. # SoundSampleQueueTest.cpp
  27. #)
  28. add_executable(mumsi ${SOURCE_FILES} main.cpp)
  29. target_link_libraries(mumsi ${OPUS_LIBRARIES})
  30. target_link_libraries(mumsi ${PJSIP_LIBRARIES})
  31. target_link_libraries(mumsi ${LOG4CPP_LIBRARIES})
  32. target_link_libraries(mumsi ${SNDFILE_LIBRARIES})
  33. target_link_libraries(mumsi ${Boost_LIBRARIES})
  34. target_link_libraries(mumsi mumble)
  35. #add_executable(mumsi_test ${SOURCE_FILES} ${TEST_SOURCE_FILES} test_main.cpp)
  36. #target_link_libraries(mumsi_test ${OPUS_LIBRARIES})
  37. #target_link_libraries(mumsi_test ${PJSIP_LIBRARIES})
  38. #target_link_libraries(mumsi_test ${LOG4CPP_LIBRARIES})
  39. #target_link_libraries(mumsi_test ${SNDFILE_LIBRARIES})
  40. #target_link_libraries(mumsi_test ${Boost_LIBRARIES})
  41. #target_link_libraries(mumsi_test mumble)