Bristol makes legacy telephony networks available to IP telephony services thru the SIP protocol and RTP media sessions
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.
 
 
 

71 lines
2.0 KiB

# Copyright (C) 2020 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.1)
project(Bristol VERSION 0.0.5 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)
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/deploy.cmake OPTIONAL)
file(GLOB markdown *.md)
file(GLOB cmake_includes cmake/*.cmake)
# Work out dynamic plugins and/or static builds
if(NOT BUILD_DRIVERS)
set(BUILD_DRIVERS ",test,")
else()
set(BUILD_DRIVERS ",${BUILD_DRIVERS},test,")
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
if(BUILD_DRIVERS MATCHES ",test,")
add_subdirectory(drivers/test)
endif()
# Server build and install
if(EXISTS "vendor/")
add_subdirectory(vendor)
endif()
add_subdirectory(server)
if(BUILD_TESTING)
enable_testing()
add_test(NAME test-server COMMAND ./server/bristol -d test)
endif()
add_custom_target(support-files SOURCES config.hpp.in Doxyfile TODO ${markdown} ${cmake_includes} server/bristol.conf test/bristol.conf)