Bordeaux is a voice application server for modern IP telephony networks using modern C++ practices along with advances originally made in GNU Bayonne.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

93 lines
2.7 KiB

# Copyright (C) 2020-2021 David Sugar <tychosoft@gmail.com>.
#
# This file is free software; as a special exception the author gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
cmake_minimum_required(VERSION 3.2.0)
project(Bordeaux VERSION 0.2.6 LANGUAGES CXX)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_STANDARD 17)
cmake_policy(SET CMP0063 NEW)
if(CMAKE_BUILD_TYPE MATCHES "Debug")
set(BUILD_TESTING TRUE)
list(APPEND CMAKE_CXX_FLAGS "-Wall")
endif()
file(GLOB_RECURSE lint_cxx_sources RELATIVE ${PROJECT_SOURCE_DIR} server/*.[ch]pp drivers/*.[ch]pp utils/*.cpp)
set(lint_cxx_includes -I${PROJECT_BINARY_DIR} -Iserver -Ivendor/libeXosip2/include -Ivendor/libosip2/include)
include(cmake/custom.cmake OPTIONAL)
include(cmake/project.cmake)
include(cmake/features.cmake)
include(cmake/coverage.cmake)
include(cmake/linting.cmake)
include(cmake/paths.cmake)
include(cmake/tune.cmake)
include(cmake/deploy.cmake OPTIONAL)
include(cmake/docker.cmake OPTIONAL)
file(GLOB manpages server/*.5 server/*.8 utils/*.1)
file(GLOB markdown *.md)
file(GLOB cmake_includes cmake/*.cmake)
# Work out dynamic drivers and/or static builds
if(NOT BORDEAUX_DRIVERS AND NOT BUILD_DRIVER)
set(BORDEAUX_DRIVERS ",test,coventry,generic,")
elseif(BUILD_DRIVER)
set(BORDEAUX_DRIVERS ",${BUILD_DRIVER},")
else()
set(BORDEAUX_DRIVERS ",${BORDEAUX_DRIVERS},")
endif()
# Setup headers
include_directories(
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/server
)
configure_file(config.hpp.in config.hpp)
# Add only drivers we are actually building and some cannot be static.
if(BORDEAUX_DRIVERS MATCHES ",generic,")
add_subdirectory(drivers/generic)
endif()
if(BORDEAUX_DRIVERS MATCHES ",coventry,")
add_subdirectory(drivers/coventry)
endif()
if(BORDEAUX_DRIVERS MATCHES ",test,")
add_subdirectory(drivers/test)
endif()
# Server build and install
if(EXISTS "vendor/")
add_subdirectory(vendor)
endif()
add_subdirectory(server)
add_subdirectory(utils)
if(BUILD_TESTING)
enable_testing()
if(BUILD_STATIC)
add_test(NAME test-server COMMAND ./server/bordeaux-${BUILD_DRIVER})
else()
add_test(NAME test-server COMMAND ./server/bordeaux-server -d test)
endif()
endif()
# Extras and IDE targets
add_custom_target(manpages SOURCES ${manpages})
add_custom_target(support-files SOURCES config.hpp.in Dockerfile Doxyfile TODO ${markdown} ${cmake_includes} server/bordeaux.conf server/bordeaux.default test/bordeaux.conf)