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.
 
 
 
 
 

55 lines
2.1 KiB

# Project settings and common targets.
# 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.
if(NOT UNIX)
error("Unsupported platform")
endif()
string(TOLOWER "${PROJECT_NAME}" PROJECT_ARCHIVE)
include(GNUInstallDirs)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
if(NOT DEFINED CMAKE_TOOLCHAIN_FILE)
if(EXISTS "/usr/local/lib/")
include_directories("/usr/local/include")
link_directories("/usr/local/lib")
list(APPEND lint_tidy_includes -I/usr/local/include)
endif()
if(EXISTS "/usr/pkg/lib/")
include_directories("/usr/pkg/include")
link_directories("/usr/pkg/lib")
list(APPEND lint_tidy_includes -I/usr/pkg/include)
endif()
endif()
if(NOT DEFINED OPEN_BROWSER)
set(OPEN_BROWSER "xdg-open")
endif()
# Common tarball distribution
if(EXISTS ".git/")
add_custom_target(dist
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
COMMAND "${CMAKE_COMMAND}" -E remove -F "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_ARCHIVE}-*.tar.gz"
COMMAND git archive -o "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_ARCHIVE}-${PROJECT_VERSION}.tar.gz" --format tar.gz --prefix="${PROJECT_ARCHIVE}-${PROJECT_VERSION}/" "v${PROJECT_VERSION}" 2>/dev/null || git archive -o "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_ARCHIVE}-${PROJECT_VERSION}.tar.gz" --format tar.gz --prefix="${PROJECT_ARCHIVE}-${PROJECT_VERSION}/" HEAD
)
endif()
# Documentation generation
find_package(Doxygen COMPONENTS dot doxygen)
if(DOXYGEN_FOUND AND EXISTS "Doxyfile")
add_custom_target(docgen
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
COMMAND ${DOXYGEN_EXECUTABLE} Doxyfile
COMMAND ${OPEN_BROWSER} out/html/index.html
)
endif()