aes67-daemon/daemon/CMakeLists.txt
Andrea Bondavalli 5deb6c1927 Added to the daemon the support for Multicast DNS (using Linux Avahi) to allow discovery of remote audio sources and of RTSP for SDP transfer.
Added to the WebUI the possibility to directly select a remote source SDP file for a Sink.

New files:
daemon/mdns_client.hpp,cpp -> mDNS client implementation using Avahi client library
daemon/rtsp_client.hpp,cpp -> RTSP client implementation used to transfer SDP file
daemon/utils.cpp -> used for common utility functions
.clang-format -> added clang-format configuration file

Modified files:
daemon/CMakeList.txt -> added support for Avahi and option WITH_AVAHI=[yes/no] to compile the daemon with or without Avahi mDNS support
daemon/config.hpp,cpp -> added configuration option mdns_enabled to enable or disable mDNS discovery at runtime
daemon/json.cpp -> extended JSON config with mdns_enabled option
daemon/browser.hpp,cpp -> added support for mDNS client to the browser
daemon/session_manager.cpp -> added support for RTSP protocol to Source URL field and fixed issue with SDP file parsing
webui/RemoteSources.js -> added visualization of mDNS remote sources
webui/SinkEdit.js -> added the possibility to directly select a remote source SDP file for a Sink
webui/SourceInfo.js -> added visualization of protocol source (SAP, mDNS or local) for a source
ubuntu-packages.sh -> added libavahi-client-dev to the list of required packages
build.sh -> added WITH_AVAHI=yes option when invoking CMake
README.md -> added notes about mDNS support via Avahi
daemon/README.md -> added notes about mDNS support via Avahi, support for RTSP protocol in source and new mdns_enabled config param

Additional minor changes to remaining files.
2020-03-29 19:41:56 +02:00

25 lines
1.3 KiB
CMake

cmake_minimum_required(VERSION 3.7.0)
project(aes67-daemon CXX)
enable_testing()
option(WITH_AVAHI "Include mDNS support via Avahi" OFF)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_FLAGS "-g -DBOOST_LOG_DYN_LINK -DBOOST_LOG_USE_NATIVE_SYSLOG -Wall")
set(RAVENNA_ALSA_LKM "../3rdparty/ravenna-alsa-lkm/")
set(CPP_HTTPLIB " ../3rdparty/cpp-httplib/")
find_library(AVAHI_LIBRARY-COMMON NAMES avahi-common)
find_library(AVAHI_LIBRARY-CLIENT NAMES avahi-client)
find_path(AVAHI_INCLUDE_DIR avahi-client/publish.h)
set(AVAHI_LIBRARIES ${AVAHI_LIBRARY-COMMON} ${AVAHI_LIBRARY-CLIENT})
set(AVAHI_INCLUDE_DIRS ${AVAHI_INCLUDE_DIR})
find_package(Boost COMPONENTS system thread log program_options REQUIRED)
include_directories(aes67-daemon ${RAVENNA_ALSA_LKM}/common ${RAVENNA_ALSA_LKM}/driver ${CPP_HTTPLIB} ${Boost_INCLUDE_DIR})
add_executable(aes67-daemon error_code.cpp json.cpp main.cpp driver_handler.cpp driver_manager.cpp session_manager.cpp http_server.cpp config.cpp interface.cpp log.cpp sap.cpp browser.cpp rtsp_client.cpp mdns_client.cpp utils.cpp)
add_subdirectory(tests)
target_link_libraries(aes67-daemon ${Boost_LIBRARIES})
if(WITH_AVAHI)
MESSAGE(STATUS "WITH_AVAHI")
add_definitions(-D_USE_AVAHI_)
include_directories(aes67-daemon ${AVAHI_INCLUDE_DIRS})
target_link_libraries(aes67-daemon ${AVAHI_LIBRARIES})
endif()